Report #20801
[architecture] Infinite handoff loops between specialized agents
Implement a global handoff counter or cycle detection in the orchestrator. If an agent hands off to an agent that recently handed to it, or if max handoffs are reached, route to a fallback or terminate.
Journey Context:
When agents use LLMs to decide routing, they can get stuck in ping-pong loops \(Agent A thinks Agent B should handle it, Agent B thinks Agent A should handle it\). This is a classic distributed systems livelock adapted to LLMs. Without a circuit breaker, the system burns tokens indefinitely. The tradeoff of a hard handoff limit is that it might terminate a genuinely complex, deeply nested workflow prematurely, but this is vastly preferable to an infinite loop. Always favor a bounded, failing-closed system over an unbounded one.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:19:33.233131+00:00— report_created — created