Multi-agent topologies compared
How to choose between sub-agent spawning, planner-worker separation, initializer-maintainer loops, swarm migrations, board-mediated threads, and tracker reconciliation.
Start with the bottleneck
A second agent is a tax. It costs tokens, it adds a handoff, and it creates one more place for state to disappear. Pay that tax only when a single-agent loop hits a concrete bottleneck.
Three bottlenecks justify multi-agent coordination:
- Context saturation: one agent’s context overflows or degrades before the task is done
- Wall-clock parallelism: the work splits into independent pieces, and running them in series is too slow
- Privilege or role isolation: some work must run with narrower tools or fresher context than the main agent
If your bottleneck is “the agent is not smart enough” or “the output is unreliable”, more agents multiply the defect. Fix the loop first. Choosing the Right Patterns covers that starting stack, and Designing Reliable Agent Evals covers how to prove the fix worked.
If the bottleneck is slow I/O, try Parallel Tool Execution inside one agent before you add a second one. It runs read-only tool calls concurrently and falls back to sequence when any call modifies state.
Comparison matrix
Every topology below answers the same two questions differently: where does coordination state live, and who owns it?
| Topology | Coordination Mechanism | Best For | Primary Failure Mode | Current Tier |
|---|---|---|---|---|
| Sub-Agent Spawning | A main agent spawns sub-agents with fresh context and scoped tools, then merges their results | A large multi-file task that overflows one context, or independent subtasks that can run in parallel | Overhead: spawning and tracking sub-agents can cost more than the task saves | foundational |
| Planner-Worker Separation for Long-Running Agents | Planners create tasks, workers finish them in isolation, and a judge ends each cycle | Many agents on one large codebase for days or weeks, where flat peers conflict or duplicate work | Complexity: it needs orchestration infrastructure and extensive prompt tuning | emerging |
| Initializer-Maintainer Dual Agent | A one-time initializer writes a feature list, progress files, and a bootstrap script; a coding agent resumes from them | Many sessions over days or weeks, on an app with many discrete features | Upfront cost: it needs a comprehensive feature spec, and the initializer must anticipate later needs | emerging |
| Swarm Migration | A main agent fans 10 or more sub-agents out onto independent migration chunks | A mechanical change across many independent files, with clear rules and good test coverage | Merge conflicts, plus the burden of verifying many outputs | production |
| Factory over Assistant | Autonomous agents run in parallel; tests, builds, and linters give the feedback; you check in later | Many independent tasks that automated checks can verify without a human | Loss of control: you cannot steer in real time, and issues can stay hidden for 30-60 minutes | production |
| Board-Mediated Inter-Agent Coordination | Agents talk through comment threads on board cards; a prefix raises an inbox card for the target agent | Agents in separate sessions whose coordination decisions must stay with the work record | Latency and routing: polling delays delivery, and two instances of one agent break routing | emerging |
| Tracker-as-Desired-State Reconciliation | The orchestrator re-reads tracker state every tick and keeps only a short-lived local claim | A long-lived fleet that must survive restarts while humans edit the same tickets | Poll latency, API quota, and a buggy transition rule that can mass-move tickets | emerging |
Tier is the pattern’s catalog status. proposed means 0-1 public implementations. emerging means 2+ independent implementations or one detailed production write-up. production means proven across multiple independent production systems. foundational means an industry-default baseline whenever its signals apply. The pattern page is authoritative if a tier moves.
Distinctions people get wrong
A swarm is not just many sub-agents
Swarm Migration narrows sub-agent spawning to one job: a mechanical change spread across many independent files. It adds prerequisites that plain spawning does not have: atomic migrations, unambiguous rules, good test coverage, and a sandbox that is safe to run many agents in. Under about 10 files, the pattern itself says sequential execution is more efficient.
A parent is not a factory
With Sub-Agent Spawning, a main agent tracks its sub-agents and merges the results. With Factory over Assistant, nobody watches. Tests, builds, and linters provide the feedback, and you check in later. The factory trades real-time steering for throughput. It fails on exploratory work and on tasks that need guidance nobody wrote down.
Planner-worker is not initializer-maintainer
Both target work that outlives one session. Initializer-Maintainer Dual Agent runs its initializer once, then a coding agent resumes from the feature list and progress files, one feature per session. Planner-Worker Separation keeps planners, workers, and a judge active across cycles, and it needs infrastructure to distribute tasks.
A message is not state
Board-Mediated Coordination passes messages between specific agents through card comments. Each prefix must map to exactly one active agent, or routing breaks. Tracker-as-Desired-State Reconciliation ignores messages. It re-reads ticket state every tick and derives dispatch from it, so restarts and human edits self-heal.
Decision tree
Ask these questions in order and stop at the first “yes”.
-
Does the task fit in one agent’s context, in one session? Stay single-agent. No topology below earns its overhead yet.
-
Is the change mechanical? The same rule applies to roughly 10 or more independent files, the rules are unambiguous, and tests can verify each chunk. Use Swarm Migration.
-
Do you have many independent tasks that tests, builds, or linters can verify without a human? Use Factory over Assistant and check on the agents later.
-
Does one main task split into independent subtasks that a parent can merge? Use Sub-Agent Spawning. The parent keeps ownership and aggregates the results.
-
Will the project run for days or weeks across many sessions? Pick by shape:
- Many discrete features, one finished per session: Initializer-Maintainer Dual Agent
- Many concurrent agents that need clear ownership and a judge to end each cycle: Planner-Worker Separation
-
Do agents already run in separate sessions and need to coordinate? Pick by what you trust:
- A board with an API, and decisions that must stay on the work card: Board-Mediated Coordination
- A tracker that humans and agents both edit, and a fleet that must survive restarts: Tracker-as-Desired-State Reconciliation
-
Still unsure? Stay single-agent. Revisit once the single-agent loop is stable and measured.
Companion patterns for concurrency and isolation
No topology above handles concurrency on its own. These four plug into whichever one you pick.
- Design-Time File Partition as Concurrency Control: each task declares every path it will write, so only disjoint work runs at once on a shared checkout. It does not stop a worker that writes outside its declared set.
- Lane-Based Execution Queueing: named lanes, each with its own queue and concurrency limit, so sessions never interleave and background jobs never block users. It is not a priority scheduler.
- Distributed Execution with Cloud Workers: many sessions in parallel, each in its own git worktree, with dependency-aware scheduling and approval gates. You pay for the infrastructure.
- Subject Hygiene for Task Delegation: a specific action-plus-target subject on every delegated task, so each job stays traceable. Nothing enforces it except discipline.
If your bottleneck is privilege isolation, add Sandboxed Tool Authorization. Its subagent policies inherit the parent’s restrictions and can only narrow them.
Common failure modes
| Failure Mode | What It Looks Like | Mitigate With |
|---|---|---|
| Write collisions | Two agents fix the same file, clobber each other’s edits, or break generated artifacts | Design-Time File Partition declares write paths up front and adds a blocking dependency between overlapping tasks. Distributed Execution with Cloud Workers gives each worker its own worktree instead |
| Lost handoff state | A new session starts without the decisions, progress, or files the previous one produced | Initializer-Maintainer Dual Agent keeps progress files and a bootstrap script. Board-Mediated Coordination and Tracker-as-Desired-State Reconciliation keep state on the work record. Filesystem-Based Agent State writes durable checkpoints |
| Rubber-stamp judges | The judge approves every cycle, or reviewers approve every request, so the loop never catches a defect | Give the loop evidence it cannot argue with. Rich Feedback Loops returns compiler, test, and lint output. Deterministic Grader in the Loop scores what you can count. Human-in-the-Loop Approval Framework names approval fatigue as a known risk, so keep approval volume low |
| Runaway token fan-out | Ten agents become thirty, and the budget is gone before anyone notices | Context Budget as a Governed Resource adds hard spend caps and fan-out bounds to unattended runs. Lane-Based Execution Queueing limits concurrency per lane. Budget-Aware Model Routing with Hard Cost Caps routes each request to the cheapest capable model under hard cost caps |
| Untraceable delegation | You cannot tell which sub-agent did what, or why | Subject Hygiene for Task Delegation requires an action-plus-target subject on every delegated task |
Next steps
- Not sure which failure mode you have? Start with Choosing the Right Patterns
- Sub-agents get fresh context, so make it count. See the Context Engineering Playbook
- Every judge needs evidence it cannot rubber-stamp. See Designing Reliable Agent Evals
- More agents means more tool calls to police. See Prompt-Injection Defense in Depth