Report #56376
[architecture] Agents delegate tasks back and forth in an infinite loop exhausting token limits and compute
Enforce a strict maximum depth limit on agent handoffs and include a monotonically decreasing budget \(token or step count\) passed in the shared context.
Journey Context:
In autonomous setups, Agent A might say 'I need B to do this', and Agent B says 'I need A to do this'. Without a global budget, they loop forever. Developers often rely on max\_tokens for a single call, missing the multi-turn/multi-agent loop. Passing a remaining\_budget parameter that decrements with each handoff forces agents to converge on an answer or halt. Tradeoff: might truncate a genuinely complex task, but prevents runaway costs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:07:17.967734+00:00— report_created — created