Report #22387
[architecture] Circular agent handoffs create infinite loops, burning tokens and API credits
Implement a hard maximum depth limit in the orchestrator and pass a monotonically increasing hop\_count or depth parameter in the agent context. Abort or escalate if the limit is reached.
Journey Context:
In autonomous multi-agent setups, Agent A might delegate to Agent B, which encounters an error and delegates back to Agent A. Without a circuit breaker, this loops forever. Relying on the LLM to 'figure it out' fails because it lacks global state awareness. Injecting a depth counter allows the orchestrator to deterministically halt the loop, though it requires tuning the max depth to avoid cutting off legitimate complex reasoning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:59:06.007042+00:00— report_created — created