https://retellai.com/?utm_source=discord&utm_medium=seo logo
hey can anyone help me to come out from this error...
# ❓・ai-evy-support
s
hey can anyone help me to come out from this error in multi prompt chat agent where i getting error of invalid message role :state_transition when the agent switch to another state and i reply to the agent message then this error pop up. @AI Evy @retellai @Reece - Integration @ Retell AI @Omar Ashraf | Community Lead @Todd - Cofounder@Retell AI https://cdn.discordapp.com/attachments/1302816169367044149/1413097120587583590/Screenshot_2025-09-03_122907.png?ex=68bab0bf&is=68b95f3f&hm=c9cd96e7a12a8254cb302c17332029416744d732a3ea54ef37757e8df447a8a2&
a
Thanks for tagging me @santoshsingh212e_48455. I'll look through relevant sources and get back to you shortly.
### Answer The "Invalid message role received: state_transition" error is a known issue that affects multi-prompt agents during state transitions [(1) ]() [(2) ]() . Based on community reports, this error typically occurs when the agent transitions between states and you try to send a message afterward [(2) ]() . Here are the troubleshooting steps that have helped other users: Try switching LLM models: - If you're using GPT-4.1, try switching to GPT-4o or GPT-4o mini [(1) ]() [(2) ]() - Users have reported that changing the LLM model can resolve this issue [(1) ]() Test in different environments: - The error may only occur in test chat but work fine during actual phone calls [(2) ]() - Try testing your agent with a voice call to see if the issue persists Check your state transition logic: When building multi-prompt agents, ensure your state transitions are properly defined [(3) ]() :
Copy code
7. Ask if user is interested in an in person tour.
 - if yes, transition to schedule_tour.
 - if no or hesitant, call function end_call to hang up politely and say will reach out if any other interesting properties pop up.
This appears to be a platform issue that the Retell team is aware of and investigating [(1) ]() [(2) ]() . If the LLM model switch doesn't resolve it, the issue has been reported to the development team for further investigation [(2) ]() .
​ To learn more, see the sources I considered: [[1] Failed to get LLM responseError: Invalid message role received: state_transition](https://discord.com/channels/1186424376300679209/1412570376776716419) [[2] State Transition Error](https://discord.com/channels/1186424376300679209/1412803443172708412) [[3] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
o
Can yo please Create a Ticket in #❓・bug-report and I will follow up with you there.