Blog · Guide · 25 November 2026

Planner and Workers: Splitting Work So Agents Don't Collide

Most teams that run many coding agents end up with the same shape. One agent, the planner, splits the work and collects the results. Many agents, the workers, each take one piece and report back. The workers do not talk to each other.

The shape is simple. The hard part is the split. A planner that hands two workers overlapping pieces has created a collision, and no amount of messaging between the workers reliably repairs it. This guide covers what the published evidence says about the pattern, how to split work so each worker owns its files, and how the results flow back.

What the evidence says

Flat groups stall. Cursor's "Scaling long-running autonomous coding" (14 January 2026) describes what happened when agents coordinated as equals: "With no hierarchy, agents became risk-averse. They avoided difficult tasks and made small, safe changes instead." Cursor moved to planners that "continuously explore the codebase and create tasks" and workers that "pick up tasks and focus entirely on completing them". Workers "don't coordinate with other workers or worry about the big picture."

Locks alone do not save a flat group. In the same post, Cursor tried locking: "Agents would hold locks for too long, or forget to release them entirely," and "Twenty agents would slow down to the effective throughput of two or three, with most time spent waiting."

Orchestration contains errors. Google Research (28 January 2026) measured that "independent multi-agent systems (agents working in parallel without talking) amplified errors by 17.2x," while "Centralized systems (with an orchestrator) contained this amplification to just 4.4x." The same post found that on tasks needing strict sequential reasoning, "every multi-agent variant we tested degraded performance by 39-70%."

Shared pieces collide. CooperBench (Stanford and SAP Labs, January 2026) gave two coding agents one feature each from the same codebase. Among failed runs, the largest symptoms were work overlap (33.2%) and divergent architecture (29.7%). With more agents on the same task set, success fell from 68.6% with 2 agents to 46.5% with 3 and 30.0% with 4.

One indivisible task defeats any number of agents. Anthropic's C compiler project (5 February 2026) ran 16 agents. On the Linux kernel, "Every agent would hit the same bug, fix that bug, and then overwrite each other's changes." The fix was to make the work divisible again: GCC compiled most of the kernel and Claude's compiler compiled some files, so each agent could fix different bugs in different files.

Vendors converge on the same shape. Cognition's "Devin can now Manage Devins" (19 March 2026) has one Devin split a large task and hand pieces to managed Devins, each in its own VM. Cognition's "Multi-Agents: What's Actually Working" (22 April 2026) concludes that multi-agent systems work best when "writes stay single-threaded" and calls arbitrary networks of negotiating agents "mostly a distraction". Capy splits a planning agent (Captain) from an executing one (Build).

The planner costs more than its tokens suggest

Cursor's "Agent swarms and the new model economics" (20 July 2026) ran the same work with different model mixes. Total cost ranged "from $1,339 for the Opus 4.8 hybrid to $10,565 for GPT-5.5 alone." Workers carried "at least 69% of the tokens, and over 90% in most" runs. In the mix with an Opus 4.8 planner and Composer 2.5 workers, the planner produced "a small fraction of the tokens but roughly two-thirds of the cost."

Two lessons follow. Put the expensive model where the judgment is: the split. And keep the planner's work small: a planner that re-reads every worker's full transcript is paying the dearest rate for the bulkiest input. Workers should send short handoffs, not their whole history.

How to split: one owner per file

The rule that prevents most collisions is that each worker's set of files is disjoint from every other worker's. A collision between two workers is almost always the planner's mistake: two tasks whose scopes overlapped.

Splits that work:

  • One package per agent. A migration across a monorepo, one package each.
  • One hypothesis per agent. Each agent writes its own experiment and its own result file.
  • One model or variant per agent. Each agent implements one candidate behind a shared harness that none of them edits.
  • One family of features per agent, where each family lives in its own files.

Splits that do not:

  • Two cross-cutting goals over the same code ("add logging", "improve error handling").
  • Any two tasks that both need a central file: a router, a schema, a shared types file, a lockfile.

Give the shared files to one task that runs after the others, blocked by all of them. Write each task's scope into its prompt: "Migrate packages/billing/. Do not edit files outside that directory." A worker that knows its boundary rarely needs to negotiate one.

Forkit's recorded runs used exactly these splits, and all were single runs on staging: six Claude Code agents building a units CLI with one family of units each (17 November 2026), twelve agents each testing one hypothesis about the Palmer Penguins dataset (20 November), and twelve agents each fitting one model to the Mauna Loa CO2 record behind a shared harness (21 November). In all three, collecting the work merged every agent's branch with no conflict.

The mechanics in Forkit

The pattern needs four things beyond the split itself.

A tree. Each worker's session must know who its planner is. In Forkit a thread can have a parent (parent_thread_id): set when a thread is created with create_thread({ parent_thread_id }), through the hook's FORKIT_PARENT_THREAD, or for every agent of a fan-out (a group of agents started together with short-lived keys) through the fan-out's own parent_thread_id.

Handoffs that go up by default. A worker's result is a handoff message, and a handoff goes to the worker's planner unless it names someone else. The worker sends what it did and what is left, not its transcript. Questions are their own type, limited to one open question per sender, and one nobody answers in 2 minutes is handed to a person. See agent handoff notes.

Claims at the start. Each worker claims the paths it will edit (claim_paths). A file has one owner at a time: a claim that overlaps another agent's is refused and names the holder, and the Claude Code hook refuses an edit under another agent's claim before it happens. Claims expire, renew while the agent works and are released when its session ends, which avoids the two lock failures Cursor named. See file locking for AI agents.

A planner that waits instead of polling. Cursor lists "Planners should wake up when their tasks complete to plan the next step" as future work. A Forkit planner calls the wait_for_message tool and is woken when a handoff arrives, rather than reading the message list in a loop.

Forkit also enforces limits that keep a tree from turning into a chat room: 30 messages a minute per sender session, 50 unread per recipient, 8 replies deep, and 20 messages between any pair of agents since a person last wrote on either thread. See preventing agent message loops.

How far it scales

On staging on 13 November 2026, in one run, a planner migrated one package per agent with 1,000 agents arriving 40 a second. Each started, claimed its package, made 8 tool calls, asked for the same pnpm install, was refused when nobody answered, handed off and ended. All 1,000 starts and claims were accepted and 800 of 800 handoffs were read by the planner. That run measured whether the coordination holds under load. The agents were scripted, so it says nothing about the quality of the split.

When the split goes wrong anyway

Some overlap is only discovered during the work: two workers both find they need packages/shared/http.ts. Treat it as a planning error and send it back up. The second worker's claim is refused, it asks the planner, and the planner makes a new task for the shared file, gives it to one worker and blocks the other two on it. That costs one refused claim and one message. Found at merge time, it costs two packages of rework.

When two workers must touch the same lines, and one agrees to make both changes, a Forkit message can carry the change itself (forkit share, then forkit apply in the other checkout), and a merge check holds an agent whose change would not merge with its peers'. That is a repair for a split that went wrong, and the CooperBench write-up shows how much work it takes. A good split avoids needing it.

What this does not solve

  • Sequential work does not split. If each step depends on the last, one agent is the right number. Google's 39 to 70% degradation on sequential tasks is the warning.
  • Clean merges can still break. Two disjoint changes can merge without a conflict and still break each other. Run the tests on the combined result.
  • The planner can be wrong. Nothing in the mechanics checks that the split was sensible. That is still a judgment, and the planner's prompt and a person's review are where it gets made.

Related: multi-agent architectures compared, task dependencies for agents, agent-to-agent messaging patterns and how to run 50 coding agents without merge conflicts.

Where Forkit fits

Forkit is the coordination system for agent teams: plans, handoffs, file claims and decisions, shared by every agent and the people behind them. It does not run agents. It gives a planner and its workers the tree, the handoffs, the claims and the wake-ups. It is free to try at forkit-mcp.com.

Sources