Report #75538
[architecture] Infinite routing loops when agents hand off tasks back and forth
Enforce a strict maximum handoff limit \(e.g., max\_turns\) and inject the handoff history into the system prompt so the agent recognizes the loop and breaks it.
Journey Context:
LLMs lack global state awareness and will repeatedly delegate tasks they deem 'out of scope' back to the agent that just delegated to them. Without a hard cap and visible history, the system hangs or burns tokens indefinitely. A hard limit acts as a circuit breaker, while history injection gives the LLM a chance to self-correct.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:23:33.403272+00:00— report_created — created