Platform support
Merge conflict resolution is available on the following platforms:GitHub
GitLab
Bitbucket
Azure
Usage
When CodeRabbit detects conflicts, it adds a resolution option to the PR summary comment.PR comment command
Comment
@coderabbitai fix merge conflict in any PR to trigger resolution on all supported platformsFinishing Touches checkbox
On GitHub, check the Resolve merge conflicts box in the CodeRabbit Walkthrough for one-click resolution
How it works
Detection
During PR review, CodeRabbit simulates the merge in a sandbox without modifying your working tree. If conflicts are found, they are listed in the summary comment alongside the resolution trigger.
Intent analysis
When resolution is triggered, CodeRabbit clones the repository and examines each conflicting file. For each file, it determines what problem the changes on each branch were solving (not just what changed, but why), so the resolution reflects the actual goals of both sides.
Resolution
CodeRabbit uses an AI agent that reasons through each conflict from first principles. Rather than applying rules, it reads both versions of the conflicting code alongside the full context of what each branch was trying to accomplish, then makes a judgment call about what the correct unified outcome should be.The agent works directly inside the repository: inspecting git state, reading files, running git commands, and editing code. It can make changes beyond the conflict hunks themselves if the resolution requires it, for example, restructuring code to accommodate both sets of changes rather than just picking one. Where the correct resolution is genuinely ambiguous or involves security-critical logic, the agent explicitly declines and flags the conflict for manual review instead of guessing.
Validation
CodeRabbit verifies that no conflict markers remain, that the merge index is fully cleared, and runs the repository’s build and lint commands to surface any errors introduced by the resolution.
When CodeRabbit won’t auto-resolve
CodeRabbit will decline to resolve a conflict if doing so incorrectly could cause serious harm:- Security-critical code: authentication logic, encryption, secrets handling, or access control
- Fundamentally incompatible business logic: where both changes make mutually exclusive architectural decisions that a human needs to decide
Command reference
Troubleshooting
Resolution failed: branch was updated during the process
Resolution failed: branch was updated during the process
If your branch receives a new commit while resolution is running, CodeRabbit aborts to avoid overwriting the incoming changes. Wait for the branch to stabilize, then trigger resolution again.
Some conflicts were not resolved
Some conflicts were not resolved
If CodeRabbit declines to resolve any file, no commit is created, not even for the files it could resolve. Check the resolution comment for the declined files and the specific reason for each. Resolve those files manually, push the changes, then trigger resolution again for the remaining conflicts.
Resolution ran but nothing was committed
Resolution ran but nothing was committed
This can occur if the agent could not produce a clean staged result. Try triggering resolution again. If it happens repeatedly, resolve the conflicts manually.
What’s next
Finishing Touches overview
See all available finishing touches and how to trigger them from any PR
Autofix
Automatically implement fixes for unresolved CodeRabbit review findings
Custom recipes
Define reusable, named recipes that encode your team’s repeated tasks into one-click agentic actions