Report #52231
[architecture] Infinite handoff loops between agents
Implement a handoff counter or depth limit in the agent context; if the limit is exceeded, route to a fallback agent or terminate the workflow.
Journey Context:
Agents without global state visibility will ping-pong tasks back and forth \(e.g., RefundAgent hands off to PolicyAgent, which hands back to RefundAgent\) when neither can resolve an edge case. Relying on 'smarter prompts' to prevent this fails because LLMs lack deterministic guarantees. A strictly enforced depth limit forces an escape condition. The tradeoff is that a low limit might prematurely abort a valid complex routing, but this is far safer than burning through API tokens in an infinite loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:09:57.631132+00:00— report_created — created