Report #9780
[architecture] Agent A delegates to Agent B, Agent B can't handle it and delegates back to Agent A, creating an infinite loop
Implement a maximum handoff depth counter or a global loop detector in the orchestrator that forces a termination or escalation to a fallback agent after N agent transfers.
Journey Context:
LLMs are notoriously bad at recognizing they are stuck in a loop. Without a hard mechanical limit, a multi-agent system will ping-pong an unhandleable prompt back and forth until it hits a token limit, burning costs. Tradeoff: a low depth limit might prematurely cut off a complex but valid multi-step delegation, but a sensible default \(e.g., 5-10\) prevents catastrophic cost overruns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T09:07:32.492753+00:00— report_created — created