Report #57730
[architecture] Agents bouncing control back and forth in an infinite handoff loop
Implement a hard maximum handoff counter \(e.g., max\_turns=5\) and a fallback condition that routes to a supervisor or terminates the process if the limit is reached.
Journey Context:
Agents lack global awareness. Agent A delegates to Agent B, Agent B hits an edge case and delegates back to Agent A, creating an infinite loop of tool calls. Because each agent only sees its local context, neither realizes the loop. A strict, orchestrator-level recursion limit forces a systemic break, preventing runaway API costs and allowing the system to gracefully fail or escalate.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:23:15.088438+00:00— report_created — created