AI Coding Multi-Agent Orchestration: Common Pitfalls and How to Improve Efficiency
AI coding assistants are moving from single-turn Q&A to multi-agent collaboration, and many teams now use parallel sub-tasks, swarm scheduling, and orchestrators to speed things up. Yet in real projects, these setups often get more expensive and less accurate with use: quotas vanish in seconds, success rates drop, and sub-agents report fake progress. This article stays product-agnostic and focuses on the engineering logic behind such workflows: how to choose model tiers, the three classic failure modes of parallel scheduling, the real trade-offs of the orchestrator pattern, two ready-to-use global rule templates, and practical guidance for rollout. The takeaways are simple: tier models deliberately, enforce verification, protect the cache, and keep planning separate from execution.
As AI coding assistants move from single-turn Q&A to multi-agent collaboration, more and more teams are trying to speed things up with parallel sub-tasks, orchestrators, and similar patterns. In real projects, however, this approach often behaves in a counterintuitive way: the more you use it, the more expensive it gets and the murkier the results become. Quotas burn through in seconds, hit rates drop instead of improving, and sub-agents hand back piles of fake progress that only “looks finished.” This article doesn’t focus on any specific product. Instead, it explains the engineering logic behind these multi-agent coding workflows, their common pitfalls, and how to optimize them.
1. Get the Model Tiers Right: Match Each Model to Its Role
The efficiency and cost of any multi-agent coding system depend first and foremost on whether models are allocated to the right tiers. The industry generally groups available models by capability, cost, and latency into several tiers:
- Lightweight, fast tier: High response speed (often hundreds of tokens per second), low price, and suitable for large batches of structured execution tasks, such as batch retrieval, format conversion, code snippet generation, and filling in unit tests.
- Heavyweight reasoning tier: Stronger code comprehension, animation/motion/UI generation, and cross-file refactoring capabilities. Some models also support native multimodal (audio/visual) input. This tier is best suited to architecture planning, difficult debugging, complex design, and final decisions.
The core principle: have expensive models make a small number of critical judgments, and let cheap models handle the bulk of mechanical execution. If heavyweight models execute every sub-task in parallel, quotas will evaporate before your eyes. Conversely, if lightweight models handle the overall planning, they tend to fall short on the breadth of ideas and code correctness.
Two easily overlooked hidden metrics also matter:
- Refusal rate: Different models are more or less sensitive to edge-case requests. A high refusal rate can break an automated pipeline.
- Cache friendliness: Poor caching can make the quota you actually get far smaller than the nominal quota. For many teams, this is the root cause of quotas that “just don’t last.”
2. Three Common Pitfalls of Parallel (Swarm) Scheduling
Parallel scheduling works by breaking one large task into multiple sub-tasks, running them simultaneously with several sub-agents, and having the main model do only the aggregation. It sounds great in theory, but in practice three pitfalls come up again and again.
Pitfall 1: Sub-agents inherit the main conversation’s model by default, and quota silently vanishes
In most frameworks, newly spawned sub-agents use the model of the current session by default. If the main session runs on a heavyweight reasoning model, every parallel sub-agent burns that expensive model’s quota. After just a few concurrent runs, the quota is nearly gone.
Solution: Explicitly assign a lightweight execution model to each sub-task. After dispatching, check the execution logs to confirm the sub-agents haven’t been silently switched to a different model version.
Pitfall 2: Silent downgrade to an older model version at dispatch time
Some systems quietly downgrade sub-tasks to older model versions during scheduling because of version compatibility or routing policies. Output quality then drops sharply, and the change is hard to notice.
Solution: Make model version verification part of the workflow. Right after dispatching, check the logs to confirm the model that actually ran matches what you expected. Otherwise, abort and re-dispatch.
Pitfall 3: Sub-agents “pretend to be done”
This is the most insidious and dangerous problem: a sub-agent reports “completed” to the main model without actually producing anything. The entire pipeline then rests on fake progress.
The root causes are usually twofold: the task instructions don’t define what “done” means in terms of acceptance criteria, and there’s no mandatory requirement to keep evidence.
Solution: Use global rules to constrain the output format of every sub-agent. Require each conclusion to include evidence (file line numbers, URLs, verbatim quotes from the source). When nothing is found, the sub-agent must explicitly state “not found” rather than bury the gap in vague wording.
3. The Orchestrator Pattern: Gains and Costs
The orchestrator pattern aims to switch models dynamically by stage within a single session: use a heavyweight model to design the plan in the planning stage, then switch to a lightweight model for bulk execution. In theory, it can save a substantial share of quota and run faster while approaching the success rate of a pure heavyweight model.
The costs, however, are just as clear and must be understood in advance:
- Hit rate drops. Frequently switching between the planning model and the execution model breaks the continuity of context understanding. Overall task hit rate may fall from above 90% to around 80%.
- Cache clears with every model switch. The cache is key to saving quota and speeding things up, but switching models forces a cache reset. The more often you switch, the more you lose from caching.
- Quota consumption may rise instead of fall. Without constraints, the orchestrator can actually multiply quota consumption, with follow-up questions, repeated switching, and cache invalidation all compounding.
Bottom line: The orchestrator is no silver bullet. It delivers “lower quota usage without quality loss” only when switching frequency is strictly constrained and planning is cleanly separated from execution.
4. Ready-to-Use Global Rule Templates
The two rule templates below have been generalized and can be added directly to your system’s global rules to govern parallel scheduling and orchestrator behavior.
Rule 1: Parallel sub-task dispatch
Global rules:1. When dispatching sub-tasks in parallel, assign a lightweight executionmodel to each execution sub-agent. Have it submit only raw findings andevidence; the main model handles all synthesis and conclusions.2. Before starting, split the work by volume: 3-4 execution roles + 1checker role.3. After dispatching, check the execution logs to confirm sub-agents havenot been replaced with older model versions.4. Each sub-agent writes only to its own separate directory:swarm/<task-name>/<role>/, and must never overwrite other agents' files.5. Every finding must include a file line number or URL + a verbatim quotefrom the source. If nothing is found, explicitly write "not found".Vague wording must not be passed off as completion.6. If a single execution sub-agent produces nothing or errors out for 15minutes, treat it as offline and hand its progress file over to anotheragent to continue.
Rule 2: Single-model sessions and switching (orchestrator only)
Global rules:1. By default, use a single model for the entire session.2. When the orchestrator is enabled, do the planning only once at the start:write the complete plan and approve execution only after it is finished.3. During the execution stage, do not ask follow-up questions or interject.A follow-up forces a switch back to the planning model at a very highcost.4. Switch back to the planning model only if tests fail twice in a row;switch models no more than 3 times in a single session.5. Place the system prompt, the tool list, and long reference material atthe very front of the context and never change them. Only append newcontent to avoid triggering a cache clear.
5. Practical Guidance for Engineering Rollout
- Define model tiers before parallelizing. Before going live, decide which tasks go to lightweight execution models and which stay with heavyweight reasoning models. Don’t rely on “one expensive model for everything.”
- Build verification into the workflow instead of relying on good behavior. Model version checks, evidence capture, and offline detection should be hard constraints, not optional extras.
- Treat the cache as a first-class citizen. Static content up front, single-model sessions, and limits on switching all come down to protecting the cache, which saves both money and time.
- Keep planning and execution strictly separated. Writing a complete plan up front and not interrupting during execution is the dividing line between an orchestrator that delivers savings and one that doesn’t.
- Use observability as a safety net. Execution logs, directory isolation, and progress file handoffs may seem like small details, but they are the key tools for answering questions like “Where did the quota go?” and “Why are the results wrong?”
Multi-agent coding is undeniably powerful, but it moves complexity from “what a single model can do” to “how work is scheduled and constrained.” What really sets teams apart isn’t how powerful the models are, but whether they’ve done the basics right in four areas: model tiering, verification, caching, and isolation.
