Blog · Guide · 23 November 2026

Two Coding Agents, One Function: What We Learned Running CooperBench

CooperBench (Stanford and SAP Labs, 2026) gives two coding agents one feature each from the same codebase and checks whether their work fits together. Its headline finding is that two agents do worse than one agent doing both features. We ran part of it with Claude Code, first with CooperBench's own way for agents to talk, then with Forkit, and changed Forkit each time the runs showed us why it failed.

This is what happened, including the parts that did not work.

The setup

Each agent works in its own copy of the repository. When both are done, their two patches are merged mechanically and both features' tests run. If the patches conflict, both features fail.

Everything was held the same across runs: the model (Claude Sonnet 4.5), the Claude Code version, the CooperBench commit, six task pairs from its flash_10 subset, and the scoring. Only the coordination changed:

  • Solo: one agent does both features. No merge. This is the ceiling.
  • CooperBench's messaging: shell commands the agents use to message each other.
  • Forkit: typed messages delivered into the agent's turn, file claims, and, in later versions, patches passed between agents and a merge check.

54 runs cost $81.98 in API use.

The pairs that measure coordination

Four of the six pairs make both features change the same lines. In go-chi, for example, one feature adds a call right after a route is found and the other times the handler on the next lines. Two separate patches that both touch those lines always conflict. The only way to pass is for one agent's patch to contain both changes and the other's to leave those lines alone.

On those four pairs, did the two agents' work merge?

Coordination Merged
CooperBench's messaging 0 of 8
Forkit v1: messages and claims 1 of 8
Forkit v2: plus patches between agents 1 of 4
Forkit v3: plus a merge check at Stop 0 of 4
Forkit v3.1: plus waiting for peers 3 of 4

The later versions ran once per pair, so this is a strong signal, not yet a measured rate. The other two pairs merged cleanly in every arm and failed or passed on feature correctness alone, solo included, so they cannot tell coordination methods apart.

Each fix moved the failure

Promises in chat are not kept. With plain messages, one agent wrote "I won't modify routeHTTP() in mux.go … No conflicts expected", then modified it.

Claims stop the broken promise, but not the conflict. With Forkit's file claims, that edit was refused and named the holder; across twelve runs, 24 edits were refused. The agents negotiated an owner: "I'll make both changes together." Then the owner's edit stayed in its own copy. The other agent looked and saw nothing: "We might be working in different workspaces."

Moving code helps, until the copies drift again. We added patches on messages: forkit share sends a change, forkit apply makes the same change in the other checkout. Agents used it in three of the four colliding pairs. Then one agent tidied its patch: "Wait, I need to remove the PathValue lines from my patch since they're part of my peer's feature, not mine." The patches were four lines apart, and conflicted.

A merge check finds the conflict, but too late. We added "would our work merge?": an agent's change is compared with its peers' the way git's merge decides, and an agent whose change would conflict is held at Stop. On the 37 merges CooperBench recorded, it gave git's verdict every time. But four runs in a row, the first agent checked, found nobody to compare with, and left. The second was held alone with a conflict only the first could fix.

Waiting for peers closes it. In v3.1 an agent that finishes first waits for its peers to check in. go-chi merged for the first time. On tiktoken and pillow the two agents ended with byte-identical patches. The one miss came from an agent running git commit, which moved the base the check compared from; diffs now start from the commit an agent began on.

What it costs

Coordination is not free. A run with CooperBench's messaging cost about $1.23; a Forkit v3.1 run about $2.36, mostly from agents waiting for each other and passing changes back and forth. On the colliding pairs, the cheaper runs produced no merged work at all.

What we would not claim

  • The later Forkit versions ran once per pair. A measured rate needs repeats.
  • Forkit changed between rounds because of what the runs showed. Each change is a general product feature, but later versions had the benefit of earlier failures.
  • Forkit's prompt describes its tools the way CooperBench's describes its shell commands. It never tells agents how the benchmark scores.
  • One model, six pairs, a benchmark of 652 tasks.

What changed in Forkit

  • A file has one owner at a time: a claim on a file someone else holds is refused and names the holder.
  • Messages can carry a patch (forkit share, forkit apply).
  • forkit check-merge, and a Stop hook that holds an agent whose change would not merge with its peers', after waiting for them to check in.
  • The wait and the number of holds can be set by hand or adapt to whether peers are still working, with hard caps, so a stuck or hostile peer cannot keep an agent forever.

Related: how to run 50 coding agents without merge conflicts, file locking for AI agents and agent-to-agent messaging patterns.

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 is free to try at forkit-mcp.com.