The potential for toxicity is higher with young growing plants, plants under stress such as severe drought and when soil water contains high nitrogen levels. Some sorghum and sudangrass varieties have less HCN potential than others, but none are totally safe.
The most common times of poisoning are early regrowth or immediately after a frost, so animals should not be allowed to graze these species when a frost or freeze is likely. The toxin dissipates over time, so dry hay is usually safe. Pasture forage is usually safe after all formerly green tissue has been brown and dry for two weeks.
From Forage-Livestock Quotes and Concepts, D.M. Ball, et. al