Blog · Guide · 28 November 2026

Keeping Parallel Coding Agents' Work Mergeable: Seven Approaches Compared

Run two coding agents on one repository and each one's work can pass on its own, then fail to merge after both have stopped. Benchmarks show it. CooperBench (Stanford and SAP Labs, 2026) found that two agents given one feature each do worse than one agent doing both. On the pairs where both features touch the same lines, the benchmark's own messaging produced no merged work in eight attempts in our runs.

Tools now take at least seven different approaches to this. They are not rivals so much as layers: most teams will want two or three. This guide says what each catches, what it misses, and which tools take it.

A disclosure: Forkit, which publishes this blog, takes approaches 4 and 6. We have tried to describe every approach, ours included, by what it fails to catch. Facts about other tools come from their own sites and their Hacker News threads, read in November 2026, and are linked.

The seven approaches at a glance

Approach Catches Misses Examples
1. Isolate the checkouts Agents overwriting each other's files while they work Every conflict, until the merge git worktrees; Conductor, Claude Squad, cloud runners
2. Split the work so it does not overlap Overlap you can see in advance Overlap you only find while working A planner that assigns files or packages; one writer
3. Advisory intents Plans that collide, before any code is written Changes nobody announced; agents that ignore the warning Foremerge
4. Enforced claims An edit to a file another agent holds, refused before it is written Conflicts in files nobody claimed; changes both sides agreed but wrote differently Forkit, Switchman, CAS
5. A smarter merge driver Textual conflicts that are not real (two functions in one file) Changes that merge cleanly and break each other; its own wrong merges Weave, mergiraf
6. Check the merge before agents stop Conflicts while the agent that can fix them is still running Changes that merge as text but break each other Forkit's merge check, replay with git merge-tree
7. Version control built for agents Slow or error-prone git handling by agents Coordination itself GitButler, Oak, Jujutsu

1. Isolate the checkouts

Each agent gets its own working copy: a git worktree, a separate clone, a cloud sandbox or a fork. This is what most parallel-agent tools do, and it is the necessary first step: two agents writing the same files on disk is worse than any merge.

What it does not do is coordinate. The conflict is still there; it is moved to the merge, after the agents have stopped. A commenter on one such tool put it plainly: "Spreading agents across git worktrees sounds awesome right up until the merge step" (HN). Worktrees also do not isolate shared state such as a database, ports or installed dependencies.

Use it: always, as the base. Our longer comparison is git worktrees vs file leases.

2. Split the work so it does not overlap

A planner assigns each agent files, packages or features that do not touch. Or you give up parallel writing and keep one writer with helpers who only read.

This works when the overlap is visible in advance, as in a migration across independent packages. It fails when it is not: the objection raised in Foremerge's thread applies here too, "we don't know in advance what we will need to change… there are always side effects" (HN 49789356).

Use it: whenever the work divides cleanly. See planner and worker decomposition.

3. Advisory intents

Before editing, an agent publishes what it intends to change and how. Foremerge's example: one agent declares symbol:PaymentService=replace, another =extend, and the second gets "a HIGH destructive_vs_additive finding before writing any code". Its claims are advisory, not locks (foremerge.com, HN 49789356).

This catches colliding plans at the cheapest moment. It depends on agents announcing accurately and heeding the warning. Foremerge says openly that it has "no published coordinated-vs-uncoordinated results yet". In our own CooperBench runs, agents that promised in chat not to touch a function then changed it; an announcement is a promise of the same kind.

Use it: when plans are written before code and you want early warning, not enforcement.

4. Enforced claims

An agent claims the files it will change, and another agent's edit there is refused before it is written. Switchman describes file locking over MCP; CAS describes leases; Forkit refuses the edit in the agent's own hook and names the holder (Switchman, cas.dev).

This stops the broken promise that approach 3 cannot. In our runs, claims refused 24 edits across 12 runs. But it moves the problem rather than ending it: agents then agreed that one would make both changes, and the other, in its own checkout, could not see that change and wrote its own. Claims also only cover what is claimed, and too-broad claims make agents wait (Forkit refuses a claim on a whole repository for that reason).

Use it: with isolation, when agents share files. Pair it with a way to pass the agreed change itself, such as a patch on a message.

5. A smarter merge driver

Replace git's line-based merge with one that understands the code. Weave merges at the level of functions and other entities: "Two agents edit different functions in the same file? Clean merge." Its benchmark of 31 scenarios scores weave 31 of 31, mergiraf 26 and git 15 (Weave). mergiraf is the established open-source option.

This removes conflicts that are only textual. It can also make wrong merges: Weave's second HN thread included a report of "silent corruption", and a merge-tool author found it rarely beats mergiraf outside TypeScript (HN 48523705). And no merge driver can tell that two clean changes break each other.

Use it: to cut false conflicts, with tests run on the merged result.

6. Check the merge before agents stop

Compare each agent's change with its peers' while they are still running, and hold an agent whose change would conflict. Forkit's merge check applies git's own rule (changes to the same or adjacent lines of the same base conflict unless identical) to the diffs agents send. It agreed with git on all 37 merges recorded in our CooperBench runs (how we checked). Replaying merges with git merge-tree is the do-it-yourself version: one 2026 study found it took a median of 0.02 seconds (both studies are cited in how we checked).

This catches the conflict while the agent that can fix it still exists. Timing matters more than the check: in our runs, the first agent to finish found no peer to compare with and left, four times in a row, until finished agents were made to wait for their peers (with hard caps). It is still textual: changes on different lines can merge and break each other.

Use it: for fan-outs of agents that cannot see each other's work. See check that agents' work will merge.

7. Version control built for agents

Make version control easier for agents to use correctly. GitButler leads with a benchmark it maintains and discloses: agents are "60% faster using GitButler than vanilla Git, with 80% fewer tool calls" across 360 runs (gitbutler.com, vcbench.dev). Oak offers virtual mounts so agents need no full copy of a repository (HN 48631726). Jujutsu has a growing following.

These make each agent's own version-control work faster and less error-prone. They are not coordination: two agents can still change the same lines.

Use it: when agents spend much of their time fighting git.

What none of them catches by default

Two changes that touch different lines, merge cleanly, and break each other: one agent renames a function another calls. A 2026 study found such interference in 97% of runs on tasks built to cause it, and in 1 of 834 runs on real Django pull requests. The check that catches it is running the full test suite on the combined work before the agents stop. No tool we reviewed does that by default yet.

Which to combine

  • A few agents on separate features: isolation (1) and a split of the work (2). Add a merge check (6) if they share files.
  • Agents that must touch the same code: isolation (1), enforced claims (4) and a way to pass the agreed change itself, then a merge check before they stop (6).
  • Plans written before code: advisory intents (3), or plans people approve before agents start.
  • Many false conflicts in the same files: a merge driver (5), with tests on the merged result.
  • Always: tests on the combined work.

Questions to ask any tool here

  1. What does it do when two agents want the same lines: warn, refuse, merge, or nothing?
  2. When does it find out: before the edit, before the agent stops, or at the merge?
  3. Has it published results with and without it, and with how many runs?
  4. What does it send off your machine?

Related: why multi-agent coding fails, semantic merge conflicts, merge queue vs merge check and our CooperBench write-up.