-
Notifications
You must be signed in to change notification settings - Fork 4
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Summary
A warning appears in the console related to workflow validation cycles:
[2025-11-01 15:05:04 - /Users/govindk/code/work/ip/ignite-build/spec-to-agents/.venv/lib/python3.13/site-packages/agent_framework/_workflows/_validation.py:482 - WARNING] Cycle detected in the workflow graph involving: logistics -> catering -> budget -> venue -> event_coordinator -> logistics. Ensure termination or iteration limits exist.
Details
- The warning is triggered by the workflow validation code in the
agent_frameworkpackage (see below). - The validation logic uses a cycle detection algorithm in
WorkflowGraphValidator._validate_cycles()and warns if cycles are detected among workflow executors. - The cycle in my workflow involves:
logistics -> catering -> budget -> venue -> event_coordinator -> logistics.
Source code (validation logic)
# (see full source in agent_framework/_workflows/_validation.py)
# ...
class WorkflowGraphValidator:
...
def _validate_cycles(self) -> None:
...
logger.warning(
"Cycle detected in the workflow graph involving: %s. Ensure termination or iteration limits exist.",
formatted_cycles,
)Expected Behavior
Workflow cycles should either be handled with clear termination conditions or have explicit iteration limits to prevent infinite loops.
Steps to Reproduce
- Construct a workflow graph with the following nodes: logistics, catering, budget, venue, event_coordinator, logistics (cycle).
- Run validation (or initialize the workflow).
- Observe warning in the console.
Additional Notes
- Need to review workflow logic and ensure all cycles have proper termination or iteration limits.
- See
WorkflowGraphValidator._validate_cyclesfor the logic that triggers this warning.
If you need more information or a reproduction case, let me know!
Copilot
Metadata
Metadata
Labels
bugSomething isn't workingSomething isn't working