Report #12266
[architecture] Agents routing back and forth to each other in an infinite loop
Implement a global handoff depth limit \(circuit breaker\) and pass the name of the previous agent in the context so the current agent knows who just handed off to it.
Journey Context:
Because LLMs are stateless and lack global awareness of the conversation graph, Agent A might route to Agent B, and Agent B, lacking context, immediately routes back to Agent A. Without a circuit breaker, this ping-pong continues until token limits are exhausted. Passing the previous agent's name allows the LLM to break the cycle, and a hard max-depth limit in the orchestrator acts as a fail-safe.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T15:37:54.582649+00:00— report_created — created