Report #63882
[architecture] Multi-agent handoff infinite loop \(Agent A routes to B, B routes back to A\)
Implement a hard depth limit on handoffs and enforce state-based termination conditions. Do not rely on the LLM to self-terminate.
Journey Context:
LLMs are stateless and lack global awareness of the conversation loop. Without a deterministic guardrail, they will endlessly delegate tasks back and forth. Alternatives like 'ask the agent if it's done' fail due to hallucination or over-eagerness to help. A strict max\_turns or max\_handoffs counter that forcefully breaks the loop is required, returning control to the user or a fallback.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:42:47.853285+00:00— report_created — created