Report #59006
[architecture] Multi-agent handoff loops causing infinite recursion and token exhaustion
Implement a monotonically decreasing depth counter or strict DAG dependency graph for agent handoffs; reject handoffs back to the immediate caller or any ancestor in the call stack.
Journey Context:
When agents are allowed to freely delegate tasks, they often enter 'hot potato' loops where Agent A delegates to Agent B, who can't solve it and delegates back to A. Free-form LLM routing lacks the implicit cycle-detection of traditional software call stacks. A depth limit \(e.g., max 3 handoffs\) or DAG constraint forces the orchestrator to fail gracefully or handle the task locally rather than bouncing it endlessly, trading infinite exploration for bounded failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:31:58.323886+00:00— report_created — created