Semantic Merge Conflicts: When Agent Patches Merge and Still Break
Git calls a merge clean when no two changes touch the same or adjacent lines. That says nothing about whether the merged code works. A semantic merge conflict is two changes that merge without a single conflict marker and still break each other. With one person per branch they are rare, because people talk. With several coding agents working in parallel, each in its own copy and each sure its own tests pass, they are the failure that text-level tools cannot see. This explainer covers what they are, what research from 2026 says about how often they happen, and what helps, including the limits of Forkit's own merge check.
An example
Two agents work on a billing service.
- Agent A is asked to store prices in integer cents. It changes
price_of(item)to return cents and updates every caller it can find. - Agent B is asked to add a discount banner. It writes a new function that calls
price_of(item)and divides by 100 nowhere, because when B started,price_ofreturned dollars.
A's change is in pricing.py and the files that called it. B's is in a new file, banner.py. No line overlaps. Git merges them cleanly, both agents' tests passed in their own copies, and the merged code shows a $12 discount as $1,200.
The conflict is in meaning: B relied on a fact about price_of that A changed. Nothing in the text of the two diffs says so.
What the research says
Three results from 2026 frame the question. All three are preprints or company write-ups, not peer-reviewed studies.
Interference is easy to construct and rare in mined pairs. Xia, Wu and Park ("Passes Alone, Fails Together", arXiv 2609.25396, September 2026) built tasks from 12 Django helpers where two agents' changes pass alone and fail together. On those constructed tasks, interference occurred in 97% of runs. On 834 runs over 417 pairs of real Django pull requests, only one run showed interference, after the authors corrected their grading. They warn that "The constructed failure rates do not estimate how often these problems occur in practice." Their most useful finding for practice: "A message describing the completed concurrent change recovered 82% of runs."
Many textual conflicts are not where you would look. Subramanian, Xu and Karthik (arXiv 2610.04779, October 2026) studied 715 pairs of pull requests and found that 79 of 167 textual conflicts (47.3%) occurred even though the two pull requests' authored files did not overlap. The cause was lineage: each pull request's diff was measured against its own base, while the merge compares both heads with their common base. They also note that replaying the merge with git locally took a median of 0.02 seconds, so checking every pair is cheaper than predicting which will conflict. This paper measures textual conflicts only; it gives no figures for clean merges that fail tests.
At scale, test after the merge. Anthropic's "Redesigning source control" (13 Oct 2026) reports merged changes rising from about 2,500 a day in May 2026 to over 30,000 a day in September. A global lock on a merge queue did not keep up, so "we've invested in post-merge and pre-deploy automated testing", accepting that "concurrent changes can conflict". The post does not say what happens when a post-merge test fails.
Read together: how often semantic conflicts happen between real agents is an open question, and the one measured remedy is telling an agent what its peer finished.
Why every text-level check misses them
A merge tool, a conflict predictor and a lock on files all work on text or on paths. Each answers "do these changes touch the same place?" A semantic conflict is two changes in different places that depend on each other through behaviour: a function's return value, a default, a config key, the order of side effects, a database column's meaning.
Forkit's merge check is a text-level check too. A fan-out agent sends its change since the commit it started from, and Forkit compares it with each peer's latest the way git's merge decides: changes to the same or adjacent base lines conflict unless identical. It gave the same verdict as git on all 26 merges CooperBench had recorded when the check was built, and on all 37 by the end of that week's runs. In the example above it would answer clean. When two agents started from different commits, it answers different_base and does not compare them, because comparing diffs from different bases gives exactly the false answers the lineage paper describes.
So the check catches what git merge would catch, before the agents finish instead of after. It does not run code. A merge check that runs the tests on the combined code before agents finish is not built yet.
What helps today
1. Tell the agent what was finished. Xia et al. recovered 82% of runs with a message describing the completed change. In Forkit, a message between agents can carry the change itself: forkit share --to AGENT -m "price_of now returns cents" sends the checkout's change as a patch, and the recipient runs forkit apply <id> to make the very same change in its own copy. Once B has A's change, B's own tests run against cents. The patch is never pasted into the message text; the recipient fetches it. See how to send a patch from one coding agent to another.
2. Give shared code one owner. Semantic conflicts cluster around shared definitions: a pricing function, a schema, a types file. If one agent owns those files and others ask it for changes, the change and its consequences sit with one agent. Forkit's file claims enforce one owner per file: a claim that overlaps another agent's is refused and names the holder, and with the hooks installed an edit under another agent's claim is refused. Claims are on paths, so they only help if the plan puts the shared definition in the owner's paths.
3. Split work by meaning as well as by files. "Store prices in cents" changes a contract that other tasks use. A planner that sees this can order it first, or block the tasks that depend on it until it is done. Forkit's tasks can block one another, and ready_tasks returns only tasks whose blockers are done (task dependencies for agents).
4. Run the tests on the combined result. After forkit fanout collect ID --merge merges every agent's branch, run the full suite on the merged branch before anything ships. In Forkit's recorded units-CLI run on staging (17 Nov 2026, one run, six Claude Code agents), the six branches merged with no conflict and 28 of 28 tests passed on the result. That was a run where each agent wrote its own files; the tests are what would have caught a semantic conflict had there been one.
5. Keep the base shared. Agents that start from different commits produce exactly the lineage mismatches that cause surprises. Forkit's fan-outs give every agent a fork of the same base, and its merge check measures each agent's change from the commit it started on, kept in .git/forkit-base, so an agent's own git commit does not move it.
A case from CooperBench
In Forkit's CooperBench runs (23 Nov 2026), two agents agreed that one would make both edits to a shared function. The other then tidied its own patch: "Wait, I need to remove the PathValue lines from my patch since they're part of my peer's feature, not mine." Its patch and its peer's were four lines apart, and git called them a conflict. That one was textual, and the merge check exists because of it. The same agreement could as easily have produced two patches far enough apart to merge cleanly, with one feature's call left out. An agreement in messages still leaves each agent with its own code, which is why patches between agents carry the change itself. See two coding agents, one function for the full account; the later rounds there ran once per pair.
What not to expect
- No text-level check, Forkit's included, will tell you that two clean changes disagree about what a function means.
- Claims and patches reduce semantic conflicts by changing who edits what and what each agent knows. They do not detect them.
- Tests catch semantic conflicts only where tests cover the behaviour. The discount banner bug survives a suite that never renders a banner.
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. Against semantic conflicts it offers one owner per file, patches that carry a finished change to the agents that depend on it, task dependencies, and a merge check that catches the textual conflicts before agents stop. The tests on the combined code are still yours to run. Forkit is free to try at forkit-mcp.com.
Related: how to run 50 coding agents without merge conflicts, merge queue, post-merge tests or a merge check for agents and how to check that parallel agents' work will merge.
Sources
Read on 25 Nov 2026:
- Xia, Wu, Park, "Passes Alone, Fails Together: Benchmarking Semantic Coordination in Parallel LLM-Agent Development", arXiv 2609.25396, 21 Sep 2026 (preprint): https://arxiv.org/abs/2609.25396
- Subramanian, Xu, Karthik, "Asymmetric Repository Lineage Modeling and Verifier-Guided Coordination in Concurrent AI Coding Agents", arXiv 2610.04779, 3 Oct 2026 (preprint): https://arxiv.org/abs/2610.04779
- Anthropic, "Redesigning source control at Anthropic", 13 Oct 2026: https://www.anthropic.com/research/redesigning-source-control
- Forkit, "Two Coding Agents, One Function: What We Learned Running CooperBench", 23 Nov 2026: /blog/two-agents-one-function-cooperbench
- Forkit's engineering notes: "Would our work merge?" (23 Nov 2026), "Patches between agents" (23 Nov 2026), "File leases" (23 Nov 2026), "A repository per fan-out agent" and the recorded demo (17 Nov 2026)