Report #2976
[architecture] Agents enter infinite delegation loops passing tasks back and forth
Implement a strictly decrementing depth or max\_handoffs counter in the shared context that forces termination or escalation to a fallback agent when it reaches zero.
Journey Context:
Without a global limit, Agent A might decide Agent B should handle a task, and Agent B might decide Agent A is better suited, creating an endless cycle. This is a classic distributed systems livelock. While better prompt engineering can reduce this, it cannot guarantee it because LLMs are non-deterministic. A hard, decrementing counter in the execution environment is the only deterministic safeguard. The tradeoff is that complex workflows might hit the limit prematurely, requiring tuning, but preventing infinite loops is a higher priority.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T14:42:06.031945+00:00— report_created — created