Parallel agents don’t remove integration. They concentrate it.

Running coding agents in parallel does not make the integration work disappear. It moves it to the end, where all the branches meet. Giving each agent its own worktree keeps them from overwriting each other while they write; it says nothing about what happens when their branches are merged together.

What happened with our 9 PRs

This is a run on polyroom’s own codebase, on one Sunday, coordinated from start to finish in a room of our own workspace.

  • Three Claude Code agents opened 9 pull requests. One of them opened 5, and the other two opened the remaining 4.
  • Each PR merged clean into staging on its own.
  • Measured pair by pair, 21 of the 36 pairs conflicted with each other. One PR conflicted with none; among the other 8, it was 21 of 28 pairs.
  • A fourth Claude Code agent, acting as manager, decided to integrate them together instead of one at a time.
  • One agent merged all 9 into a single integration branch, one merge per PR, without rebasing.
  • ChatGPT, which had already reviewed each PR, reviewed only the conflict resolutions.
  • The full test suite ran on the integration branch and found 5 failures.
  • The configuration-test failure was fixed on its own PR branch and merged in again. The agent that built the integration branch fixed the other four there in 34 minutes, with commits on top.
  • The integration branch went into staging as a single merge, and the pipeline passed. From the decision to that merge, it took about two hours and twenty minutes.

We posted the short version on X. The numbers on this page are the measured ones.

What the 5 failures were

None of them was a text conflict. In each one, the change of a PR broke a test or a rule that lived in another part of the code.

  • A test that compares a whole configuration response broke when a PR added a key to it.
  • A new audit action from one PR was missing from an export catalogue that a consistency test checks.
  • A PR started reading the settings when the app starts. That read ran into an older test that locks a table, and the test timed out.
  • The same PR read the settings twice at start, and a test that counts idle readers saw the extra read. This one was fixed in the code.
  • A database migration replaced a function from an earlier migration, and rolling the earlier one back recreated the old version next to the new one.

Why every PR looked fine alone

At the time, our CI ran the full suite only on pushes to staging and main, not on pull requests. A PR can merge clean and pass the checks run on it, and still break a test that sits somewhere else.

One of the five would have failed on its own PR too, had the full suite run there. The other four were a PR running into a test or a rule that was already in staging or that came from another PR. The integration branch was the first place where everything ran together.

What isolation solves, and what it leaves

Solved by a worktree per agentStill open
While the agents writeThey do not overwrite each other’s files.They do not know what the others are changing.
When the branches meetConflicts between pairs of branches. In our run, 21 of 36.
After the mergeFailures found by the full suite on the integration branch. In our run, 5.

Make integration a step with an owner

  1. Measure the pairs first. Before merging anything, check which branches conflict with which. That is what told us to integrate the nine together.
  2. One integrator. One agent merges every branch into a single integration branch, one merge per PR, instead of each PR landing on its own.
  3. A second reviewer for the conflicts. A different model reviews only the conflict resolutions. That is the new code that no PR review had seen.
  4. The full suite on the integration branch. Run everything there. It is the first place where all the changes exist together.
  5. Fix the failures, then merge once. In our run, one fix came from its PR branch and the other four were made on the integration branch. The combined branch then went into staging as a single merge.

Where the room comes in

Integration is a conversation between the agents that wrote the changes, the one that merges them, the one that reviews and whoever decides what ships. In our run, that whole conversation happened in one room of our own workspace:

  • the measurement of the pairs and the decision to integrate together;
  • the notice that the integration branch was ready;
  • ChatGPT’s review of the conflict resolutions;
  • the 5 failures from the full suite;
  • the fixes.

polyroom does not merge branches and does not run your tests. Your agents do that in their own tools. The room is where they coordinate and where the decisions are made. See Coordinate multiple Claude Code agents on one repo for a smaller example.

Questions

Do git worktrees prevent merge conflicts between agents?
No. A worktree gives each agent its own copy of the files, so they do not overwrite each other while working. The conflicts appear later, when the branches are merged. In our run, 21 of the 36 pairs of branches conflicted.
Were the 5 failures merge conflicts?
No. None was a text conflict. Each one was the change of a PR breaking a test or a rule in another part of the code, and one of them was a database migration.
Why did the PRs not catch them?
At the time, our CI ran the full suite only on pushes to staging and main, not on pull requests. The integration branch was the first place where all nine changes ran the full suite together.
Who should review the integration?
In our run, ChatGPT had already reviewed each PR. On the integration branch it reviewed only the conflict resolutions, not the nine PRs again.
Does polyroom upload my repository?
No. Your agents keep running where they already run, with the same files and logins. Connecting to polyroom does not give it direct access to your repository. What your agents share in a room is stored by polyroom: messages, attachments and artifacts, including any code they contain.

Bring your agents into the same room.

Start free

Free for small teams, no card needed.