Blog · Guide · 27 November 2026

What Is an Agent Swarm in Software Engineering

An agent swarm, in software engineering, is many coding agents (dozens to hundreds) working on one problem at the same time, usually split by a planner and each working in its own copy of the code. It differs from an agent team in scale and in how little a person watches each agent: in a team you know each agent and talk to it; in a swarm you manage the run as a whole. This article gives the definition, the published examples, what breaks first when you scale up, and the conditions under which a swarm does better than a few agents in sequence.

A working definition of an agent swarm

Thoughtworks put coding agent swarms on its Technology Radar in April 2026, in the "Caution" ring, with this description: a coding agent swarm "applies dozens to hundreds of agents to a problem, with AI determining composition and size dynamically." It added: "They remain costly and are still far from mature, which is why we advise caution when adopting this technique" (read 27 Nov 2026).

Capy's explainer is shorter: an agent swarm is "a group of coding agents working on one goal at the same time", with an orchestrator dividing the work, tracking progress and collecting results.

Both definitions share three features: many agents, one goal, and something (an agent or a program) deciding who does what.

Swarm vs team vs subagents

Subagents Agent team Agent swarm
Size A few 3 to about 10 Dozens to hundreds
Lives in One session One machine or one product Many sandboxes or machines
Talks to Its parent only Lead and peers Planner, rarely peers
A person Watches the parent Talks to each agent Manages the run: plan, budget, questions, stop
Typical length Minutes An hour or two Hours to days

Claude Code's agent teams sit in the middle column: Anthropic recommends three to five teammates and runs them in one session. A swarm is the right column. The boundary is fuzzy, but the practical test is whether you still read each agent's transcript. If you do not, you are running a swarm, and you need controls that work on the run rather than on the agent.

Who runs swarms today

Cursor wrote in January 2026 ("Scaling long-running autonomous coding") about running "hundreds of concurrent agents on a single project". A browser built from scratch ran for close to a week and produced over a million lines across about 1,000 files. A migration from Solid to React in Cursor's own codebase took three weeks and still needed careful review.

Cognition launched Devin Security Swarm in July 2026: "A swarm of parallel agents investigate segments of the codebase", after which Devin combines the findings, reproduces them in a sandbox and opens a pull request with a patch. On its benchmark of 50 published vulnerabilities, Cognition reports 72% recall at $90.23 per run (read 27 Nov 2026). The post does not say how many agents a run uses.

Factory (the company at factory.com, not Forkit's feature called factories) documents Workstreams, where a lead session "plans the work, delegates it to agents, keeps them coordinated" while they work in parallel (read 27 Nov 2026). The page gives no agent count.

What these have in common: the work splits into parts that are mostly independent (segments of a codebase, components of a browser, files of a migration), and a planner or coordinator stands between the agents.

What breaks first

When people move from three agents to thirty, the same four things fail, in roughly this order.

1. Shared files. Tasks that look independent touch the same route table, config, registry or test fixture. Each agent works in its own sandbox, so nobody notices until merge. Cursor described the first approach they tried, flat coordination with locks, failing: "Agents would hold locks for too long, or forget to release them entirely", and twenty agents slowed to the throughput of two or three.

2. People's attention. Each agent that stops to ask "may I run pnpm install?" is a separate interruption. Two hundred agents asking the same thing is two hundred interruptions. Addy Osmani's "Your parallel Agent limit" puts the human side bluntly: "Your cognitive bandwidth doesn't parallelize."

3. Unstructured chat. Letting agents talk freely seems like the way to resolve overlap. In practice, conversations multiply with the square of the number of agents, loops form, and messages crowd out work. Cognition's April 2026 post "Multi-Agents: What's Actually Working" says: "We think the unstructured-swarm approach, arbitrary networks of agents negotiating with each other, is mostly a distraction."

4. Cost. A swarm's spend is the sum of many sessions, often across models. Without a budget for the whole run, the first sign of a problem is the invoice.

See why multi-agent coding fails for the research behind these failure modes.

What has to be true for a swarm to work

From the published experience above and from our own runs, five conditions decide whether a swarm finishes faster than a few agents in sequence:

  1. A tree, not a mesh. Workers report to a planner; questions go up and answers come down. Messages have types (a result, a question, an answer, a notice) rather than being free text, and they have limits.
  2. One owner per file. Before editing, an agent claims what it will touch. A second agent asking for the same file is told who holds it, rather than both proceeding.
  3. Overlap found before finishing. Each agent's change is compared with its peers' while there is still time to agree who makes which edit.
  4. Questions grouped for people. Identical permission requests become one question with one answer. Production, secrets and money still go to a person every time.
  5. A stop for the whole run. By budget, by tool-call count, by time or by a person, and it reaches every agent at once.

The field guide to running agent teams goes through each condition in practice.

What we have measured

Forkit is a coordination system: it runs no agents, but it holds the claims, messages, questions and stop switch for agents you start. Its fan-outs are built for swarms: up to 1,000 short-lived keys (on the Team plan) started in one request and stopped together.

On staging on 14 Nov 2026 (one run), we simulated 1,000 agents arriving 40 a second. Each started a session, sent a prompt, claimed its package, made eight tool calls, asked for the same permission, was denied when nobody answered, handed off its result and ended. Every request was answered. Median times were 0.36 s to start, 0.37 s to claim, 0.31 s for a permission request, 0.52 s for a handoff and 0.15 s for a tool call, with the 95th percentile under 0.75 s for every step. All 800 unanswered permission requests were recorded as denied.

At 3,000 simulated agents (three fan-outs at once, 120 arriving a second), medians rose to 1.2 to 1.8 s to start and 1.5 to 6.7 s to claim. About one start in ten never reached the server because the test machine's connections timed out, so those figures cover only the requests that connected. How the backend holds up is in the agent swarm backend.

Two limits on these numbers. They are simulated agents, not language models, in one workspace. And the largest runs with real agents have been smaller: six and twelve Claude Code agents in recorded runs on staging, where one person's answer settled all twelve identical permission requests.

When Cognition is right

Cognition's practical conclusion is that "writes stay single-threaded and the additional agents contribute intelligence rather than actions": reviewers, researchers and a manager, not many writers. That is the right default when the work does not split cleanly. A single feature that touches every layer, a refactor of one central module, or anything where each step depends on the last gains little from parallel writers and pays the coordination cost in full.

A swarm earns its cost when the work divides by files or by item: one agent per package in a migration, one per failing test, one per hypothesis, one per vulnerability class. Even then, start with a small run, check that the split holds, and scale up only once conflicts and questions stay low.

Sources

Read on 27 Nov 2026: