Skip to main content
| Fix comments helps you resolve review feedback faster by applying code changes for unresolved CodeRabbit findings in your pull request. Use Fix comments when you want CodeRabbit to implement fixes automatically, then review the resulting commit or stacked PR. Fix comments runs as a task. Open the task to follow its activity, steer the work, and review the proposed patch before delivery. See Work with a coding task. For ongoing automatic publication and follow-up repairs, use Autofix instead. You turn it on from the coding task, with @coderabbitai autopilot, or, on GitHub, with the Autofix checkbox in CodeRabbit’s PR comment.

Usage

You can trigger Fix comments from a pull request comment on GitHub, GitLab, Azure DevOps, or Bitbucket Cloud. On GitHub, you can also select the Fix comments checkbox in CodeRabbit’s review comment. See Review comment controls.
Open a separate stacked PR with fixes
Apply fixes to your current PR branch
GitHub, GitLab, Azure DevOps, and Bitbucket Cloud support @coderabbitai fix comments for direct commits to the current branch and @coderabbitai fix comments stacked pr for a stacked pull request. The Fix comments checkbox is available on GitHub only.

Review comment controls

When a review posts inline findings with fix instructions, CodeRabbit adds Fix comments to the end of its review comment, the one that starts with Actionable comments posted.
  • GitHub: a Fix comments checkbox. Select it to run Fix comments on that review’s unresolved findings and push a commit to the current branch. If the run fails or is skipped, CodeRabbit shows the result next to the checkbox so you can select it again to retry.
  • GitLab, Azure DevOps, and Bitbucket Cloud: a Fix comments section that tells you to post @coderabbitai fix comments.
The checkbox commits to the current branch. To get the fixes as a separate stacked PR, post @coderabbitai fix comments stacked pr instead.

How it works

1

Trigger a fix

Reply with @coderabbitai fix comments inside a CodeRabbit review thread to fix only that thread’s unresolved finding. Post @coderabbitai fix comments in the pull request conversation to fix all unresolved CodeRabbit review threads, or use @coderabbitai fix comments stacked pr to request a separate stacked PR. On GitHub, you can also select the Fix comments checkbox in CodeRabbit’s review comment.
2

Collect fix instructions

CodeRabbit scans unresolved review threads started by CodeRabbit and gathers fix instructions from the Prompt for AI Agents blocks. The scanned set depends on where you issued the command: the current review thread for an inline command, or all unresolved CodeRabbit review threads for a command in the pull request conversation.
3

Generate and verify fixes

The coding agent applies fixes, then runs a repository setup + build verification step. Even if verification fails, the generated changes are still delivered so you can continue iterating.
4

Deliver the result

CodeRabbit pushes a commit to the current branch, or opens a stacked PR when you use @coderabbitai fix comments stacked pr.

Output options

Commit to current branch

Use @coderabbitai fix comments to push a commit directly to your current branch. This is the fastest path when you want fixes in the same review, and it is supported on GitHub, GitLab, Azure DevOps, and Bitbucket Cloud.

Create stacked PR

Use @coderabbitai fix comments stacked pr to open a new branch off your working branch and submit a separate stacked pull request, which lets you review the generated changes independently.

Configuration

Fix comments is enabled by default. To turn it off for a repository, set reviews.finishing_touches.autofix.enabled to false in your .coderabbit.yaml:
When Fix comments is disabled:
  • The Fix comments checkbox and Fix comments section are hidden from the review comment.
  • The @coderabbitai fix comments command is removed from the CodeRabbit help output.
  • CodeRabbit declines all one-off repair requests, including @coderabbitai fix comments and the fix-comments, fix, autofix, auto-fix, and auto fix aliases, with or without stacked pr, and points to this setting.
Fix comments also requires an Essentials plan or higher. The configuration toggle only controls availability once your plan already supports Fix comments.

Scope and limitations

  • Fix comments runs only on pull request events.
  • Fix comments scope depends on command location. An inline command scopes to the current review thread only. A pull-request-conversation command scopes to all unresolved CodeRabbit review threads. The checkbox in a review comment scopes to that review’s unresolved threads.
  • Fix comments only processes unresolved CodeRabbit review threads with valid fix instructions.
  • When the pull request has merge conflicts, Fix comments exits without making changes. Resolve the conflicts against the base branch, then trigger Fix comments again.
  • If no valid unresolved instructions are found, Fix comments skips execution and reports that no fixes were applied.
  • Fix comments may be rate-limited. If limits are exceeded, CodeRabbit responds with a wait time before retrying.

Command reference

For compatibility, fix-comments, fix, autofix, auto-fix, and auto fix remain one-off repair aliases, with or without stacked pr. Use fix comments in new requests. These aliases run Fix comments, not Autofix. To turn on Autofix, post @coderabbitai autopilot.

Troubleshooting

Fix comments only acts on unresolved CodeRabbit review comments that include structured fix instructions. Resolve state, missing instruction blocks, or non-CodeRabbit threads can lead to no-op runs.
Build/verification can fail after code edits. In this case, CodeRabbit still keeps and delivers the generated fixes so you can continue iteration.
Fix comments stops before cloning or generating changes when the platform reports that the pull request cannot be merged. Resolve the conflicts with the base branch, then run Fix comments again.CodeRabbit will also suggest running @coderabbitai resolve merge conflict from the Fix comments reply. See Resolve merge conflicts for details.
Stacked PR creation may fail due to platform or API limitations. If this happens, use @coderabbitai fix comments to apply the fixes as a direct commit to your current branch instead.
If the Fix comments checkbox or Fix comments section is absent from a review comment with findings, the command is missing from help, or CodeRabbit replies that Fix comments is disabled for the repository, Fix comments has been turned off in your configuration. Set reviews.finishing_touches.autofix.enabled to true in your .coderabbit.yaml (see Configuration). Fix comments also requires an Essentials plan or higher.

What’s next

Finishing Touches overview

See all available finishing touches and how to trigger them from any PR

Custom recipes

Define reusable, named recipes that encode your team’s repeated tasks into one-click agentic actions

Resolve merge conflicts

Let CodeRabbit analyze the intent behind conflicting changes and commit a clean resolution to your branch