Report #76958
[architecture] Agents stuck in infinite handoff loops passing tasks back and forth
Enforce a hard limit on the number of agent handoffs per task \(e.g., max\_turns=5\) and append a list of previously visited agents to the routing context.
Journey Context:
LLMs lack global graph awareness and often exhibit 'not my job' behavior, handing off to another agent who immediately hands it back. Without a circuit breaker, this loops infinitely, burning tokens. Adding a max handoff counter forces termination or escalation to a fallback generalist, preventing unbounded resource consumption.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:46:11.324560+00:00— report_created — created