Claude Code Review left an Important finding on a pull request, yet the PR merged under branch protection. Why, and how would you gate merges on its findings?
answer
- findings inform, never approve or block
- three severity markers
- a check run that always ends neutral
- machine-readable line in the Details text
- your own CI reads the counts
basics
~20 sCode Review never approves or blocks a pull request: its Claude Code Review check run always ends neutral, so branch protection cannot fail on it. To gate merges, your own CI parses the check run's severity counts and fails on Important.
solid answer
~50 sCode Review is a managed service, in research preview for Team and Enterprise plans, that reviews GitHub pull requests with several agents on Anthropic's infrastructure and posts inline comments tagged **Important** (fix before merging), **Nit** or **Pre-existing**. By design its findings don't approve or block, and the **Claude Code Review** check run always ends **neutral**, even when a review fails or times out. To gate merges, add a job in your own CI that finds that check run's ID for the commit with `gh api`, reads its output text, and parses the machine-readable comment on the last line, which yields counts such as `{"normal": 2, "nit": 1, "pre_existing": 0}`. `normal` is the number of Important findings: fail the job when it is non-zero. Decide too what the gate does when no review exists, because runs are best-effort.
code
bash · 15 lines#!/usr/bin/env bash
set -euo pipefail
# REPO=owner/name and SHA come from the CI environment
run_id=$(gh api "repos/$REPO/commits/$SHA/check-runs" \
--jq '.check_runs[] | select(.name == "Claude Code Review") | .id' | head -n1)
if [ -z "$run_id" ]; then
echo "No Claude Code Review run for $SHA" >&2
exit 1 # fail closed: no review means no merge
fi
important=$(gh api "repos/$REPO/check-runs/$run_id" \
--jq '.output.text | split("bughunter-severity: ")[1] | split(" -->")[0] | fromjson | .normal')
if [ "$important" -gt 0 ]; then
echo "Code Review reported $important Important finding(s)" >&2
exit 1
figo deeper
Remember that Code Review comments with severity-tagged findings but never approves or blocks a pull request.
Explain the three severities, where findings show up beyond inline comments, and how @claude review differs from @claude review always.
Build the merge gate from the check run's machine-readable counts, knowing normal means Important, and choose fail-open or fail-closed for missing reviews.
Weigh per-push review cost and a best-effort service against gating merges on it, and decide which repositories justify which Review Behavior.
## What Code Review is **Code Review** is Anthropic's managed pull request reviewer for GitHub. It is in **research preview**, available on **Team and Enterprise** plans, and not available to organizations with Zero Data Retention. An organization Owner enables it once in Claude Code's admin settings, installs the Claude GitHub App and picks repositories; nobody writes a workflow. When a review runs, several agents analyse the diff and surrounding code in parallel on Anthropic's infrastructure, each looking for a different class of issue, and a **verification step** checks candidates against actual code behaviour to filter out false positives. Results are deduplicated, ranked by severity and posted. By default it focuses on correctness: bugs that would break production rather than formatting or missing tests. ## Severity levels | Severity | Meaning | Marker in the Files changed tab | | - | - | - | | **Important** | a bug that should be fixed before merging | red | | **Nit** | a minor issue, worth fixing but not blocking | yellow warning | | **Pre-existing** | a bug in the codebase that this PR did not introduce | gray notice | Each finding carries a collapsed **Why this was flagged** section explaining the reasoning and how the issue was verified. ## Where findings appear - **Inline review comments** on the lines where issues were found, with a summary in the review body. - The **Claude Code Review check run**, whose **Details** view lists every finding with file, line and summary, sorted by severity. - **Annotations** in the **Files changed** tab, written independently of the inline comments, so they survive when GitHub rejects a comment on a line that moved. - An **Additional findings** heading in the review body, for findings on lines that no longer exist because you pushed during the review. ## Why it never blocks The service is built to leave existing review workflows intact: findings **don't approve or block** the pull request, and the check run **always completes with a neutral conclusion**. A failed review ("Code review failed") or a timed-out one is neutral too. Branch protection that requires the check therefore sees it satisfied whatever it found. That is not a misconfiguration; it is the documented contract. Replying to a finding does not make Claude respond or change the PR either: you fix the code and push, or resolve the thread to dismiss it. ## Rating and dismissing findings Each finding arrives with thumbs-up and thumbs-down reactions already attached. Anthropic collects the counts after the PR merges to tune the reviewer; a reaction triggers no re-review and changes nothing on the PR. To dismiss a finding without changing code, resolve its thread. In a PR subscribed to push-triggered reviews, the next run resolves a thread on its own once the issue is fixed. ## Gating merges yourself The last line of the check run's Details text is a **machine-readable comment** meant for exactly this. A gate job in your own CI: 1. Finds the check run: `gh api repos/OWNER/REPO/commits/<sha>/check-runs` and takes the `id` of the run named `Claude Code Review`. 2. Reads its output text and extracts the JSON from the `bughunter-severity:` comment with `jq`. 3. Gets counts such as `{"normal": 2, "nit": 1, "pre_existing": 0}`. The **`normal` key holds the Important count**. 4. Fails when `normal` is non-zero, and makes that job a required check under branch protection. Decide explicitly what the gate does when no review exists for the commit: reviews average about 20 minutes, a spend cap or exhausted usage credits make Code Review skip the review and post a comment instead, and some PRs are never reviewed automatically. Failing closed blocks merges whenever the service is slow or skipped; failing open lets those PRs through. ## Operating notes - **Review Behavior** per repository decides when reviews run: once after PR creation, after every push, or manual. - A top-level comment **`@claude review`** starts one review without subscribing the PR to later pushes; **`@claude review always`** also subscribes it. The commenter needs write, maintain or admin permission, and the PR must be open. - A pull request from a **fork** is reviewed only when someone comments `@claude review`; pushes and **Re-run** start nothing. - Each review averages $15-25, billed separately through usage credits; reviewing after every push multiplies that by the number of pushes.
- How do you get a fresh Code Review on a pull request without pushing, and how does @claude review always differ?Post `@claude review` as a top-level PR comment, with the command at the start: it runs one review without subscribing the PR to later pushes. `@claude review always` runs a review and subscribes the PR to push-triggered reviews. You need write, maintain or admin permission and the PR must be open; manual requests run even on drafts. Replying to an inline finding starts nothing.
- A contributor's fork pull request got no review in a repository set to review after every push. Why?Code Review never reviews a fork pull request automatically, whatever the Review Behavior. Someone with write access to the base repository must comment `@claude review`; pushing new commits or clicking Re-run on the check starts nothing. `@claude review always` also works but does not subscribe a fork PR to later pushes.
- A developer with write access through a team comments @claude review and gets only an eyes reaction. What is going on?Their organization membership is private, GitHub's default, so GitHub doesn't identify them to Claude as a member, and team or base permissions don't count. Claude may react with eyes but starts no review. Making the membership public, or adding them to the repository directly as a collaborator, fixes it.
- An Important finding fails the check run and blocks the merge
- Replying to Claude's inline comment makes it re-review or fix the code
- A thumbs-down reaction on a finding triggers a re-review
- A failed or timed-out review blocks the merge until it is re-run
- Code Review is available on every plan, Pro included