<!-- What merge conflicts cost teams running AI coding agents · https://merget.ai/guides/cost-of-merge-conflicts-ai-coding-agents -->

# What merge conflicts cost a team running AI coding agents

Every merge conflict between agent pull requests is paid for in tokens, CI minutes and developer attention. See where the cost comes from and what we measured.

Merget team · Nov 13, 2026 · 4 min read

A merge conflict between two agent pull requests costs an extra agent session to repair it, another CI run to check it, and a developer’s attention to restart both. Across a day of agent pull requests, those repairs add up to hours of waiting and wasted tokens. Resolving conflicts inside the merge queue removes most of the repeated work.

## Where the cost comes from

AI coding agents open pull requests faster than a team can merge them. Merged one at a time, they collide: each pull request that lands moves main, and the ones behind it have to catch up.

- Tokens. A developer sends an agent back to rebase and resolve. That is a full agent session for work that was already done once.
- CI. The repaired branch runs its checks again, and so does every pull request queued behind it.
- Attention. Someone notices the conflict, restarts the agent, reviews the repair and requeues the pull request.

Conflicts between agents are common. In a replay study, pull request pairs from different agents hit textual conflicts in 41.7% of cases, against 19.8% for pairs from the same agent ([Xu et al., 2026](https://arxiv.org/abs/2607.04697)). A separate study found textual conflicts in 27.67% of 107,026 simulated agent pull requests ([AgenticFlict](https://arxiv.org/pdf/2604.03551)). Those are only the conflicts Git can see.

## What we measured

We replayed historical Flask branches through Merget with the same model and budget, with and without its one-call resolver. See the [merge workload benchmark](https://merget.ai/benchmarks/merge-workloads).

| Measure | Result |
| --- | --- |
| Cost of one agent session | $0.89 to $0.92, modeled |
| Cost of one resolver call | $0.0177, modeled |
| Agent sessions on a 24-branch batch | 7 without the resolver, 2 with it |
| Model spend on that batch | $3.60 without the resolver, $1.10 with it, modeled |
| Median time for that batch | 478 s without the resolver, 354 s with it |

Most conflicted files do not need a full agent session. Merget’s first resolver makes one model call per conflicted file and falls back to an agent only when that is not enough. In a separate benchmark it resolved [223 of 223 conflicted files](https://merget.ai/benchmarks/conflict-resolution) from real merges at about $0.018 each.

## A worked example from the benchmark

Take the 24-branch batch above. Without the resolver, Merget needed 7 agent sessions to finish it. With the resolver on, it made 7 resolver calls, which cost $0.12 to $0.18 in total, and needed only 2 agent sessions. The branches that landed were the same. Modeled spend fell by 69%, or 57% at list price, and the batch finished 26% sooner.

The saving comes from matching the tool to the conflict. A conflicted file with an obvious resolution does not need an agent that reads the repository, runs commands and thinks for minutes. It needs one model call and a check that nothing else changed.

## Time is the larger cost

Token spend is the visible line. The larger cost is the wait: a queue of pull requests that takes an afternoon to land, and developers pulled back into finished work. Merget planned a 40-merge batch in under 30 seconds in our [planning benchmark](https://merget.ai/benchmarks/planning-scale), and it resolves independent groups of pull requests in parallel. How long your CI takes is still up to your repository.

## Where a merge queue helps

A merge queue tests the combination that will land, so a break is caught before it reaches main and nobody pays for a red main. That removes one cost. It does not remove the repair: when a queued pull request conflicts, most queues remove it and hand it back, and the agent session, the CI run and the wait all happen anyway. See [how GitHub’s merge queue handles a conflict](https://merget.ai/guides/github-merge-queue).

The repair is the part worth automating. When the queue itself resolves the conflict against the pull requests ahead of it, the pull request stays in line, the fix is checked once, and an agent session is spent only when the conflict needs judgment.

## How to cut the cost

1. Keep pull requests small, so conflicts are small.
2. Give agents separate [worktrees](https://merget.ai/guides/claude-code-worktrees-merge), so they do not overwrite each other.
3. Test the combination, not only each branch, with a merge queue.
4. Resolve conflicts in the queue. [Merget](https://merget.ai/how-it-works) does this in queue order and keeps agent sessions for the conflicts that need them.

## What to measure in your own team

- Pull requests opened per day, and how many are open at once.
- The share of pull requests that need a rebase or conflict fix before they merge.
- Agent sessions spent on repairs, not on new work.
- CI runs repeated because a branch was updated.
- Time from approval to merge.

Merget shows the first of these on day one. It starts in Advisory mode, which reports the conflicts between your open pull requests and changes no source code.

## Questions

### How much does a merge conflict cost in tokens?

In our benchmark, repairing a conflict with a full agent session cost about $0.89 to $0.92 in modeled model spend, against about $0.018 for a single resolver call.

### Why do AI coding agents cause more merge conflicts?

They open more pull requests in parallel, each written without knowledge of the others. More pull requests against the same main means more of them collide.

### Does a merge queue reduce CI cost?

It reduces wasted runs by testing the combination that will actually land. A queue that also resolves conflicts avoids the rebase-and-rerun cycle for conflicting pull requests.

[See how Merget resolves conflicts in queue order](https://merget.ai/how-it-works), or [sign up free](https://sema.merget.ai/login) and connect one repository.

### Merging git worktrees from parallel Claude Code agents

Claude Code’s --worktree flag gives each session its own checkout and branch. Set them up, land the branches, and stop them colliding at merge time.

Merget team · Nov 13, 2026 · 4 min read

[Open](https://merget.ai/guides/claude-code-worktrees-merge)

### Claude Code agent teams: landing the pull requests

Agent teams coordinate the work between Claude Code sessions, not the merge. Set a team up, avoid overwrites, and land what it produces.

Merget team · Nov 13, 2026 · 4 min read

[Open](https://merget.ai/guides/claude-code-agent-teams-pull-requests)

### Codex worktrees: merging parallel agent branches

Codex runs each chat in its own git worktree so parallel tasks do not interfere. Turn the worktrees into pull requests and land them together.

Merget team · Nov 13, 2026 · 4 min read

[Open](https://merget.ai/guides/codex-worktrees-merge)

[All guides](https://merget.ai/guides)
