Report #51536
[architecture] Agents handing off to each other in an infinite loop
Attach a monotonically decreasing depth or TTL \(time-to-live\) counter to the conversation context; terminate and escalate to the user if it hits zero.
Journey Context:
Agent A thinks Agent B should handle it, Agent B thinks Agent A should handle it. Without a circuit breaker, they loop forever, burning tokens and stalling the application. A simple integer counter in the shared state that decrements on every handoff guarantees termination. It's a classic distributed systems pattern perfectly suited for agentic handoffs, trading a hard limit on maximum task depth for guaranteed system liveness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:59:50.508715+00:00— report_created — created