Skip to main content
| Failing CI checks stall a pull request and often send you digging through job logs to find what broke. When CI fails on a PR, you can ask CodeRabbit to investigate the failing checks and fix them for you: it reads the failing checks and their output, works through the fix in a sandbox, and opens a stacked pull request with the changes so you can review them before they land.

Platform support

Fix CI failures is available on GitHub only.

GitHub

GitHub Cloud and GitHub Enterprise Server (self-hosted).

Usage

Comment on any pull request that has failing CI checks:
CodeRabbit investigates the failing checks and opens a stacked pull request targeting your PR branch with the proposed fixes. Merge that pull request into your branch to apply the fix; your original PR’s CI then re-runs against it.
Fix CI failures is triggered only by the @coderabbitai fix-ci comment. Unlike some other finishing touches, it does not have a checkbox in the comment.

How it works

1

Trigger

Comment @coderabbitai fix-ci on a pull request that has failing CI checks. CodeRabbit collects the checks reported as failing on the PR’s head commit.
2

Investigate

CodeRabbit clones the repository into a sandbox and gathers context for the failing checks: the available failure output and the relevant CI configuration for the jobs that ran. This tells the agent what failed and how each job is invoked, rather than guessing from the check name alone.
3

Fix

A coding agent works directly in the repository, reading files and editing code to address the failures. It focuses on the code under test: infrastructure and configuration files (CI and build config, lock files, and other dependency manifests) are left out of the change and surfaced separately so you can apply them yourself if they are genuinely needed.
4

Deliver

CodeRabbit opens a stacked pull request targeting your PR branch with the fix. The status comment lists the failing checks it addressed and the files it changed.
Because the fix is delivered as a separate pull request, your project’s real CI runs against it. That run is the source of truth for whether the failures are actually resolved.

Re-running the fix

Re-running fix-ci behaves like a retry, and where the changes land depends on which pull request you comment on:
  • On the stacked pull request (the one CodeRabbit opened): if it has its own failing CI checks, CodeRabbit commits the new fix directly to that pull request instead of stacking another one on top. This lets you iterate in place until its CI is green.
  • On your original pull request: CodeRabbit opens a fresh stacked pull request for the current failures.

Scope and limitations

  • GitHub only. Fix CI failures is not available on GitLab, Azure DevOps, or Bitbucket.
  • Stacked pull request output. Fixes are delivered as a new pull request targeting your PR branch, not committed directly to it. If your CI only runs on PRs targeting specific branches (for example main), it may not run on the stacked PR itself; merge the stacked PR into your branch and CI validates on the original PR.
  • Infrastructure and dependency files are not committed. Changes the agent makes to CI/build config, lock files, or other dependency manifests are excluded from the pull request and listed in the status comment so you can apply them manually.
  • Workflow files are excluded. CodeRabbit cannot commit changes under .github/workflows/. If a fix requires editing a workflow file, it is surfaced in the status comment for you to apply.

Command reference

Also accepts @coderabbitai fix ci and @coderabbitai fixci.

Configuration

Fix CI failures is enabled by default for eligible repositories. To turn it off, set the following in your .coderabbit.yaml:

Troubleshooting

Fix CI failures requires a Pro Plus plan and is available on GitHub only. Confirm the repository is on a Pro Plus plan and that the pull request is on GitHub. If it was turned off in configuration, set reviews.finishing_touches.fix_ci.enabled to true.
Infrastructure, CI/build config, and dependency files are intentionally left out of the stacked PR. If the only changes the agent produced were out of scope, no fix pull request is created; the status comment lists the files it touched so you can apply them manually.
The stacked pull request runs your real CI, which may surface remaining or new failures. Comment @coderabbitai fix-ci on the stacked pull request to have CodeRabbit commit another fix directly to it, or comment on your original pull request to open a fresh stacked PR. You can also resolve the remaining failures 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

Resolve merge conflicts

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