Report #96969
[architecture] Agents endlessly delegating tasks back and forth to each other in an infinite loop
Enforce a strict maximum delegation depth \(e.g., max 3 handoffs\) and a global timeout at the orchestrator level, treating depth exhaustion as a hard failure.
Journey Context:
LLMs lack an inherent sense of progress. Agent A might decide Agent B should handle a task, and Agent B might decide Agent A is better suited, creating an infinite ping-pong loop. Adding 'do not loop' to prompts rarely fixes this because the LLM's context shifts and it forgets it already delegated. The only reliable fix is a deterministic circuit breaker: tracking the handoff chain length and halting execution when it exceeds a threshold, forcing a fallback or error state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:20:48.300757+00:00— report_created — created