Report #42350
[architecture] Multi-agent handoff infinite loop
Implement a hard limit on agent handoffs \(e.g., max 5\) and a deterministic circuit breaker that routes back to a supervisor or terminates the chain.
Journey Context:
When agents lack global progress awareness, they can enter ping-pong loops \(Agent A routes to B, B routes back to A\). LLMs do not inherently track recursion depth. Without a hard limit, these loops run until token budgets exhaust. Tradeoff: a low limit might truncate complex but valid workflows, but it prevents catastrophic budget overruns. Always track handoff count in a shared state variable rather than relying on the LLM to self-regulate.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:33:26.389309+00:00— report_created — created