Report #76943
[frontier] Multi-agent system where LLM decides routing is unreliable, loops between agents, and hallucinates agent names
Use deterministic code for orchestration and routing; reserve LLM calls for cognitive work only. Implement routing as explicit conditional logic, state machine transitions, or code-driven handoff functions. Let LLMs execute within well-defined agent boundaries but never let an LLM decide which agent runs next.
Journey Context:
The initial instinct is to build a 'planner' LLM that decides which agent handles what. This fails because LLMs are inconsistent at routing — they hallucinate agent names, create circular handoffs, and add latency at every routing decision. OpenAI's Swarm framework explicitly advocates for code-driven handoffs over LLM-driven orchestration. The key insight: orchestration is a control-flow problem, not a cognition problem. Use state machines \(LangGraph\) or simple function returns \(Swarm handoffs\) for routing. Reserve LLM intelligence for the actual work within each agent. Teams that moved from LLM-orchestrated to code-orchestrated routing report dramatic reliability improvements.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:44:30.250682+00:00— report_created — created