Review locally with /code-review changedcode-review-local
Nearest release: v2.1.304, published 6 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 20 Oct 2026 02:25 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 22 Oct 2026 18:07 UTC.
Upstream edited
Recorded here
Lines+26added
Lines−26removed
From line
8
where the diff opens
First seen
15 Oct 2026
this site's first read of the page
Recorded edits5to this page, all time
The whole hunk
from line 8, old and new numbered
/
from line 8
88
99> [!NOTE]
1010>
11> To have every pull request in a repository reviewed automatically on GitHub, see [Code Review](/docs/en/code-review), a managed service that an Owner turns on for your organization.
11> To have every pull request in a repository reviewed automatically on GitHub, see [Code Review](/docs/en/code-review.md), a managed service that an Owner turns on for your organization.
1212
1313`/review` is an alias of `/code-review`. Before v2.1.223, `/review` was a separate command that ran a single-pass, read-only review of a GitHub pull request.
1414
from line 24
2424
2525You can also add flags:
2626
27* `--fix`: also asks Claude to apply the findings to your working tree after the review. Its edits go through your [permission mode](/docs/en/permission-modes).
27* `--fix`: also asks Claude to apply the findings to your working tree after the review. Its edits go through your [permission mode](/docs/en/permission-modes.md).
2828* `--comment`: posts the findings on a GitHub pull request as inline comments, or on a [GitLab merge request](#post-findings-to-a-gitlab-merge-request) as a single note
2929
3030**2. Keep working**
3131
32The review runs as a background [subagent](/docs/en/sub-agents) with its own context window, so it doesn't fill your conversation. The findings arrive in your conversation when the review completes.
32The review runs as a background [subagent](/docs/en/sub-agents.md) with its own context window, so it doesn't fill your conversation. The findings arrive in your conversation when the review completes.
3333
3434**3. Act on the findings**
3535
from line 57
5757Check these before you run a review, especially with `--fix`:
5858
5959* **Edits**: without `--fix`, the review's instructions ask Claude for a report only. With `--fix`, they also ask it to apply the findings to your working tree. Either way, any edit goes through your permission mode.
60* **Rewinding**: a background review applies its `--fix` edits outside your session's [checkpoints](/docs/en/checkpointing#subagent-edits-not-restored). After one, `/rewind` restores only the files Claude had already edited in your conversation. The review's edits to other files stay, so use git to revert them. When the review [runs in the foreground](#run-in-the-foreground), it edits your working tree during your own turn, so `/rewind` restores its edits as usual.
61* **Instructions**: the review follows your `CLAUDE.md`, including in a non-interactive `-p` run. It doesn't read `REVIEW.md`. That file configures the managed [Code Review service](/docs/en/code-review-customize#use-review-md-for-review-only-rules) on GitHub pull requests.
60* **Rewinding**: a background review applies its `--fix` edits outside your session's [checkpoints](/docs/en/checkpointing.md#subagent-edits-not-restored). After one, `/rewind` restores only the files Claude had already edited in your conversation. The review's edits to other files stay, so use git to revert them. When the review [runs in the foreground](#run-in-the-foreground), it edits your working tree during your own turn, so `/rewind` restores its edits as usual.
61* **Instructions**: the review follows your `CLAUDE.md`, including in a non-interactive `-p` run. It doesn't read `REVIEW.md`. That file configures the managed [Code Review service](/docs/en/code-review-customize.md#use-review-md-for-review-only-rules) on GitHub pull requests.
6262
6363## How findings are reported
6464
6565Claude reports the findings as text in the reply in both of these runs:
6666
67* In a terminal session, where `/code-review` runs the review as a [forked subagent](/docs/en/skills#run-skills-in-a-subagent)
67* In a terminal session, where `/code-review` runs the review as a [forked subagent](/docs/en/skills.md#run-skills-in-a-subagent)
6868* In a `-p` run with text or JSON output
6969
70In a host application that requests the findings list, such as the [desktop app](/docs/en/desktop#review-your-code), Claude reports the review's findings through the [`ReportFindings` tool](/docs/en/tools-reference) instead. The report appears as a findings list, and each entry shows the file location, a one-sentence summary, and a category tag such as `correctness` when the finding carries one. A host request applies at every effort level and requires Claude Code v2.1.218 or later.
70In a host application that requests the findings list, such as the [desktop app](/docs/en/desktop.md#review-your-code), Claude reports the review's findings through the [`ReportFindings` tool](/docs/en/tools-reference) instead. The report appears as a findings list, and each entry shows the file location, a one-sentence summary, and a category tag such as `correctness` when the finding carries one. A host request applies at every effort level and requires Claude Code v2.1.218 or later.
7171
7272When Claude fixes reported findings later in the session, it reports them again. Claude Code then marks each finding in the updated findings list as fixed, skipped, or no change needed.
7373
from line 75
7575
7676Beyond `--fix` and `--comment`, the command takes these flags:
7777
78* `--post`: on an `ultra` cloud review of a `github.com` pull request, preselects posting the finished findings to the PR in the launch dialog. See [Post findings to the pull request](/docs/en/ultrareview#post-findings-to-the-pull-request). Requires Claude Code v2.1.227 or later.
78* `--post`: on an `ultra` cloud review of a `github.com` pull request, preselects posting the finished findings to the PR in the launch dialog. See [Post findings to the pull request](/docs/en/ultrareview.md#post-findings-to-the-pull-request). Requires Claude Code v2.1.227 or later.
7979* `--max-findings <n>`, `--max-findings all`, or `--max-findings default`: reports up to `n` findings, or every finding with `all`, in place of the review's usual limit. Where the review reports through the findings tool, the limit is 32. Later reviews reuse the value you typed until you pass `--max-findings default`, but a value passed in a non-interactive `-p` run isn't remembered. Requires Claude Code v2.1.288 or later.
8080
81Pass an [effort level](/docs/en/model-config#adjust-effort-level) to trade coverage for confidence. At `low`, the review reports the findings it's most confident in, so you see fewer false positives. From `medium` through `max`, the review broadens coverage.
81Pass an [effort level](/docs/en/model-config.md#adjust-effort-level) to trade coverage for confidence. At `low`, the review reports the findings it's most confident in, so you see fewer false positives. From `medium` through `max`, the review broadens coverage.
8282
8383When you don't type a level, the review reuses the last level from `low` through `max` you typed, even in an earlier session. Claude Code shows a notice such as `Reusing high effort, the level you typed last time`. These rules decide which level a run uses:
8484
from line 99
9999
100100After the effort level and flags, Claude Code reads the rest of the line as the review target. The `ultra` argument changes that reading:
101101
102* **With `ultra`**: Claude Code reads a single word as a base branch or PR number. Longer text that doesn't name a branch or PR becomes [a note attached to the review](/docs/en/ultrareview#pass-a-request-in-plain-words). `/code-review ultra check my auth changes` reviews your current branch, and Claude relates the findings to your note.
103* **Without `ultra`**: everything left is the review target, even when it starts with another command name. `/code-review /fix-issue 123` reviews with `/fix-issue 123` as target text instead of loading `/fix-issue` as a second [stacked skill](/docs/en/skills#stack-several-skills-in-one-message). Before v2.1.218, a command stacked after `/code-review` expanded as its own skill.
102* **With `ultra`**: Claude Code reads a single word as a base branch or PR number. Longer text that doesn't name a branch or PR becomes [a note attached to the review](/docs/en/ultrareview.md#pass-a-request-in-plain-words). `/code-review ultra check my auth changes` reviews your current branch, and Claude relates the findings to your note.
103* **Without `ultra`**: everything left is the review target, even when it starts with another command name. `/code-review /fix-issue 123` reviews with `/fix-issue 123` as target text instead of loading `/fix-issue` as a second [stacked skill](/docs/en/skills.md#stack-several-skills-in-one-message). Before v2.1.218, a command stacked after `/code-review` expanded as its own skill.
104104
105105## Run in the foreground
106106
107107To make the review run in the foreground, do one of these:
108108
109* Run it in non-interactive mode, with the `-p` flag or the Agent SDK. Claude Code waits for the review and includes the findings in the response, except for `ultra`, which [doesn't wait for the cloud review](/docs/en/ultrareview#run-ultrareview-non-interactively).
109* Run it in non-interactive mode, with the `-p` flag or the Agent SDK. Claude Code waits for the review and includes the findings in the response, except for `ultra`, which [doesn't wait for the cloud review](/docs/en/ultrareview.md#run-ultrareview-non-interactively).
110110* Set [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](/docs/en/env-vars) to `1`, which also turns off every other background task feature
111111* Run `/code-review` again while an earlier review is still in progress
112112
from line 117
117117Claude can start `/code-review` on its own, without you typing the command:
118118
119119* **When you ask in plain language**: ask Claude to review your changes and it can run the skill
120* **From a scheduled task**: a [session-scoped scheduled task](/docs/en/scheduled-tasks) with `/code-review` as its prompt runs the review
120* **From a scheduled task**: a [session-scoped scheduled task](/docs/en/scheduled-tasks.md) with `/code-review` as its prompt runs the review
121121
122122A session-scoped scheduled task never launches the [cloud review](#escalate-to-ultrareview), so schedule `/code-review` without the `ultra` argument.
123123
124To stop both Claude and scheduled tasks from starting the review while keeping `/code-review` available for you to type, add a [`skillOverrides`](/docs/en/skills#override-skill-visibility-from-settings) entry to a [settings file](/docs/en/settings#where-settings-live) such as `~/.claude/settings.json`:
124To stop both Claude and scheduled tasks from starting the review while keeping `/code-review` available for you to type, add a [`skillOverrides`](/docs/en/skills#override-skill-visibility-from-settings) entry to a [settings file](/docs/en/settings.md#where-settings-live) such as `~/.claude/settings.json`:
125125
126126```json theme={null}
127127{
from line 131
131131}
132132```
133133
134Before v2.1.246, Claude started `/code-review` on its own only where a feature flag fetched from Anthropic turned it on. In [sessions that don't fetch feature flags](/docs/en/env-vars#features-that-need-feature-flag-fetching), `/code-review` ran only when you typed it, and a scheduled `/code-review` reached Claude as plain text.
134Before v2.1.246, Claude started `/code-review` on its own only where a feature flag fetched from Anthropic turned it on. In [sessions that don't fetch feature flags](/docs/en/env-vars.md#features-that-need-feature-flag-fetching), `/code-review` ran only when you typed it, and a scheduled `/code-review` reached Claude as plain text.
135135
136136## Escalate to ultrareview
137137
138`/code-review ultra --fix` runs the deeper [ultrareview](/docs/en/ultrareview) in the cloud, then asks Claude to apply its findings to your working tree when they arrive back in your session.
138`/code-review ultra --fix` runs the deeper [ultrareview](/docs/en/ultrareview.md) in the cloud, then asks Claude to apply its findings to your working tree when they arrive back in your session.
139139
140140Ultrareview uses its own scope:
141141
142142* **What it compares**: your current branch against the repository's default branch, plus uncommitted and staged changes in the working tree
143* **Sensitive files**: for uncommitted changes to files named like credentials or keys, such as `.env` and `*.tfvars` files, Claude Code follows the rules for [uploading a local repository to a cloud session](/docs/en/claude-code-on-the-web#send-local-repositories-without-github)
143* **Sensitive files**: for uncommitted changes to files named like credentials or keys, such as `.env` and `*.tfvars` files, Claude Code follows the rules for [uploading a local repository to a cloud session](/docs/en/claude-code-on-the-web.md#send-local-repositories-without-github)
144144* **A different base**: pass a branch name, such as `/code-review ultra develop`, to compare against a different base
145145
146When the target is a `github.com` pull request, you can have Claude [post the finished findings to the PR](/docs/en/ultrareview#post-findings-to-the-pull-request) as a comment from your GitHub account. Requires Claude Code v2.1.227 or later.
146When the target is a `github.com` pull request, you can have Claude [post the finished findings to the PR](/docs/en/ultrareview.md#post-findings-to-the-pull-request) as a comment from your GitHub account. Requires Claude Code v2.1.227 or later.
147147
148148> [!NOTE]
149149>
150> Ultrareview requires authentication with a claude.ai account. It isn't available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry, or to organizations with Zero Data Retention enabled or with the [HIPAA configuration](/docs/en/hipaa-setup) applied. In these cases, `/code-review ultra` runs a local review in your session instead. Organizations that use [customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek) (CMEK) can't run ultrareview. To review your changes locally, run `/code-review`.
150> Ultrareview requires authentication with a claude.ai account. It isn't available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry, or to organizations with Zero Data Retention enabled or with the [HIPAA configuration](/docs/en/hipaa-setup.md) applied. In these cases, `/code-review ultra` runs a local review in your session instead. Organizations that use [customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek) (CMEK) can't run ultrareview. To review your changes locally, run `/code-review`.
151151
152152To run a cloud review from a script or CI job, use the [`claude ultrareview` subcommand](/docs/en/ultrareview#run-ultrareview-non-interactively), which waits for the findings and prints them to stdout.
153153
154154## Change or build on the review
155155
156`/code-review` is a [bundled skill](/docs/en/skills#bundled-skills): its instructions are built into Claude Code, so there is no `SKILL.md` file on disk to open or edit. To give every review project rules to follow, add them to your `CLAUDE.md`. To go further, start from one of these pages:
156`/code-review` is a [bundled skill](/docs/en/skills.md#bundled-skills): its instructions are built into Claude Code, so there is no `SKILL.md` file on disk to open or edit. To give every review project rules to follow, add them to your `CLAUDE.md`. To go further, start from one of these pages:
157157
158* **Replace the command**: a project or personal skill named `code-review` runs in place of the bundled one, and the `/review` alias keeps running the bundled review. See [Resolve skills that share a name](/docs/en/skills#resolve-skills-that-share-a-name).
159* **Build your own reviewer**: write a reviewer [subagent](/docs/en/sub-agents) or a review [skill](/docs/en/skills)
158* **Replace the command**: a project or personal skill named `code-review` runs in place of the bundled one, and the `/review` alias keeps running the bundled review. See [Resolve skills that share a name](/docs/en/skills.md#resolve-skills-that-share-a-name).
159* **Build your own reviewer**: write a reviewer [subagent](/docs/en/sub-agents.md) or a review [skill](/docs/en/skills.md)
160160* **Use a neighboring command**: [`/simplify`](/docs/en/commands) reviews for cleanup only and applies its fixes, and [`/verify`](/docs/en/commands) runs your app to confirm a change works
161161
162162The command was named `/simplify` before v2.1.147, when it applied fixes by default. If you scripted `/simplify` for bug-finding, switch to `/code-review --fix`.
from line 163
163163
164164## Related resources
165165
166* [Code Review](/docs/en/code-review): the managed service that reviews every pull request on GitHub for your organization
167* [Ultrareview](/docs/en/ultrareview): setup, limits, and cost of the deeper cloud review
168* [Commands](/docs/en/commands): the one-line reference for `/code-review`, `/review`, `/simplify`, and `/verify`
169* [Skills](/docs/en/skills): how bundled skills work and how to write your own
166* [Code Review](/docs/en/code-review.md): the managed service that reviews every pull request on GitHub for your organization
167* [Ultrareview](/docs/en/ultrareview.md): setup, limits, and cost of the deeper cloud review
168* [Commands](/docs/en/commands.md): the one-line reference for `/code-review`, `/review`, `/simplify`, and `/verify`
169* [Skills](/docs/en/skills.md): how bundled skills work and how to write your own
170170
No line in this hunk matches that.