# CrewAI Flow Infinite Loop - Steps Repeating Endlessly

**URL:** <https://community.crewai.com/t/crewai-flow-infinite-loop-steps-repeating-endlessly/6780>\
**Category:** General\
**Created:** [August 4, 2025, 6:45pm UTC](https://community.crewai.com/t/crewai-flow-infinite-loop-steps-repeating-endlessly/6780 "2025-08-04T18:45:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hiba-Chaabnia](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/hiba-chaabnia/32/3787_2.png) [@Hiba-Chaabnia](https://community.crewai.com/u/Hiba-Chaabnia)\
**Post date:** [August 4, 2025, 6:45pm UTC](https://community.crewai.com/t/crewai-flow-infinite-loop-steps-repeating-endlessly/6780/1 "2025-08-04T18:45:56Z")

</div>

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**

---

<div class="post-metadata">

**Author:** ![Luffy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/luffy/32/3888_2.png) [@Luffy](https://community.crewai.com/u/Luffy)\
**Post date:** [April 17, 2026, 4:19am UTC](https://community.crewai.com/t/crewai-flow-infinite-loop-steps-repeating-endlessly/6780/2 "2026-04-17T04:19:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Adam\_Tall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/adam_tall/32/2159_2.png) [@Adam\_Tall](https://community.crewai.com/u/Adam_Tall)\
**Post date:** [May 5, 2026, 10:45pm UTC](https://community.crewai.com/t/crewai-flow-infinite-loop-steps-repeating-endlessly/6780/3 "2026-05-05T22:45:30Z")

</div>

“Interesting, I’ve seen similar loop issues tied to dependency mismatches rather than flow logic.  
Did you compare your working env vs the new one (LiteLLM / CrewAI versions)?”
