Introducing Resolve Merge Conflicts

by
Konrad Sopala

Konrad Sopala

April 30, 2026

4 min read

Cover image

You're about to merge. Everything's green. Then GitHub hits you with: "This branch has conflicts that must be resolved." Here’s what you do next:

  • Pull main
  • Switch branches
  • Open the conflicting files
  • Try to remember what the other dev was even doing in this code
  • Mash some lines together, hoping nothing breaks
  • Push and pray for the CI

The conflict markers are noise around code that wasn't really fighting in the first place.

So why are you still stuck in the weeds for this?

Meet Resolve Merge Conflicts

When CodeRabbit detects conflicts in your PR, Resolve Merge Conflicts can fix them for you - reading the intent behind both sides, figuring out the right unified outcome, and committing it as a proper merge commit on your branch. It’s available on both GitHub and GitLab on the CodeRabbit Pro Plus plan. Here’s what that looks like.

Manual old way

The way it probably used to work for you before is that you stopped what you're doing, switched branches and manually reconciled someone else's changes with yours. After all that, you re-ran CI and hoped you didn't miss anything subtle.

The new way with one comment

You comment, CodeRabbit resolves and the merge commit lands on your branch with both parents intact.

How it works

There are two ways to use this feature.

Comment in the PR

In the PR thread just comment

A dark terminal window showing the command '@coderabbitai resolve merge conflict' with window control dots.

Checkbox in the PR walkthrough

On GitHub, when CodeRabbit detects conflicts during review, it adds a Resolve merge conflicts checkbox right inside the walkthrough comment — just tick it.

Both routes commit the resolved changes directly to your branch.

What happens when you trigger it?

When resolution runs, here's what's happening under the hood:

  • Detection: during PR review, CodeRabbit simulates the merge in a sandbox and lists any conflicts in the summary comment. Your working tree stays untouched.
  • Intent analysis: for each conflicting file, the agent reads both branches and works out why each side made the changes it did, not just what changed.
  • Resolution: an AI agent reasons through each conflict from first principles. It works directly inside the repo, inspecting git state, reading files, running git commands, editing code. It can make changes beyond the conflict hunks if the right outcome requires it.
  • Validation: it checks that no conflict markers remain, that the merge index is clean and runs your repo's build and lint to surface any errors introduced by the resolution.
  • Commit: the result lands as a proper merge commit with two parents (your branch and the base branch), so your git history reflects what actually happened.

When it’s extremely useful

Remember the last time you were on GitHub and a pull request had conflicts that were too complex for the web editor to resolve? With the Resolve Merge Conflicts feature, you will no longer be stopped by the error message: use the command line to resolve conflicts before continuing.

When CodeRabbit won't auto-resolve

The agent will decline a resolution rather than guess if doing so could cause real harm in two cases:

  • Security-critical code: Auth logic, encryption, secrets handling, access control. Wrong calls here are too costly to gamble on.
  • Fundamentally incompatible business logic: Where both sides made architectural decisions that contradict each other and a human needs to weigh in.

When it declines, the entire attempt is aborted so there are no partial commits or half-resolved files. You get a comment naming the file and the specific reason. The bar for declining is intentionally high, so the vast majority of conflicts get resolved automatically.

Try it out

Resolve Merge Conflicts is in open beta on the Pro Plus plan, available on GitHub and GitLab.

Next time you have a conflict, don't switch branches. Drop a comment in the PR and watch your merge conflicts disappear.

Get started with CodeRabbit

Catch the latest, right in your inbox.

GetStarted in2 clicks.