CrewAI Flow Infinite Loop - Steps Repeating Endlessly

Hi everyone,

I’m experiencing instability with CrewAI Flow where certain steps are getting stuck in an infinite loop and repeating non-stop.

Issue Details:

  • Steps keep repeating even after progressing to the next stage

  • The flow doesn’t seem to exit properly from certain methods

  • This happens after I setup a new .venv

The “happens after I setup a new .venv” detail is probably the most useful clue here, that pattern usually points to a version mismatch rather than a flow logic bug. CrewAI’s loop behavior shifted around the LiteLLM transition (issue #1355 in the repo touches on related agent-loop symptoms), and a fresh venv often pulls a newer LiteLLM than the last one that worked. For anyone landing here with the same symptom: first thing to check is pip freeze | grep -E 'crewai|litellm' against your last working environment.

Hiba out of curiosity, did the loop hit on a specific @listen Step or across all of them?