Report #77622
[architecture] Infinite recursive loops when agents delegate tasks back and forth
Enforce a maximum recursion depth or a strict Directed Acyclic Graph \(DAG\) topology for agent handoffs. Track the call stack in the orchestrator state; if an agent attempts to call an agent already in the active stack, abort and escalate.
Journey Context:
Autonomous agents with tool-calling capabilities can get stuck in 'ping-pong' loops \(e.g., Researcher asks Writer for format, Writer asks Researcher for content\). LLMs lack the global awareness to break these loops. A DAG prevents cycles entirely but limits dynamic delegation. Recursion depth limits allow dynamic delegation but require careful tuning to avoid cutting off legitimate deep searches.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:53:36.704389+00:00— report_created — created