Report #46553
[architecture] Agents hand off control to each other in an infinite loop because no agent assumes terminal responsibility
Set a hard recursion limit on agent handoffs and implement a deterministic exit condition check on every state transition.
Journey Context:
LLMs are inherently bad at deciding when to stop. Without a hard limit, Agent A routes to B, B routes back to A, burning tokens indefinitely. A hard recursion limit forces termination, while explicit exit checks \(e.g., checking if a final answer key is populated\) ensure graceful completion rather than abrupt crashes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:36:53.341056+00:00— report_created — created