coderabbit-failover

One CodeRabbit review budget for all your agents, and a backup review when it runs out. A Claude Code skill. A shared ledger books each review slot before an agent spends it. When CodeRabbit is rate-limited, a reviewer on your Mac reviews the PR instead.

What an agent runs when it wants a review:

$ budget run --kind pr --repo OWNER/REPO --pr N -- \ gh pr comment N -R OWNER/REPO --body "@coderabbitai review" # exit 75 means hold. Do not wait for the window: $ budget failover --repo OWNER/REPO --pr N

budget is python3 <skill>/scripts/coderabbit_budget.py. The commands are the ones SKILL.md tells the agent to use.

Who it is for

People who run many coding agents against CodeRabbit. CodeRabbit limits reviews per developer, in one pool shared by every repo and PR, and parallel agents burn that pool fast.

I use it to let agents merge PRs on their own when CI is green and a real review passed on the head commit. The ledger stops two agents from spending the same slot. For open, same-repo PRs in repos it watches, the backup review runs instead of waiting for CodeRabbit's next window.

How it works

One ledger

scripts/coderabbit_budget.py keeps one file, ~/.claude/coderabbit/ledger.json. run checks the budget and books the slot under a file lock, then runs your command. On hold it exits 75 and never runs it. If CodeRabbit answers with a rate-limit message, the slot is given back and the stated wait is recorded for every session.

A reviewer on your Mac

reviewer/local_reviewer.py runs every 3 minutes under launchd and reviews up to 3 PRs at once, one per repo. It starts on a CodeRabbit rate-limit comment, or on a /open-code-review comment from an owner, member or collaborator. budget failover posts that comment, and does not use CodeRabbit budget.

The backup review

open-code-review in delegation mode with headless Claude Code (Opus 5.5, effort medium) on your subscription, in its own config folder: no user hooks, memory or CLAUDE.md, and the PR's settings, MCP and skills are ignored. Claude only reads the PR. The script posts inline comments, a summary, and a review-failover commit status.

Was the head reviewed?

scripts/coderabbit_status.py counts a review only if it ran on the current head commit: CodeRabbit's "Review completed" status, a "No actionable comments" comment whose range ends at the head, or review-failover success. The green stamp @coderabbitai ignore leaves does not count.

The review-failover commit status
pendingReview running.
successNo critical or high findings.
failureCritical or high findings. Fix and push.
errorFailed 3 times. Comment /open-code-review to retry.

Install

Install the skill. Needs Python 3.10+ and an authenticated gh.

git clone https://github.com/Tatendaz/coderabbit-failover ~/.claude/skills/coderabbit-failover python3 ~/.claude/skills/coderabbit-failover/scripts/coderabbit_budget.py selftest

Set up the backup reviewer (macOS)

  1. Install open-code-review where the reviewer finds it:
    mkdir -p ~/.review-failover/.tools && cd ~/.review-failover/.tools npm install @alibaba-group/open-code-review@1.12.9
  2. Put a Claude Code token in the Keychain. It reviews on your subscription, not API credits.
    claude setup-token security add-generic-password -U -a "$USER" -s claude-code-oauth-token -w
  3. Try it. Nothing is posted with --dry-run. Step 1 left you in ~/.review-failover/.tools, so go back to the skill folder first.
    cd ~/.claude/skills/coderabbit-failover REVIEW_FAILOVER_OWNER=<your-github-user> python3 reviewer/local_reviewer.py --dry-run
  4. Run it every 3 minutes: fill in launchd/review-failover.plist.template (in the skill folder), copy it to ~/Library/LaunchAgents/local.review-failover.plist, then launchctl load ~/Library/LaunchAgents/local.review-failover.plist.
Settings
REVIEW_FAILOVER_OWNER(required)GitHub user or org to watch.
REVIEW_FAILOVER_HOME~/.review-failoverState, cache, tools.
REVIEW_FAILOVER_KEYCHAINclaude-code-oauth-tokenKeychain item with the token.
REVIEW_FAILOVER_NOTIFYnoneA command that takes one message. Called once per run for the PRs that failed 3 tries (it names the first few, then "+N more").
REVIEW_FAILOVER_CONCURRENCY3Reviews that run at the same time (1 to 8). One per repo at a time.
CODERABBIT_LEDGER_DIR~/.claude/coderabbitWhere the ledger lives.

Status and limits

First public release, October 2026. No tagged releases yet.

  • The backup reviewer is macOS only. It uses launchd and the Keychain. It runs while the Mac is awake and catches up on wake.
  • It covers repos you own that are not archived, not forks, and were pushed this year. Fork PRs are skipped.
  • The ledger and the status script each have an offline selftest (49 and 70 checks). The reviewer has --dry-run and offline unit tests for its worker pool. CI runs all three on every PR.
  • The backup review is one model's opinion. It catches a lot, not everything.
  • CodeRabbit's limit messages change. If one stops being detected, add it to RATE_RE.