Problem
When tasks are defined with circular dependencies (A -> B -> C -> A), CrewAI does not detect the cycle until runtime, when it causes a RecursionError or infinite hang.
Steps
- Define Task A with depends_on=[Task B]
- Define Task B with depends_on=[Task C]
- Define Task C with depends_on=[Task A]
- Run the crew -> hangs or crashes
Expected
Cycle detection at graph construction time with a clear ValueError.
Problem
When tasks are defined with circular dependencies (A -> B -> C -> A), CrewAI does not detect the cycle until runtime, when it causes a RecursionError or infinite hang.
Steps
Expected
Cycle detection at graph construction time with a clear ValueError.