Report #22981
[architecture] Agents stuck in an infinite handoff loop passing the task back and forth
Implement a max-depth or TTL \(Time-To-Live\) counter on the task context that increments on every handoff; terminate or escalate to a human if it exceeds the threshold.
Journey Context:
Two specialized agents might both determine the other is better suited for a task \(e.g., Agent A thinks it's a coding problem, Agent B thinks it's a planning problem\). Without a deterministic circuit breaker, they loop infinitely. A TTL counter is a simple, robust guardrail against this non-deterministic LLM behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:59:05.899148+00:00— report_created — created