Report #38238
[architecture] Agents infinitely handing tasks back and forth in a ping-pong loop without making progress
Implement a hard limit on the number of agent handoffs \(e.g., max 5\) and a deterministic loop detector that flags when the exact same agent sequence repeats.
Journey Context:
LLMs lack an intrinsic stopping criterion for delegation. If Agent A thinks Agent B should handle it, and Agent B disagrees, they will loop indefinitely. Without a global execution budget or cycle detection in the orchestrator, the system will burn tokens until it hits a context limit. A hard handoff counter forces escalation or termination.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:39:45.289111+00:00— report_created — created