The Pain
You split your system into three agents — content, email, audit — and a week later they give you three different answers about the same fact. Nobody lied; each one just guards its own context. One fact, N contexts, N versions. This is context inconsistency, and it is the #1 reason multi-agent pilots fail.What You'll Learn
- The four real liabilities of multi-agent systems (cost, tracing, context, failure rate)
- Three battle-tested moves, in priority order: don't split (scene routing), wrap with deterministic code (the sandwich pattern), and only then add a Supervisor
- A decision ladder for when multi-agent is actually worth it
- Why "avoid multi-agent early" is engineering discipline, not conservatism
Opening: A Week Later, My Three Assistants Gave Three Answers About the Same Thing
Last month I split my system into three agents: one for content, one for email, one for audit. The night I finished, I was excited — each doing its own job, multi-agent collaboration, very "2026."
A week later I cooled off. The three agents gave three versions of the same fact: the content agent said "this article is published," the email agent said "not sent yet," and the audit agent said "nothing in the draft box." Nobody was lying — they were each guarding their own context. One fact, N contexts, N versions.
This is not just my problem. In beam.ai's research, 40% of multi-agent pilots fail within 6 months; Shopify engineer Micheal Lanham wrote in What Actually Survived: "Avoid multi-agent early"; Atlan's post-mortems of failed multi-agent projects list context inconsistency as the #1 cause. The counter-consensus of top teams is: multi-agent is not the default.
So where is the real boundary between a single agent and a group of agents? This article answers it with three approaches I actually ran: don't split first, wrap with deterministic code second, and only bring in a Supervisor last.
1. See the Debt First: Multi-Agent Buys You Four Pitfalls, Not Capability
Let me lay out the four liabilities I accumulated over more than a year of running these systems. Every one of them has a real record behind it:
Liability one: context inconsistency — the #1 cause of failure. Atlan analyzed a large number of multi-agent deployments, and the conclusion was not "the model is not strong enough" but "contexts diverge": each agent carries its own context, and once a task runs, their understanding of "current state" has already forked. My opening scene is a live example.
Liability two: token cost multiplies. Augment Code's build-vs-buy analysis found multi-agent setups consume roughly 5x the tokens of a single agent. The same fact has to be written into every context — of course the cost grows.
Liability three: no tracing means debugging blind. Agents call each other, and when something fails you cannot tell which hop broke. Teams building observability — MLflow, FutureAGI — all stress the same point: without tracing, a multi-agent system is effectively un-debuggable.
Liability four: the failure rate is scary. beam.ai's data: 40% of multi-agent pilots fail within 6 months, and the reasons concentrate in the three liabilities above.
So I made the opposite call to the default assumption that "multi-agent is advanced": multi-agent is a liability, not an asset. It is only worth it when it buys deterministic returns. Below are the three moves I actually ran, in priority order.
2. Move One: Don't Split — Scene Routing Makes One Agent Specialized
The first move is not splitting agents. It is splitting one agent into 6 "scene experts."
The idea comes from microservices: you don't need one monolith handling every request — you use an API gateway to route to the right backend. Scene routing is the Agent's "API gateway": every request first enters task_dispatcher.classify(), and once the scene is decided, only that scene's tool whitelist, SOP, and output schema are injected.
SCENE_CONFIG = {
"email": {
"tools": ["imap_fetch", "smtp_send", "contact_lookup"], # tool whitelist
"sop": "sops/email_sop.md", # scene SOP injection path
"schema": "schemas/email_schema.json",
},
"quoting": {
"tools": ["rate_query", "quote_template", "history_lookup"],
"sop": "sops/quoting_sop.md",
"schema": "schemas/quote_schema.json",
},
# other scenes: report / contact / finance / knowledge
}
At runtime, every request enters the classifier first, then executes under the scene whitelist:
# Step 1: classify (regex covers 90%, semantic fallback covers 10%)
scene=$(python3 task_dispatcher.py classify "check freight from Shanghai to New York")
# Step 2: inject the scene SOP and tool whitelist
bash inject-sop.sh "$scene"
The key is that sentence in the comment: tools not on the whitelist are never even loaded. The email scene cannot touch database writes; the finance scene cannot send email. These 6 experts share one context, yet each only sees its own tools and SOP — it is still "one agent," just constrained into "six rooms."
✅ Verified: after scene isolation, tool mis-selection dropped from 15% to below 2% (runtime log stats); context length shrank 60%; tool-call accuracy rose 40%.
🩸 Pitfall: initially I gave the LLM all 20+ tools to roam free, mis-selection was 15% — wrong 1 in 5 calls. The model isn't dumb; "pick 1 tool out of 20" is simply outside a probabilistic model's comfort zone.
💼 Value: zero new agents, zero state-sync cost, only a routing layer changed — "omni-potent illusion" became "specialized reliability."
▸ Cognitive shift: specialization is not achieved by more agents; it is achieved by constraints. Six rooms are still the same building.
3. Move Two: Deterministic Code Wraps Around — Composite Tasks Go to a Flow Container
Scene routing cured single-scene tasks. Composite tasks hit back. One report contained email triage, status queries, receivables, and follow-up suggestions — I initially treated it as a "report scene," gave it full tools and free rein, and the output was hit-or-miss: sometimes emails were missing, sometimes follow-ups were duplicated.
The turning point was accepting this feedback: a scheduled task where the LLM roams free is inherently unstable. So I rebuilt the report as a five-stage pipeline:
① Gather → ② Split → ③ Dispatch → ④ Execute → ⑤ Report
def generate_report(period):
# ① Gather: read everything (script, no classification, no judgment)
raw_data = fetch_inbox(period) + fetch_events(period)
# ② Split: break into independent work units by ticket/topic
work_units = split_into_units(raw_data)
# ③ Dispatch: route to each scene handler
dispatched = {}
for unit in work_units:
scene = classify_unit(unit) # reuse the scene classifier
dispatched.setdefault(scene, []).append(unit)
# ④ Execute: pure script per scene (no_agent)
results = {s: process_scene(s, units) for s, units in dispatched.items()}
# ⑤ Report: the LLM only does the final assembly
return llm_assemble(results)
This is the "sandwich pattern": deterministic code wraps around a probabilistic LLM. Scanning email, splitting units, doing stats — scripts do these dirty jobs fast and accurately; the LLM only assembles structured data into natural language at the very last step. The whole flow still has exactly one agent context, but LLM involvement is compressed to the minimum.
✅ Verified: after the rebuild, report stability went from ~60% to ~95%, data sources are traceable, output format is uniform.
🩸 Pitfall: the five stages add ~30% latency over a single scene. Is it worth it? For production tasks that run daily on a schedule and must be accountable, stability is worth far more than speed.
💼 Value: the LLM's role changed from "report writer" to "SOP executor" — probability is locked in a cage.
▸ Cognitive shift: reducing the number of LLM calls is itself the cheapest multi-agent alternative. You don't need a second agent; you need the first agent to do less.
4. Move Three: When You Really Need Collaboration — Supervisor, One Manager + N Workers
The first two moves cover 90% of scenarios. The remaining 10% genuinely needs multiple roles in parallel — and only then does multi-agent come in. But even then, it is not "peer-to-peer collaboration."
Peer collaboration has three pitfalls, and I hit all of them: who goes first (three agents start at once and wait on each other), who arbitrates (two agents give different readings of the same data), and who backs up (a worker fails and nobody owns the task — it hangs).
The fix is a Supervisor architecture: one "manager agent" only decomposes, schedules, coordinates, and backs up — it does no work. N "worker agents" only do their own specialized job — they make no decisions.
class SupervisorAgent:
def handle(self, user_request: str):
plan = self.plan(user_request) # LLM decomposition: which Workers, what order
results = {}
for step in plan: # schedule in order, feed previous result forward
step["params"].update(results)
result = self.workers[step["worker"]].handle(step["action"], step["params"])
results[step["action"]] = result
if not result["ok"]: # failure backstop: retry or degrade
return self.fallback(step, result)
return results
My own multi-assistant system (content, email, audit) eventually converged to this shape: scheduling is the only decision point; workers never talk to each other directly. The only channel between workers is the structured result passed by the Supervisor — not shared context — which sidesteps context inconsistency entirely.
✅ Verified: after the Supervisor went live, cross-agent task failure went from "nobody owns it" to "there is a backstop," and task stall rate dropped to zero.
🩸 Pitfall: the Supervisor's prompt is the most expensive text in the system — when it breaks, everything below breaks. Write it as a fixed SOP first, then open it up.
💼 Value: the risk of multi-agent is converged into a single scheduling point; everything else stays predictable and auditable.
▸ Cognitive shift: the correct way to use multi-agent is as the last process in the pipeline, not the first reaction.
5. The Decision Boundary: When Should You Actually Go Multi-Agent
Ordering the three moves from lowest to highest cost gives me my decision ladder:
- Level 1: Single Agent + Scene Routing. If the task can be classified by scene, use this. Lowest cost, fastest return.
- Level 2: Flow Container (Sandwich). The task is composite but orchestrable. Add deterministic code, not headcount.
- Level 3: Supervisor + Workers. Only when the task must run in parallel and each role needs an independent context. Each level up: contexts +1, state-sync cost and debugging difficulty multiply.
For whether to go Level 3, I ask one question: "Would two contexts each doing their own work and then merging results be clearly better than one context doing the whole job in sequence?" If I can't answer yes, I stay at the current level.
Going Deeper: The Consensus Against Consensus Is Engineering Discipline
Why does Shopify dare to say "avoid multi-agent early" publicly? Because complexity should follow workload, not hype. Multi-agent is not "more advanced" — it is "more expensive, harder to debug, and more likely to fork contexts." Its value only materializes when the condition "parallel independent contexts" is genuinely true.
This also explains why context inconsistency is the #1 cause of failure: multi-agent's essence is splitting one problem across multiple contexts, and consistency between contexts requires continuous sync — sync is entropy; without maintenance, it forks. Single agent + constraints (tool whitelist, scene SOP, deterministic wrapping) is essentially using constraints to eliminate the need for sync: with only one context, there is nothing to sync.
So "avoid multi-agent early" is not conservatism — it is engineering discipline: first let one agent eat as much determinism as it can, then use orchestration for composite scenes, and only finally use multi-agent for real parallelism. Every step answers the same question: is this state-sync bill worth paying?
Closing
What you learned today is three moves, single-first: scene routing makes one agent specialized (mis-selection 15% → 2%), the sandwich pattern wraps with deterministic code (report stability 60% → 95%), and a Supervisor converges multi-agent into a single scheduling point. Plus one decision mantra: complexity follows workload, not hype.
Action items — you can do these tonight:
# ① List all your agent's tools, group them by scene, keep only the current scene whitelist
# ② Find your most unstable composite task and split its execution into a five-stage pipeline
# ③ Only when a real "must run in parallel" need appears, draw the Supervisor architecture
Do these three steps and you'll find that most "multi-agent needs" disappear at step ①.
Next time, we zoom out: as the foundation (models, frameworks, protocols) converges, where is the real battlefield of Agent competition — When the Foundation Converges, Production Systems Are the Answer: The Real Battlefield of Agent Competition in 2026.
About the author: Wu Ji (无记) — AI & digitalization practitioner focused on Agent engineering, Loop Engineering, and digital transformation. Practical, hands-on tutorials — follow along and it just works.
Further Reading
- Previous article — The Observability Trio in Production: Gate, Audit, and Correction Turn Incidents into Rules: https://dev.to/weiwuji/the-observability-trio-in-production-gate-audit-and-correction-turn-incidents-into-rules-13f3
- Golden Dataset: Turn Agent Regression Testing into a CI Gate: https://dev.to/weiwuji/golden-dataset-turn-agent-regression-testing-into-a-ci-gate-3pkm



Top comments (0)