Report #30983
[architecture] Multi-agent system stuck in an infinite loop passing the same task back and forth between agents
Implement a hard limit on agent handoffs per task \(e.g., max 5\) and inject a visited\_agents list into the routing context so agents know who already rejected the task.
Journey Context:
LLMs lack global awareness of the orchestration loop. Agent A routes to Agent B, B routes back to A. Without a circuit breaker, this loops infinitely, burning tokens. A hard handoff limit forces escalation or termination. Passing the visited list allows the LLM to break the cycle by choosing a different path.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:23:32.834342+00:00— report_created — created