In short.
This guide shows Claude Code users how to review and fix code changes with AI, but some background edits survive /rewind. It documents branch, path, commit-range and pull-request targets, permission-controlled fixes, optional comments, and a separate cloud review mode. In-session reviews consume plan usage or API billing. Review accuracy, runtime and per-review cost are not established.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete selected page at [https://code.claude.com/docs/en/code-review-local.md], including the notices distinguishing managed Code Review and restricting ultrareview, command behavior, customization and version history. Linked pages and the documentation index are excluded; their contents are not assumed. No commands were executed, and no reviews, edits, posting integrations, scheduled tasks or cloud behavior were tested.
The overview
identity
The resource is Claude Code’s documentation for its /code-review command, available at [https://code.claude.com/docs/en/code-review-local.md]. /review is an alias for the same bundled review feature.
The page teaches a feature built into Claude Code. It does not provide a separate reviewer package or an editable SKILL.md file containing the bundled instructions.
assessment
The guide is useful for developers who already use Claude Code and want to control which changes receive AI review, whether findings become edits, and whether comments are published. Its practical detail includes comparison baselines, remembered settings and rollback behavior.
It explains how to operate the feature but supplies no measured evidence of bug-detection accuracy, false-positive rates, time savings or fix quality. The evidence does not establish that a review finds every bug or that its proposed fixes are correct.
users
Beginners already working in Claude Code can start with one command and read findings in the conversation. Understanding branches, uncommitted changes and Git rollback becomes important when choosing a target or accepting automatic fixes.
Experienced developers get instructions for commit ranges, non-interactive runs, host findings lists, project rules and GitHub or GitLab posting. Teams seeking automatic review of every GitHub pull request are directed to the separate managed Code Review service.
capabilities
The command looks for correctness bugs. Depending on the model and effort level, it also covers opportunities to reuse code, simplify changes and improve efficiency. Targets can identify a pull request, branch comparison, commit range, file or directory.
--fix asks Claude to apply findings to the working tree, with edits governed by the session’s permission mode. --comment posts inline findings to a GitHub pull request or one note to a GitLab merge request. For a GitLab target, use its URL or a !123 reference; bare numbers and branch names are treated as merge requests only when the checkout’s origin is on gitlab.com.
--max-findings accepts a number, all or default. Findings reported through the host findings tool have a limit of 32. A supplied value persists for later reviews until reset, except when supplied in a non-interactive -p run.
Using it
requirements
The local command runs within a Claude Code session and works on any plan. The page does not specify a minimum version for the basic command, supported hardware or a required model. GitLab posting requires the glab CLI; without it, findings are printed in the terminal.
Specific features have version requirements: --post for cloud review of a github.com pull request requires v2.1.227 or later; GitLab comments require v2.1.257 or later; --max-findings requires v2.1.288 or later.
Cloud ultrareview requires claude.ai authentication. On Amazon Bedrock, Google Cloud’s Agent Platform and Microsoft Foundry, and for organizations using Zero Data Retention or the HIPAA configuration, /code-review ultra runs a local review instead. Organizations using customer-managed encryption keys cannot run ultrareview.
mechanism
In a terminal session, review normally runs as a background subagent with its own context window. Findings return to the conversation. Non-interactive text or JSON runs also return findings as text in the response. When a host application requests a findings list, Claude uses ReportFindings, with locations, summaries and category tags where present. Later updates can mark findings fixed, skipped or no change needed.
Without a target, review covers commits ahead of the branch’s upstream plus uncommitted changes. Without an upstream, Claude compares against main or the previous commit. Cloud ultrareview instead defaults to comparing against the repository’s default branch and includes uncommitted and staged changes.
The page describes low effort as prioritizing confident findings and medium through max as broadening coverage. Explicit local effort settings persist across sessions. A -p setting does not update that memory, and ultra neither reads nor updates it. With no remembered level, review uses the session’s current effort.
Ordinary review treats all text after the effort and flags as the target. Ultra interprets a single word as a base branch or pull-request number; longer text that does not identify either becomes an attached request.
setup
In an existing Claude Code session, enter /code-review to request a report on the current branch’s changes. Without --fix, its instructions request a report only. Check the permission mode before allowing edits. Project instructions belong in CLAUDE.md, which the reviewer also follows in non-interactive runs; it does not read REVIEW.md.
For foreground review, use -p or the Agent SDK, set CLAUDE_CODE_DISABLE_BACKGROUND_TASKS to 1, or invoke /code-review while an earlier review is running. The environment setting also disables other background-task features. Ultra is an exception to the normal waiting behavior of non-interactive review.
Claude can invoke review following a plain-language request or a session-scoped scheduled task. Scheduled review does not launch cloud ultrareview. To reserve invocation for manual use, set code-review to user-invocable-only under skillOverrides in Claude Code settings.
example
An illustrative command is /code-review high main...my-feature. It requests high-effort review using the supplied branch comparison and does not explicitly request fixes or published comments. Typing high also changes the effort reused by later local reviews.
For a directory-focused review with requested edits, use /code-review high --fix src/auth. Edits remain subject to the permission mode, and background rollback restrictions apply. These examples explain the documented syntax; neither command was executed.
Assessment & evidence
limitations
Background --fix edits happen outside the session’s checkpoints. /rewind restores files Claude had already edited in the main conversation, but background-review edits to other files remain and require Git to revert. Foreground review edits follow the usual rewind behavior.
Local review means invocation within the user’s Claude Code session; the page does not establish offline operation or on-device model processing. Cloud ultrareview has different comparison defaults and references separate upload rules for uncommitted credential- or key-like files, including .env and *.tfvars. Those upload rules are not reproduced here.
Ordinary review does not interpret another command name in the target text as a second stacked skill. For example, /code-review /fix-issue 123 treats /fix-issue 123 as target text. The evidence also provides no measured completeness or reliability guarantee.
reasoning
The documented feature is a practical fit when developers want AI feedback inside an existing coding session and can inspect the findings themselves. Background execution lets work continue while review runs, while explicit targets help focus attention on a particular change.
Scope and consequences depend on configuration: remembered effort affects coverage, --fix requests file changes, --comment publishes findings, and ultra changes execution location and target interpretation. Choosing these settings explicitly makes the requested behavior clearer. No comparative evidence quantifies an accuracy or productivity advantage.
alternatives
The page distinguishes the managed Code Review service for automatic GitHub pull-request review, ultrareview for deeper cloud review, /simplify for cleanup with fixes, and /verify for running an application to check a change. Their linked documentation is outside this resource’s scope, so their full requirements and comparative performance are not established.
For custom behavior, the page suggests a reviewer subagent or review skill. A project or personal skill named code-review replaces the bundled command, while /review continues to invoke the bundled review.
evidence
The source is the complete Claude Code documentation page at [https://code.claude.com/docs/en/code-review-local.md]. It directly supports the command syntax, operating behavior, version gates and cautions described here.
The page contains instructional examples rather than recorded review results. It provides no evaluation dataset, benchmark measurements or independent comparison. Runtime behavior, integration success and the correctness of generated fixes were not assessed.
Access & freshness
costs
The page says in-session review counts toward the user’s plan usage or API billing in the same way as other session activity. Availability on any plan does not establish that reviews are free.
No per-review price, token consumption, quota or cost estimate is supplied. The cost effect of different models and effort levels is not quantified. Separate ultrareview pricing and limits are linked but are unknown from this page.
rights
The page does not state a licence for redistributing its documentation or bundled review instructions. It also does not establish ownership or licensing terms for generated edits. Those rights remain unknown.
The bundled skill has no on-disk SKILL.md to open or edit. The documented options for customization are project instructions, a replacement skill or a separate reviewer; these options do not themselves establish redistribution rights.
freshness
The supplied source was captured on 24 November 2026 at 22:20:59 UTC. Its publication date, last-edit date and the current Claude Code release are not established.
The page records behavior changes worth checking against an installed version. Before v2.1.147, the command was named /simplify and applied fixes by default; scripts using that older bug-finding behavior should use /code-review --fix. Before v2.1.246, automatic invocation depended on a fetched feature flag; without feature-flag fetching, scheduled /code-review reached Claude as plain text. Behavior after the capture is unknown.
actions
Confirm the installed Claude Code version, choose the intended comparison and effort explicitly, and start with a report-only review. Inspect each finding before requesting fixes or publishing comments. Keep a recoverable Git state before background fixes because /rewind has limited coverage for those edits.
Put shared review instructions in CLAUDE.md. For GitLab comments, install glab and use a merge-request URL or !number reference on self-managed instances.
For scripted local reviews, use a non-interactive run. For a cloud review that waits and prints findings, the page directs users to claude ultrareview rather than relying on /code-review ultra in a -p run. Before choosing cloud review, confirm account eligibility, comparison scope and the separately documented upload rules. On supported versions, --post preselects posting findings in the cloud-review launch dialog.
