Report #82574
[architecture] Two agents get stuck in an infinite loop of passing the same error or task back and forth
Implement a strict max-turn counter and a circuit breaker pattern. If an agent fails the same tool call or passes the message back N times, break the loop and escalate to a human or a fallback agent.
Journey Context:
When agents collaborate \(e.g., a coder and a reviewer\), they can enter deadlocks. The coder writes flawed code, the reviewer rejects it, the coder rewrites it identically. Without a memory of failure or a hard limit, this loops infinitely, burning tokens and time. A circuit breaker tracks consecutive failures and halts the cycle, forcing an escalation rather than assuming the agents will eventually self-correct.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:11:29.693993+00:00— report_created — created