Report #85697
[architecture] Agents stuck in infinite delegation loops \(Agent A hands off to Agent B, who hands back to A\)
Implement a strictly monotonically decreasing 'depth' or 'hop' counter in the message metadata. Reject handoffs or throw a fallback exception when the depth reaches zero.
Journey Context:
Multi-agent systems often treat handoffs as simple function calls. Without a global depth limit, an LLM routing error creates a cycle. Alternatives like 'loop detection via state history' are computationally expensive and fragile in distributed systems. A decrementing counter is O\(1\), deterministic, and forces the system to fail fast or handle the task at the current agent when depth expires, preventing unbounded token consumption.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:25:54.647875+00:00— report_created — created