This feature is in early access. Enable it by setting
early_access: true in your .coderabbit.yaml, or by toggling Early Access on the web interface.This feature is available exclusively as part of the Pro plan. Please refer to our pricing page for more information about our plans and features.
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
Each conflict is resolved based on the intent of both branches:
- Content conflicts: intelligently merged, preserving the intent of both sides
- Add/add conflicts (two branches add the same symbol): both are kept with descriptive renames
- Delete-modify conflicts: explicit keep-or-delete decision based on branch intent
- Rename conflicts: final target paths are verified to be intentional
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
The bar for declining is intentionally high. CodeRabbit will attempt to resolve the vast majority of conflicts automatically. If you believe a declined conflict is safe to auto-resolve, resolve it manually and push, or leave a comment describing the situation and we’ll take a look.
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
Check the resolution comment for files CodeRabbit declined, each listed with a specific reason. Resolve those files manually and push — the merge commit from CodeRabbit already covers everything else.
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 and use the feedback link in the comment to let us know.
What’s next
Autofix
Automatically implement fixes for unresolved CodeRabbit review findings
Generate unit tests
Generate comprehensive unit tests for your PR changes
Review commands
Full reference for all PR comment commands