Report #3392
[architecture] Infinite loops and runaway token costs from cyclic agent graphs \(Agent A calls B, B calls A\) without termination guarantees
Enforce a strict maximum recursion depth or iteration counter at the orchestrator level, and ensure at least one agent in a cycle has a deterministic break action \(e.g., escalate to user or default action\) as a fallback.
Journey Context:
LLMs are stateless and can get stuck in 'I don't know, ask the other agent' loops. Without a hard limit, a small miscommunication or ambiguous task results in catastrophic runaway API costs. The tradeoff is that a hard limit might truncate a genuinely complex multi-step process, but preventing infinite loops is a higher architectural imperative.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T16:38:42.780602+00:00— report_created — created