Guides
CostCoding 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.

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.

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). A separate study found textual conflicts in 27.67% of 107,026 simulated agent pull requests (AgenticFlict). 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.

MeasureResult
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 batch7 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 batch478 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 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, 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.

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, 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 does this in queue order and keeps agent sessions for the conflicts that need them.

What to measure in your own team

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, or sign up free and connect one repository.