Report #21177
[architecture] Agents delegating tasks back and forth on failure create infinite loops and exhaust token limits
Enforce a monotonically decreasing 'depth' or 'budget' counter in the inter-agent message contract. If the counter hits zero, force an escalation or failure instead of another delegation.
Journey Context:
In recursive agent architectures, if Agent B can't find an answer, it might delegate back to Agent A with 'I couldn't find it, you try.' Agent A tries again, looping infinitely. Developers forget that LLMs lack global loop detection. By injecting a remaining\_depth integer into the message schema, every agent must decrement it before delegating. If remaining\_depth == 0, the agent must handle the error locally or raise it to the user. Tradeoff: Hard limits the maximum problem-solving depth, but prevents catastrophic token burn.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:57:37.456477+00:00— report_created — created