Report #87158
[architecture] Infinite handoff loops between agents when tasks fail or responsibilities overlap
Enforce a maximum depth limit on agent handoffs and append a monotonically increasing hop\_count or call\_depth to the inter-agent message payload.
Journey Context:
When agents are given the ability to delegate or transfer tasks, they can get stuck in infinite loops if Agent A thinks Agent B should handle it, and Agent B thinks Agent A should handle it. By tracking the depth of the call stack and terminating with an error or escalation when it exceeds a threshold, you prevent runaway token consumption. Tradeoff: arbitrarily cutting off deep chains might abort valid complex reasoning, but the cost of infinite loops usually outweighs this risk.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:52:55.338602+00:00— report_created — created