In case the agent is incorrectly transitioning to a state which is not applicable, one possible cause is the current/ next state name is too similar to the instruction in the message.

For example a state called “ChooseLanguage” that includes a statement “Ask the user for their language of choice” Can lead to unwanted state transitions or repeats. It is recommended to rename the state in this case. (e.g. “GetPreference”).

200-600 words or 5-15 bullet points is a healthy range for state instructions. States that are too bulky tend to get more unreliable.