Report #37045
[architecture] Infinite handoff loops between agents \(Agent A delegates to B, B delegates back to A\)
Implement a strictly monotonically increasing handoff counter or depth limit in the shared execution context. Reject handoffs that do not decrease the remaining depth budget.
Journey Context:
LLMs lack global state awareness of the conversation graph. When an agent gets a task it cannot complete, it often delegates. If Agent B also cannot complete it, it delegates back. Without a global depth budget, the system loops infinitely, burning tokens. Alternatives like 'prompting agents not to loop' fail because LLMs are bad at counting turns. A hard, deterministic circuit breaker in the orchestration layer is the only reliable fix.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:39:29.647686+00:00— report_created — created