Multi-agent orchestration (Gas Town / custom)
How to build systems where specialized agents collaborate - a planner decomposes tasks, workers execute them, and reviewers validate results - to handle complex engineering tasks end-to-end, with the gate that judges the result kept outside the orchestration, where none of its agents can edit it.
- Multi-agent orchestration system (planner-worker hierarchy) is in production
- The agent fleet scales past what a single team could supervise, bounded by compute and review capacity rather than by tooling
- Agent fleet produces 1,000+ commits per week without manual dispatch
- Planner agents decompose epics into tasks and assign to worker agents autonomously
- Agent fleet self-recovers from failures without human escalation for 90%+ of error cases
- Orchestration system dashboard showing planner-worker task flow
- Git history showing 1,000+ weekly commits attributed to agent fleet
- Agent fleet monitoring showing concurrent agent count and error recovery rate
- Development L4 (Coding Agent Usage) - unattended agents must be proven before fleet orchestration
- Infrastructure L4 (Agent Runtime & Sandboxing) - ephemeral devboxes with sub-10s spin-up required
What It Is
Multi-agent orchestration is a system architecture where multiple AI agents with different specializations collaborate to complete complex engineering tasks. Rather than one agent doing everything, responsibilities are distributed: a planner agent decomposes a high-level task into subtasks; worker agents execute those subtasks in parallel; reviewer agents validate the work; an orchestrator manages the pipeline and handles failures. The system produces a complete, tested, review-ready result from a high-level task description.
"Gas Town" refers to an open-source multi-agent framework that implements this architecture. Named after a concept from the post-scarcity AI development world, it provides the scaffolding for agent-to-agent communication, task routing, result aggregation, and failure handling. Custom implementations at companies like Anthropic, Stripe, and Devin follow similar patterns with proprietary extensions.
At L5 (Self-improving), multi-agent orchestration is not a research project - it's how engineering work gets done. The team defines what needs to be built (product requirements, acceptance criteria, architectural constraints); the agent system figures out how to build it (task decomposition, implementation, testing, iteration). Humans review the results and set direction; agents handle the execution at a scale no human team could match.
The critical difference from L4 (parallel agents per developer) is coordination. At L4, a human orchestrates multiple agents manually. At L5, an agent orchestrates other agents autonomously - the planner decides how to decompose the task and which worker to assign each subtask to, without human direction of those choices.
One boundary has to be drawn when the system is designed: the reviewer agents inside the orchestration are part of the system being judged, not the judge. They are spawned by the orchestrator, take their instructions from it, and usually run on the same model and the same infrastructure. They catch mistakes early and are worth having. The gate that decides whether the result merges sits outside: tests the agents did not write for this change and cannot edit, review rules loaded from the base branch, and a merge policy owned by a human. The longer and more autonomous the run, the more this matters, because a system that plans its own work for hours has every file in the repository within reach, including the ones that define what passing means.
Why It Matters
Multi-agent orchestration unlocks the ceiling on what AI-assisted development can achieve:
- Handles complexity beyond single-agent scope - tasks that are too complex for one agent (implement this entire service with auth, persistence, tests, and documentation) are handled by a coordinated team of agents
- True parallelism at scale - dozens of worker agents executing in parallel, coordinated by a planner, can complete in hours what a human team would take weeks to deliver
- Specialization compounds - a reviewing agent trained specifically on your security patterns catches issues that a general-purpose worker agent would miss; specialization produces better results than generalism
- Self-healing pipelines - when a worker agent fails, the orchestrator can reassign the task, provide additional context, or break it into smaller subtasks; human intervention is only needed for genuinely novel failures
- Separates planning from execution - the planner agent can reason about task dependencies, resource allocation, and risk in ways that are difficult when planning and execution are interleaved
In May 2026 multi-agent orchestration shipped as a product default rather than a custom build. Claude Code "dynamic workflows" (announced late May) let a script Claude writes spawn dozens-to-hundreds of subagents under a single run, and Anthropic's Code w/ Claude conference (May 6) introduced fleets, Outcomes, and Dreaming. The practical implication: the L5 orchestration pattern is now buyable, not only something you have to build yourself - though the foundational discipline below still decides whether it pays off. November 2026 extended the list: Google Antigravity added /swarm, which coordinates subagents over a message board for long-horizon tasks, and Dynamic Workflows for orchestrating parallel subagents in Python, while Anthropic pitched Fable 5.2 as an orchestrator that delegates to cheaper models.
That is the context for the gate boundary described above. METR's Q4 2026 update puts the 50% time horizon of the models it measured at about 40 hours (with wide confidence intervals), so an orchestrated run can now work for longer than anyone will watch it. Two November publications show what holds at that length. AWS says AWS Emulator was written entirely by agents organised as three teams (one manages the test suite, one finds issues, one fixes them), and that every fix has to pass a merge gate covering compilation, coding standards, security and fidelity regressions: "Without this merge gate, we wouldn't trust what our agents are building." That is a vendor's account with no independent audit, and the product is a local development and test tool, but the structure is the point: the trust sits in the gate, not in any agent role. The second is a capability demonstration published on LessWrong (November 19; models trained for the purpose, not an observed attack): two sandboxed models served by the same inference server exchanged information through its KV cache, and a colluding monitor waved attacks through. The authors' mitigation applies directly to orchestration design: "running your monitor on a different engine instance than your policy closes nearly every side channel." Independence of the reviewer is a property of where it runs and what it can be told, not of the name of its role.
The prerequisite for L5 multi-agent orchestration is an extremely mature L2-L4 foundation. The planner agent needs accurate context (CLAUDE.md, architecture docs) to decompose tasks correctly. The worker agents need reliable sandboxes and clear task specifications. The reviewer agents need defined quality standards. Without this foundation, orchestration amplifies problems rather than solving them.
Build orchestration incrementally. Start with a two-agent system (planner + one worker) on a single task type before adding reviewers, additional workers, and complex routing. The complexity of multi-agent systems grows faster than the number of agents; earn that complexity with proven simpler configurations first.
Getting Started
- Study existing orchestration frameworks - Read the Gas Town source code, review Anthropic's multi-agent documentation, and study how companies like Stripe describe their internal agent systems. Understand the patterns before building.
- Define your agent roles - At minimum: planner (decomposes tasks), worker (executes subtasks), reviewer (validates output). Each role needs a clear scope, input/output interface, and failure behavior. Write these as specifications before building.
- Build the communication layer - Agents communicate via structured messages (typically JSON). Define your message schema: task specification, subtask assignment, result reporting, failure escalation. This schema is the contract between agents.
- Implement the simplest viable planner - A planner that can decompose "implement endpoint X" into ["write handler function", "write tests", "update routing", "update documentation"] is a meaningful starting point. The planner doesn't need to be perfect; it needs to be good enough that worker agents can execute its subtasks.
- Start with homogeneous workers - Your first workers should all be instances of the same agent (Claude Code) with the same CLAUDE.md context. Specialization (worker agents with different prompts for different task types) comes after the basic pipeline is working.
- Put the gate outside the orchestration - Decide which checks are internal (the orchestration's own reviewer agents, used to catch problems early) and which form the merge gate. The gate runs in CI the agents cannot reconfigure, reads its rules from the default branch, uses tests under human code ownership, and for anything that monitors agent behaviour runs on a separate model deployment from the agents it watches. No agent in the orchestration, including the planner, has write access to it.
- Build the failure handling pipeline - Define: what does a worker failure look like? When does the orchestrator retry vs. escalate to a human? How are partial results handled? Robust failure handling is what separates a production-ready orchestration system from a demo.
Common Pitfalls
Building the full system before validating the components. A multi-agent system is only as good as its weakest agent. If your worker agents produce unreliable results, orchestration amplifies that unreliability. Validate each agent role in isolation before wiring them together. A worker agent that succeeds 70% of the time in isolation will succeed less when coordinated with others due to compounding failure probabilities.
Underestimating orchestration complexity. The planner agent must understand task dependencies, resource constraints, and failure modes. This is significantly more complex than a worker agent that follows a specific task spec. Plan for 2-3x the engineering effort you'd estimate for a single-agent system.
Counting the internal reviewer as the gate. A reviewer agent that the orchestrator spawned and briefed will mostly agree with the orchestrator. If its approval is what lets work merge, the system is approving itself with extra steps. Keep internal review for speed, and make the merge depend on checks none of the orchestrated agents can edit or instruct.
Poor observability into agent behavior. With 10+ agents running in a pipeline, understanding what went wrong requires comprehensive logging. Every agent action, every inter-agent message, every task state transition must be logged with timestamps and correlation IDs. Without this, debugging orchestration failures is nearly impossible.
Context dilution across agent boundaries. When the planner sends a subtask to a worker, how much context travels with it? Too little, and the worker makes wrong assumptions. Too much, and the context window fills with irrelevant information. Context packaging - deciding exactly what context each agent needs for each subtask - is one of the hardest problems in multi-agent system design.
How Different Roles See It
Bob's team has been delivering impressive results with L4 parallel agents, but he's seeing a pattern: the tasks that take the most effort are the ones that require coordination across multiple areas of the codebase. These are exactly the tasks that would benefit from orchestration, but Bob doesn't know if the team is ready for the L5 investment.
What Bob should do: L5 orchestration is a significant infrastructure investment - likely a dedicated 2-4 week engineering project before it produces business value. Bob should only initiate this if the L4 foundation is solid: mature CLAUDE.md files, reliable agent sandboxes, established review protocols, and demonstrated parallel agent workflows. The signal for L5 readiness is when developers say "the bottleneck is no longer implementation - it's the coordination overhead of managing multiple agents." When that statement is consistently true, orchestration automation is the right investment. Bob should frame it as infrastructure engineering: assign Victor to design and build the orchestration layer, with a 6-week timeline and specific success criteria.
Sarah is watching the L5 trend in the industry and wants to understand the ROI before committing to the engineering investment. Multi-agent orchestration sounds transformative but also sounds expensive to build.
What Sarah should do: Sarah's analysis should compare two costs: (1) the engineering investment to build the orchestration system (one-time, 4-8 weeks of engineering time), and (2) the ongoing human coordination cost it replaces (the time senior developers spend orchestrating parallel agents manually at L4). If senior developers are spending 2+ hours per day on agent coordination, an orchestration system that reduces this to 30 minutes of review has a payback period measured in weeks. Sarah should also look at task types: which tasks require the most agent coordination? Those are the candidates for the first orchestration pipeline. A focused first pipeline targeting a high-frequency task type will demonstrate ROI faster than a general-purpose orchestration system.
Victor has been informally acting as the "planner agent" himself - decomposing complex tasks into subtasks, assigning them to different Claude Code instances, and synthesizing the results. He knows this manual orchestration is the bottleneck and wants to automate it.
What Victor should do: Victor should document his manual orchestration process first, before automating it. For the last 10 complex tasks he coordinated: how did he decompose them? What criteria determined subtask assignments? How did he handle failures? What information did he pass to each agent? This documentation is the specification for the planner agent he'll eventually build. Victor should then propose a concrete L5 project: build a planner agent that can decompose a specific category of tasks (e.g., "implement REST endpoint from spec") into the same subtask structure he uses manually. Automate one task type end-to-end before generalizing. The first successful end-to-end orchestration is the proof of concept that justifies broader investment.
Further Reading
From the Field
Recent releases, projects, and discussions relevant to this maturity level.
How This Guide Changed
What each edition changed in this guide, newest first.
- V1.9December 2026LATEST
The reviewer role inside an orchestration was demoted from gate to early check. With orchestrated runs now able to work for many hours, the guide puts the merge gate outside the system, where no orchestrated agent can edit or instruct it, following AWS's account of its agent-built emulator ("Without this merge gate, we wouldn't trust what our agents are building", a vendor claim) and a demonstration that models sharing an inference server can pass messages past a sandbox.
- V1.5August 2026
Adopted the matrix-wide rename of L5 from "Autonomous" to "Self-improving". For orchestration the distinction earns its keep: a planner that reassigns a failed subtask and reshapes its own decomposition is a system correcting itself, which is a stronger claim than merely running without a human present.
- V1.3June 2026
Recorded orchestration shipping as a product default rather than a custom build. Claude Code dynamic workflows let a script Claude writes spawn dozens to hundreds of subagents under a single run, and the Code w/ Claude conference (May 6) introduced fleets, Outcomes and Dreaming. The L5 pattern became buyable, though the foundational discipline in this guide still decides whether it pays off.
- V1.0March 2026
The original entry drew the line between running several agents and orchestrating them. At L4 a human is the coordinator, deciding what each agent works on; the L5 pattern described here hands that decision to a planner agent that decomposes the task, routes subtasks to workers, and puts reviewers in front of the results. It was equally clear about the cost of arriving early - orchestration amplifies a weak L2-L4 foundation rather than compensating for it - and recommended earning the complexity with a planner and a single worker before adding anything else.
Where does your team actually sit on this?
This guide describes one level of one area. Run the assessment to place your team across all 16 areas, see which gates you have passed, and get a report you can take to your stakeholders.