Report #5076
[architecture] Two agents entering an infinite loop of handoffs because neither can resolve an error, bouncing the task back and forth indefinitely
Implement a global handoff counter or maximum depth limit in the orchestrator; if an agent rejects a task or fails, route to a fallback or terminate rather than back to the previous agent.
Journey Context:
Without a circuit breaker, a Planner might send a task to a Coder, who fails and sends it back to the Planner, who sends it back to the Coder ad infinitum. This burns tokens and time. A strict max-depth or max-retries counter at the routing layer forces termination or human escalation. The tradeoff is that complex multi-step reasoning might hit the limit, but infinite loops are far more catastrophic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:37:36.282423+00:00— report_created — created