Guides

An agent swarm needs coordination before more agents

An agent swarm is a coordinated group of agents working on a task or backlog. For coding agents sharing a backlog, that means exclusive claims, dependency gates and a recovery path when an agent stops.

· 11 min read

An agent swarm can mean different kinds of coordination

IBM’s September 28, 2026 definition describes an agent swarm as a group of AI agents working together to accomplish a task. IBM places agent swarms within the broader category of a multi-agent system. Its defining requirement is coordination over what needs doing, who does it and how the results come together.

As of October 2026, agent swarm names several arrangements. Kimi Agent Swarm and coding subagents split a task into parallel pieces under an orchestrator. OpenAI Swarm and AutoGen’s Swarm use handoffs between specialists.

An agent swarm can also mean many agents working on one shared backlog, a form of AI agent orchestration used by desplega’s Agent Swarm, Ruflo’s claims system and Retasc.

IBM identifies task assignment, information sharing and conflicts between agents as coordination overhead. Swarms, the Apache-2.0 Python framework at version 16.0.1 on October 3, 2026, supports sequential, concurrent, DAG and hierarchical director-and-workers architectures. IBM also warns that a swarm may be a poor fit when each step depends heavily on the previous one.

Kimi and Cursor fan a task out across subagents

Kimi K2.5 launched its research-preview swarm on January 27, 2026, with up to 100 dynamically created sub-agents across up to 1,500 tool calls. Parallel-Agent Reinforcement Learning, or PARL, trains an orchestrator to split a task into parallel subtasks executed by frozen sub-agents, with no predefined subagents. Its metric counts critical steps, so extra subtasks help only when they shorten the critical path through the work.

K2.6 expanded this to 300 sub-agents and 4,000 coordinated steps on April 20, 2026. Agent Swarm now runs on Kimi K3 as a paid kimi.com mode with no documented API for calling that mode from your own orchestrator. The model weights are open under Modified MIT for K2.5 and K2.6 and the Kimi K3 License for K3, while the hosted Agent Swarm orchestrator is not documented as open source.

Kimi Code, the MIT-licensed CLI, added /swarm in 0.12.0 on June 9, 2026. Its AgentSwarm tool launches up to 128 subagents from one prompt template and a list of items, returning one combined report after all subagents finish. Experimental Tower mode splits a task into missions on separate branches and git worktrees, starting each worker when its mission’s dependencies are met.

Cursor’s August 19, 2026 changelog added subagents on separate VMs with isolated project copies, although its docs describe a shared parent checkout by default. Its January 14, 2026 research found locks reduced 20 agents to the throughput of 2 or 3, with agents also failing while holding locks, before moving through optimistic concurrency to planners and workers. Its July 20, 2026 research still reported same-file collisions, with a neutral agent resolving merge conflicts as research rather than a shipped feature.

OpenAI Swarm and AutoGen Swarm pass control between agents

OpenAI Swarm is an experimental, educational framework built around agents and handoffs. It is stateless between calls. Since March 2025, its README has named the OpenAI Agents SDK as its replacement and recommended migrating for production.

The Agents SDK documents separate patterns for multi-agent orchestration. With agents as tools, a manager calls specialists as tools while retaining control of the overall run. With handoffs, a triage agent transfers the conversation so the chosen specialist takes control of what follows.

AutoGen’s Swarm also hands a task between agents. The agents share a message context with a single speaker per turn. AutoGen is in maintenance mode, with Microsoft directing new users to Microsoft Agent Framework.

In these patterns, agents receive work through a manager or a conversation instead of claiming it from a shared backlog.

Claude Code teams and subagents have different boundaries

Anthropic’s Claude Code docs and changelog never use the word swarm. Pages that describe a Claude Code swarm refer to agent teams.

Agent teams use file locking to prevent races during task claiming, so their docs do describe a claim mechanism. A task with unfinished dependencies cannot be claimed. Anthropic suggests 3 to 5 teammates, but documents no lease or timeout for reclaiming a task after its teammate stops.

Anthropic also documents teammates failing to mark tasks completed, leaving their dependents blocked. Teammates editing the same file can overwrite each other’s changes. The claim protects the task assignment while file ownership still needs coordination.

Claude Code subagents allow 20 concurrent subagents per session by default, configurable through CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS, with nesting up to 3 layers. Codex subagents are enabled by default. Codex warns that parallel code writers can create conflicts and increase coordination overhead.

claude-flow is now Ruflo, with conflicting documented limits

claude-flow now redirects to Ruflo. Both npm names publish MIT-licensed version 3.56.10, dated October 14, 2026. Ruflo describes itself as an agent meta-harness for Claude Code and Codex, with coordinated swarms, a queen-led hive mind and several topologies.

Its pages disagree on the MCP tool count, listing 314, 313 or 310+. Its guide promises unlimited agents. The swarm_init code caps maxAgents at 50 with a default of 15.

Ruflo’s claims system supports claim, release, handoff and steal operations for moving ownership between agents. The code refuses an issue that is already claimed, then rewrites .claude-flow/claims/claims.json without a file lock or compare-and-swap. The ownership check and file rewrite without a lock do not provide an atomic boundary for simultaneous claims.

The stale-claim threshold also differs between code and documentation. Code makes a claim stealable after 30 minutes, while the claims README says 1 hour. A stale claim becoming eligible for another agent to steal differs from automatically returning it to an unclaimed queue with a checkpoint.

desplega’s Agent Swarm gets backlog claims and gates right

desplega’s Agent Swarm is MIT-licensed and self-hosted, at v2.0.0 on October 16, 2026. A lead delegates work to agents in Docker containers. Supported runtimes include Claude Code, Codex, OpenCode and Cursor.

Its database code claims a task with a single SQL update that succeeds only while the task is unassigned. That makes checking availability and taking ownership a single database operation under concurrent requests. Its dependsOn handling keeps a task out of offers and refuses direct claims until every dependency completes.

Its recovery runbook checks heartbeats about every 90 seconds. It resumes a stalled task on the same agent, escalates to the lead after 10 minutes and stops after 3 restarts.

This system enforces exclusive task claims and dependency gates across workers on different coding runtimes. Its documented recovery resumes a stalled task on the same agent before escalating to the lead. When a Retasc lease expires, the same person’s next agent can claim the issue and resume from its checkpoint.

A shared coding backlog needs enforced ownership and recovery

The server must decide each claim atomically before handing out the issue. Retasc uses a server transaction, while desplega uses a conditional SQL update. Claude Code teams document file-locked claims, whereas Ruflo’s claims file is rewritten without a lock.

One agent per taskBlocked tasks waitFreed on agent death
Claude Code agent teamsyes: File lock on the task listyes: Waits until dependencies completeno: No lease or timeout documented
Ruflo (claude-flow)partly: JSON claims file has no lockpartly: Blocked claim statuspartly: Stealable after 30 minutes in code
desplega’s Agent Swarmyes: Exactly-once SQL claimyes: Held until dependencies completeyes: Heartbeat recovery, up to 3 restarts
Kimi Code Towerpartly: A branch and worktree per missionyes: Starts after dependencies completeno: Workers must be spawned again
Cursor subagentsno: Isolation without documented claimspartly: Dependent plan steps stay in orderno: No lease or reassignment documented
Retascyes: One server transactionyes: Never handed out while blockedyes: Lease expires, checkpoint handed on

Retasc, desplega’s Agent Swarm and Claude Code agent teams refuse claims on blocked work. Kimi Code’s experimental Tower mode starts workers whose dependencies are met. Retasc computes whether an issue is blocked live from its blocking links. A blocking link that would create a dependency cycle is refused.

An agent records checkpoints with what is done, what is next and the gotchas. When its process dies, its laptop closes or its terminal is killed, its 30-minute lease expires after renewals stop. Retasc returns the issue to the queue in its owner’s lane. The same person’s next agent, on any runtime, is offered it first. Every claim through next_issue, claim_issue or next_batch hands the claiming agent the last checkpoint.

Give each issue its own branch and git worktree, as Kimi Code’s experimental Tower mode does for each mission. Cursor’s separate VMs provide isolated project copies, while its default shared checkout carries an overwrite warning. Retasc dispatches review to a different person’s agent, refusing to let the submitter claim or accept it. The reviewer receives the work’s location or the checkpoint left on the issue.

Retasc dispatches ready issues across runtimes and machines

Agents on Claude Code, Codex, Cursor, OpenCode, Gemini CLI or another MCP client call next_issue to claim Retasc’s highest effective-priority unblocked, unclaimed issue. A claim is one server transaction. Two agents can never hold the same issue.

Blocked work is never handed out. Close a blocker and its dependents join the queue. A Low chore blocking an Urgent feature inherits that urgency, so Retasc hands out the chore first.

next_batch hands an orchestrator up to 25 issues that do not depend on each other, so a wave of subagents can work them at once. It peeks by default. claim: true claims them all. A look-alike create returns DUPLICATE_CHECK_REQUIRED until the agent names the open issues it read. An empty pull explains how many issues are blocked, claimed, held, waiting for sign-off or in other people’s lanes.

The CLI renews each 30-minute lease every 10 minutes without the model doing anything. After a lapse, the issue stays in its owner’s lane for the same person’s agents on any runtime, returning to the shared pool after 7 days without a return. The Dash lists every agent, its runtime, the issue it holds and the minutes left on its lease.

Ready work sets the width of a swarm

The number of ready issues sets the useful width of a backlog swarm. More terminals cannot make a blocked issue ready. IBM’s warning about heavily sequential tasks applies directly when the dependency chain leaves little independent work.

Anthropic’s recommendation of 3 to 5 teammates is a starting point for Claude Code teams. Cursor reported that 20 agents claiming tasks from a shared file with locks slowed to the effective throughput of 2 or 3. It then moved to optimistic concurrency, followed by planners and workers.

Kimi’s critical-path metric gives another way to judge whether splitting the task is doing useful work. Parallel subtasks matter when they shorten the path to the result. Retasc’s next_issue also lists other ready issues as an available, unreserved wave, so an orchestrator can inspect potential parallel work without taking ownership.

An empty Retasc pull means your swarm is wider than the work ready for that agent. The dispatch response described above tells you why nothing is ready. When the CLI reports unclaimed work on an issue’s branch, from a dirty worktree or a commit in the last 24 hours, Retasc holds the issue back from dispatch for 60 minutes.

The right system depends on where the work lives

For a task that fans out into independent pieces, use Kimi Agent Swarm, Cursor subagents, Claude Code subagents or Codex subagents. Kimi Code’s AgentSwarm fits the template-plus-items arrangement. Its Tower mode adds mission branches, worktrees and dependency-aware worker starts.

For a conversation moving between specialists, the Agents SDK provides handoffs. Its agents-as-tools pattern keeps a manager in control of specialist calls. OpenAI Swarm remains the educational predecessor, while AutoGen directs new users elsewhere.

Claude Code agent teams use file locking to claim tasks. A queue fits a backlog that many agents work across sessions, runtimes and machines. desplega’s Agent Swarm is self-hosted, with a lead that delegates to Docker workers across runtimes. Retasc is a hosted work queue for that shared backlog, which agents pull from over MCP.

Bind your repo folder with npx @retasc/cli@latest bind. After browser approval if needed, the CLI gives the folder an agent key attributed to your signed-in GitHub or Google identity and wires the MCP server. Start or restart your agent in that folder so it can pull work from the queue.

Questions about running a swarm

What is an agent swarm?

An agent swarm is a coordinated group of AI agents working toward a task. The term covers subagent fan-out, specialist handoffs and agents sharing a backlog. Its coordination mechanism determines what work needs doing, assigns that work and brings the results together.

How does Kimi Agent Swarm work?

Kimi Agent Swarm uses a model orchestrator to split work among dynamically created sub-agents. PARL trained that orchestrator to shorten the critical path. The paid kimi.com mode now runs on Kimi K3, with no documented API.

Does Kimi Code use agent swarm?

Kimi Code added /swarm in 0.12.0 on June 9, 2026, with an AgentSwarm tool for up to 128 subagents from a template and item list. It waits for all results before returning a report. Experimental Tower mode adds mission branches, worktrees and dependency gates.

Is Kimi Agent Swarm open source?

Kimi’s hosted Agent Swarm orchestrator is not documented as open source. Its model weights are open under Modified MIT for K2.5 and K2.6 and the Kimi K3 License for K3. Kimi Code is a separate MIT-licensed CLI with its own /swarm command and experimental Tower mode.

Is OpenAI Swarm still maintained?

OpenAI Swarm has been replaced by the OpenAI Agents SDK. Its README has recommended migration for production since March 2025. The original Swarm is labeled experimental and educational, with agents and handoffs that are stateless between calls.

What happened to claude-flow?

Ruflo is the MIT-licensed agent meta-harness for Claude Code and Codex formerly named claude-flow. Both npm names publish version 3.56.10 as of October 14, 2026. Its guide promises unlimited agents, while swarm_init caps maxAgents at 50.

Does Claude Code have a swarm mode?

Claude Code documents agent teams and subagents rather than a swarm mode. Teams use file-locked task claims with dependency gates, without a documented lease or timeout. Subagents default to 20 concurrent workers per session, configurable through CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS.

How many agents should a swarm have?

The number of independent ready issues should set the size of a backlog swarm’s next wave. Anthropic suggests 3 to 5 teammates for Claude Code teams. An empty Retasc pull reports blocked, claimed, held and other unavailable work so you can tell why nothing is ready.

Run the command in each folder an agent works from so agents using MCP pull the next unblocked issue from one queue. A new org gets $10 of usage at signup, with no card.

$ npx @retasc/cli@latest bind
Other ways Set up the fleet