What is an agent swarm?
An agent swarm is a large group of AI coding agents working on one goal in parallel, each claiming a task and merging its work back.
Updated
An agent swarm is a large group of AI agents working on one goal at the same time, each taking a piece of the work. In coding, that means dozens of coding agents running in parallel, each claiming a task, writing the code and merging it back, with agents rather than a person deciding who does what.
People also say “AI agent swarm”, “coding agent swarm” and “agentic swarm coding” for the same thing. This page is about coding agents; “swarm” also names a crypto token and several unrelated products.
As of November 2026, from Thoughtworks’ Technology Radar entry on coding agent swarms, Anthropic’s C compiler experiment and Cursor’s scaling long-running autonomous coding. The practice is young and changes fast, so those sources win if this page disagrees.
Every agent in a swarm on your Mac can stop to ask you something. Coral puts each waiting agent in your Mac’s notch, longest wait first, so you answer with one key. Download Coral for free
Where the term came from
“Swarm” came into AI agent talk from frameworks for many cooperating agents. OpenAI’s Swarm was an “educational framework exploring ergonomic, lightweight multi-agent orchestration”, built on two ideas: agents and handoffs between them. OpenAI has since replaced it with its Agents SDK. Tools like claude-flow later gave Claude Code a swarm command; Adrian Cockcroft wrote up his first agent swarm with it.
The coding meaning got sharper in 2026, when two swarms built large programs:
- February 5, 2026. Anthropic’s Nicholas Carlini ran 16 Claude agents in parallel over nearly 2,000 Claude Code sessions across two weeks. They wrote a 100,000-line C compiler in Rust that can build Linux 6.9 on x86, ARM and RISC-V, for about $20,000 in API costs, “without active human intervention”.
- Cursor’s experiment. Cursor ran hundreds of concurrent agents for close to a week to build a web browser from scratch.
- April 15, 2026. Thoughtworks put coding agent swarms on its Technology Radar at “Caution”. Its line between the two: a team of coding agents is “a small, deliberate group”, while a swarm “applies dozens to hundreds of agents to a problem, with AI determining composition and size dynamically”.
What it looks like in practice
A swarm needs three things a single agent doesn’t: a way to split the work, a way to stop two agents from grabbing the same piece, and a way to merge what they wrote.
| Problem | Anthropic’s C compiler | Cursor’s browser |
|---|---|---|
| Who splits the work | Each agent picks the next task when it finishes one | Planner agents explore the code and create tasks; they can spawn sub-planners |
| Who does it | 16 agents in a loop, each in a fresh container | Workers that finish one task and don’t coordinate with each other |
| Who decides it’s working | A test harness and CI that new commits can’t break | A judge agent at the end of each cycle |
| How they avoid collisions | A lock file per task, kept in git | First locks, then a pipeline with separate roles |
Both found that coordination is the hard part. Cursor started with agents of equal status sharing one file and a lock. Agents held locks too long or forgot to release them, and the lock became a bottleneck. Without a hierarchy, agents “became risk-averse” and avoided hard tasks. Splitting the roles into planners, workers and judges “solved most of our coordination problems”, though Cursor still writes that “multi-agent coordination remains a hard problem”.
On a smaller scale, the same shape shows up in tools you already have: Claude Code agent teams (a lead plus 3 to 5 teammates sharing a task list), Codex subagents and plain parallel sessions in worktrees (Run several Claude Code agents at once). By Thoughtworks’ line those are teams, not swarms. They hit the same problems sooner, because a person is still answering their prompts.
Five agents can stop to ask at once, each in its own terminal. Coral shows every one in your Mac’s notch with the full request, so you answer with one key from any app. Get Coral, free
Agent swarm vs agent teams, orchestration and a software factory
| Term | How many agents | Who decides who does what | Who answers the agents |
|---|---|---|---|
| Agent swarm | Dozens to hundreds | Agents (planners, or each agent picking its next task) | Ideally nobody: tests, judges and rules |
| Team of coding agents | A few, chosen on purpose (Claude Code agent teams) | A lead agent, with you steering | You, through the lead’s session |
| Agent orchestration | Any number | An orchestrator: code, a lead agent or you | Depends on the setup |
| Software factory | Any number | Triggers start sessions: an issue, a schedule, a failing build | Whoever keeps the gates: plans, permissions, merges |
A swarm is one way to orchestrate agents, at the large end. A factory is about what starts the agents; a swarm is about how many work on one goal at once. A factory can run swarms, and a swarm with nobody reviewing its output is a dark factory.
A worked example: the lock file pattern
Carlini’s compiler swarm coordinated through the repo itself. From his write-up, an agent claims a task by writing a text file to current_tasks/:
current_tasks/
parse_if_statement.txt ← claimed by one agent
codegen_function_definition.txt ← claimed by another
Then each agent loops on its own:
- Claim. Write the lock file and push it. “If two agents try to claim the same task, git’s synchronization forces the second agent to pick a different one.”
- Work. Fix the failing test or feature that the task names.
- Merge. Pull from upstream, merge the other agents’ changes, push, and delete the lock.
- Repeat. “When it finishes one task, it immediately picks up the next.”
No agent waits for a person in that loop. That’s why it could run for two weeks. It’s also why the tests carry everything: Carlini writes that “the task verifier” has to be “nearly perfect, otherwise Claude will solve the wrong problem.”
The pattern has a limit, and he hit it. While many tests were failing, “each agent picks a different failing test”. When the agents reached the Linux kernel, one giant task, “every agent would hit the same bug, fix that bug, and then overwrite each other’s changes.” He had to write a new harness that split the kernel into pieces before the swarm could work in parallel again.
Where it stops
A swarm scales the work, not the decisions:
- Every gate multiplies. A swarm that runs without people has answered every permission in advance, through allow rules, a sandbox and tests. A swarm on your own machine with normal permissions raises a prompt per agent. In an agent team, every teammate’s prompt lands in the lead’s session. In Codex, a subagent’s approval pops up while you’re on the main thread, and one unanswered prompt holds up the combined answer.
- The cost is real. Thoughtworks says swarms “remain costly and are still far from mature”. Anthropic measured multi-agent systems at about 15× the tokens of a chat (multi-agent research system).
- Coding resists splitting. In the same post, Anthropic notes that “most coding tasks involve fewer truly parallelizable tasks than research”. Two agents editing the same file overwrite each other; agent teams’ own docs say to give each teammate its own files.
So most developers run a small team, not a swarm, and spend the day answering it.
Where Coral fits
Coral doesn’t split work or run agents. It handles the part that grows with every agent you add: the moments one stops for you.
- Every waiting agent in one place. Claude Code, Codex, Copilot CLI, OpenCode and Grok sessions in any terminal show up in your Mac’s notch, grouped into Needs you, Done, Working and Idle, longest wait first.
- By project. Agents group by the git repo they work in, and a worktree joins its repo, so parallel agents on one codebase sit together.
- Answer with one key. Press 1, 2 or 3 from any app, with the full command in front of you. ⌘Z takes it back within two seconds.
- Away from your Mac. Alerts on your iPhone are Free. Answering from the phone and agents on your SSH servers are Pro.
Coral watches agents on your Mac and your servers, not a swarm running in the cloud. For the setup on your own machine, see Run several Claude Code agents at once.
Questions
What is an AI agent swarm?
A group of AI agents working on one goal at the same time, each handling part of it. For coding, that means many coding agents in parallel, each claiming a task, writing code and merging it back, usually with planner or judge agents deciding what comes next.
What is the difference between an agent swarm and multi-agent orchestration?
Orchestration is the general idea of coordinating several agents on one job. A swarm is orchestration at the large end: dozens to hundreds of agents, with agents rather than people deciding who does what.
How many agents is a swarm?
There’s no fixed number. Thoughtworks draws the line at “dozens to hundreds” of agents, against a team of a few chosen on purpose. Anthropic’s compiler swarm used 16; Cursor’s browser run used hundreds.
Is Claude Code agent teams a swarm?
Closer to a team. A lead Claude Code session spawns a few teammates that share a task list and message each other, and Anthropic suggests 3 to 5. Every teammate’s permission prompt goes to the lead’s session, where you answer it.
Do agent swarms work for real coding?
For some work. Anthropic’s swarm built a C compiler that compiles Linux, and Cursor’s built a browser, both with strong tests and weeks of runtime. Both teams found coordination hard, and Thoughtworks advises caution because swarms are costly and immature.