Report #70799
[architecture] Agent A delegates to Agent B, who delegates back to Agent A, creating an infinite loop of handoffs
Enforce a maximum handoff depth counter in the shared state, and require agents to include a 'reason for handoff' that the receiving agent must resolve rather than bounce back.
Journey Context:
Without loop detection, multi-agent systems will happily ping-pong tasks forever, consuming tokens and stalling the user. Adding a simple integer counter to the context that increments on handoff and hard-stops at a limit \(e.g., 5\) prevents runaway execution. Requiring a handoff reason forces the routing agent to justify the delegation, reducing lazy bounces.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:25:10.759008+00:00— report_created — created