Context Theory Get your growth audit

Answer

How do you merge work produced by multiple coding agents?

One at a time, each rebased and re-tested against what is already merged. The conflicts that matter produce no conflict.

Integrate one change at a time, rebasing and re-running the tests after each. The dangerous conflicts are semantic rather than textual: two changes that merge cleanly and are incompatible in behaviour.

The mechanical part is ordinary and the discipline is not to skip it. Take one change, rebase it onto the current state, run the full test suite, review, merge. Then the next one, rebased onto the result. Merging several at once, or merging each against the state it was written on, is where the trouble comes from, because each was developed against a base that no longer exists.

The failure that matters is the semantic conflict: two changes that touch different files, merge without complaint, and are incompatible in behaviour. One adds validation at the boundary while the other assumes the value was already normalised. Two independent implementations of the same helper, both correct, now both present. A field interpreted differently by two new readers. Nothing in the version control system knows about any of this, and the tests will only catch it if a test happens to exercise both paths.

This is why re-running the full suite after each rebase is not a formality. A change that passed on its own base is untested on the merged base, and the semantic conflict is precisely what appears in that gap. It is also why the order can matter: integrating the change that alters shared behaviour before the ones that build on it surfaces the incompatibility while it is still one change's problem.

The strongest preventive measure sits before the work rather than after it. Agreeing the interface between the pieces in advance — what each will own, what shapes they exchange, which one is responsible for a shared concern — removes most semantic conflicts by construction. Parallel work without that agreement is two independent designs that have to be reconciled during integration, which is the most expensive place to do it.

During integration, a specific check is worth doing manually: look for the same thing implemented twice. Two agents solving adjacent problems will each write the helper they needed, and both will merge cleanly. A search for the new function names across the merged result takes a minute and finds this reliably, whereas reading the two diffs separately does not, because each is individually sensible.

Finally, resist reconciling by having an agent merge the branches. It will produce something that compiles and passes, by choosing between the two designs in a way nobody decided. Where two changes conflict semantically, the resolution is a decision about which approach the system takes, and that decision should be made explicitly and then implemented, rather than discovered afterwards in the merged code.

A clean merge is a statement about text, and nothing about text knows that both changes decided to own the same responsibility.

Siddharth Sharma, Context Theory

Related questions

Should the branches be rebased or merged?

Either mechanically, and rebasing gives a clearer answer to the question that matters: does this change work against what is currently there. A merge commit records the combination, a rebase produces the change as it would have been written today, and the second is easier to test and to review. The important part is that the tests run on the combined state either way.

How do you find semantic conflicts before production does?

Tests that exercise the paths both changes touched, and a manual scan for duplicated new functionality. Neither is complete. The realistic position is that parallel work carries a residual integration risk that sequential work does not, and the right response is to keep parallel batches small enough that the residual is manageable.

METHOD

Every figure below carries its source and the date it was verified. Nothing on this page is asserted.

The numbers on this page.

Datapoints
What Value Specific to
Close rate — response under 5 minutes vs over 24 hours32% vs 12%Category-wide
Sub-15-minute compliance — automated routing vs manual only62.5% vs 39.1%Category-wide

Optifai speed-to-lead benchmark · n=939 companies · Q2 2025–Q1 2026 · verified

2026 speed-to-lead benchmark · verified

What is specific to this page.

Evidence
Kind Claim Check it against
SoftwareSemantic conflicts merge cleanly because version control compares text, so two changes touching different files can be behaviourally incompatible — duplicated responsibility, an assumption about normalisation, a field read differently — with no signal from the merge.Merging two independently developed changes and searching the result for duplicated new functionality.
WorkflowA change that passed on its original base is untested on the merged base, which is exactly the gap where a semantic conflict appears, so re-running the full suite after each rebase is a substantive check rather than a formality.Comparing suite results for a change on its original base and on the current merged state.
ResponseIntegration order matters because merging the change that alters shared behaviour before those that build on it surfaces an incompatibility while it remains attributable to a single change.Integrating the same set of changes in two orders and comparing where failures appear.
ConstraintResolving a semantic conflict by having an agent merge the branches produces code that compiles and passes while silently choosing between two designs, so the resolution should be an explicit decision that is then implemented.Reviewing an agent-produced merge resolution for which of the two approaches it adopted and whether anyone chose it.

Each row would be wrong on another industry's page. Where a sourced figure exists it is in the table above instead; these are the constraints that shape the work and do not happen to be numbers.

Start with the measurement.

Reading about a benchmark is not the same as knowing your own number. The audit produces yours, measured rather than estimated.

Get your growth audit

$497 · delivered in 5 business days · credited against month one