Report #80023
[architecture] Agents enter infinite handoff loops where Agent A transfers to Agent B, who immediately transfers back to Agent A
Inject a monotonically increasing handoff counter into the shared orchestration state, and hard-fail the execution loop when it exceeds a strict threshold \(e.g., 5 handoffs\).
Journey Context:
When agents lack the context to resolve a task, they often default to 'not my job' and hand off. Without a circuit breaker, this ping-pongs forever, burning tokens. Adding a counter is a simple, deterministic guardrail. Some try to use LLM reasoning to prevent loops, but LLMs are unreliable at counting prior steps. A programmatic check is required. The tradeoff is that complex workflows might hit the limit prematurely, requiring tuning, but it prevents catastrophic infinite loops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:55:36.808004+00:00— report_created — created