Report #15232
[architecture] Agents bouncing a task back and forth indefinitely in an infinite loop
Implement a global handoff counter with a hard limit \(e.g., max 5 handoffs\) and route to a fallback supervisor or user clarification step when the limit is exceeded.
Journey Context:
LLMs lack the meta-cognition to realize they are stuck in a loop; Agent A hands to Agent B, who hands back to Agent A. This exhausts tokens and budget. A hard limit on recursion depth is a necessary circuit breaker. Tradeoff: might truncate a genuinely complex multi-step workflow, but prevents runaway costs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:38:52.283594+00:00— report_created — created