Changes on
36 changes detected
--- a/2026-w30.md
+++ b/2026-w30.md
@@ -38,7 +38,7 @@
Other wins
-[`/code-review`](</docs/en/code-review#review-a-diff-locally>) now runs as a background subagent with its own context window, so review work stays out of your conversation and the findings arrive when it completes
+[`/code-review`](</docs/en/code-review-local>) now runs as a background subagent with its own context window, so review work stays out of your conversation and the findings arrive when it completes
`/verify`, `/code-review`, and `/deep-research` run only when you invoke them; Claude no longer launches them on its own
--- a/2026-w32.md
+++ b/2026-w32.md
@@ -54,7 +54,7 @@
Marketplaces can distribute a plugin as a [zip archive](</docs/en/plugins/marketplace-reference#archive-plugin-source>) with the new `archive` source, downloaded over HTTPS with an optional SHA-256 pin, so installs work without git or npm
-`/review` is now an alias of [`/code-review`](</docs/en/code-review#review-a-diff-locally>), and `/code-review` with no effort level reuses the level you typed last
+`/review` is now an alias of [`/code-review`](</docs/en/code-review-local>), and `/code-review` with no effort level reuses the level you typed last
A session you copy with [`/fork`](</docs/en/agent-view#copy-the-session-with-%2Ffork>) now makes its code changes in a worktree of its own instead of the original session’s checkout
--- a/2026-w33.md
+++ b/2026-w33.md
@@ -48,7 +48,7 @@
The task-tracking tools, such as `TaskCreate`, `TaskUpdate`, and `TodoWrite`, are [no longer available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and later models in those families](</docs/en/tools-reference#task-tool-availability>); set `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` to re-enable them
-[`/code-review`](</docs/en/code-review#review-a-diff-locally>) at high, xhigh, and max effort now runs in a background agent like the other levels
+[`/code-review`](</docs/en/code-review-local>) at high, xhigh, and max effort now runs in a background agent like the other levels
[`/plugin install plugin@marketplace`](</docs/en/plugins/install#install-a-plugin>) refreshes the marketplace first, so newly published plugins install without a manual marketplace update
--- a/admin.md
+++ b/admin.md
@@ -68,13 +68,14 @@
Mods don’t replace the controls you already have:
- * **Settings hooks keep working.** Command, HTTP, prompt, and agent hooks in settings files and in plugins’ `hooks/hooks.json` run as before, alongside mods. Nothing about them is deprecated.
+ * **Settings hooks keep working.** Command, HTTP, prompt, and agent hooks in settings files and in plugins’ `hooks/hooks.json` run as before, alongside mods.
* **Deny rules take precedence where the guard loads.** A user’s mod can’t approve a call that a `deny` rule refuses, unless you set `allowModsToOverrideDenyRules`.
* **Managed hooks run first.** A `PreToolUse` hook in managed settings runs before any mod sees the tool call, and its block is final. If a mod then rewrites the call, your managed hooks run again on the rewritten call, so a block still applies. `PreToolUse` hooks from other settings files and from plugins run after the last mod, so a mod that returns its own result in place of running the tool keeps those from running. See [The order mods run in](</docs/en/plugins/mods/events#the-order-mods-run-in>).
* **Network policy covers`$.http.fetch`.**
* **Your organization’s policy doesn’t allow WebFetch** : Claude Code also refuses every mod’s `$.http.fetch` request. See [WebFetch availability](</docs/en/tools-reference#webfetch-availability>).
+ * **You turn off the WebFetch tool with[`CLAUDE_CODE_DISABLE_WEB_FETCH`](</docs/en/env-vars#variables>) or a `WebFetch` [deny rule](</docs/en/permissions#tool-specific-permission-rules>), in managed settings or any other settings file**: mods can still make `$.http.fetch` requests. To stop them for every mod your users install, keep user-installed mods from loading, or hook `http.fetch` in a policy mod and refuse requests from users’ mods. Give that hook a [`.catch` handler](</docs/en/plugins/mods/events#handle-a-hook-that-fails>) that refuses too, because Claude Code skips a hook that fails and the request then goes ahead. If you only [restrict which plugins users can install](</docs/en/plugins/org#restrict-what-users-can-install>), fewer mods load, but those you allow still make these requests.
* **You set[`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>)**: a mod that you or your users install can still make these requests. The variable stops only the [mods built into Claude Code](</docs/en/plugins/mods/overview#mods-built-into-claude-code>), plus any `$.http.fetch` request that carries the session’s Anthropic credentials. Before v2.1.288, the variable stopped every mod’s `$.http.fetch` request.
-Neither covers a program the mod starts with `$.process.run`, which reaches the network with the user’s own access.
+None of these covers a program the mod starts with `$.process.run`, which reaches the network with the user’s own access.
* **Plugin controls cover mods.** A mod is a plugin, so the [settings that restrict what users can install](</docs/en/plugins/org#restrict-what-users-can-install>), such as `strictKnownMarketplaces`, decide whether it can be installed at all.
* **Mods can’t change the permission prompt.** A mod can restyle much of Claude Code’s interface, but not the permission prompt, so it can’t change what a prompt shows. A mod can still approve or deny a tool call before the prompt appears, as Know what happens by default describes.
* **Trust prompts come first.** In an interactive session in a directory the user hasn’t trusted yet, no mod loads until they answer the trust prompt.
--- a/analytics.md
+++ b/analytics.md
@@ -4,6 +4,8 @@
---|---|---|---
Claude for Teams / Enterprise| [claude.ai/analytics/claude-code](<https://claude.ai/analytics/claude-code>)| Usage metrics, contribution metrics with GitHub integration, leaderboard, data export| Details
API (Claude Console)| [platform.claude.com/claude-code](<https://platform.claude.com/claude-code>)| Usage metrics, spend tracking, team insights| Details
+
+Code Review has its own dashboard. For review activity and spend, see [View usage](</docs/en/code-review-costs#view-usage>).
##
--- a/api.md
+++ b/api.md
@@ -210,6 +210,8 @@
`$.ui.toast(text)`| A toast notification with the mod’s name that disappears after a few seconds. It’s a box at the top right in [fullscreen rendering](</docs/en/fullscreen>), and one line at the right under the prompt in the classic renderer.
`$.ui.log(text)`| A dim line in the transcript that Claude doesn’t read. It starts with `●` and the mod’s name, as in `● my-mod: build finished`.
+In the [VS Code extension](</docs/en/plugins/mods/interface#draw-in-the-vs-code-extension>), status lines and toasts show above the prompt box instead, and log lines in the conversation.
+
###
--- a/artifacts.md
+++ b/artifacts.md
@@ -61,7 +61,6 @@
The session is in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>)| Asks before the first publish of each artifact
The publish declares runtime capabilities for the page, such as connector calls or file downloads| Asks before that publish
You shared the artifact publicly| Asks once per conversation before changing it
-You turned [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) off| Asks before the first publish of each artifact
Claude publishes in a turn that a [scheduled task](</docs/en/scheduled-tasks>) firing in your session started, rather than a prompt you typed| Asks before the first publish of each artifact
Claude can’t read the file without your approval| Asks before publishing it. An allow rule for the `Artifact` tool doesn’t skip this prompt
In [Manual](</docs/en/permission-modes>) or `acceptEdits` mode, Claude makes a small change to an artifact’s file it can’t edit without your approval, such as a project file in Manual mode| Asks before publishing the change. You’re asked even if an allow rule covers the `Artifact` tool, because the edit to the file needs your approval
@@ -126,7 +125,7 @@
* **Cloud session without network access** : for a [cloud environment](</docs/en/cloud-environments#access-levels>), that’s the **None** level. In [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the classifier can approve instead; in a [Cowork](<https://claude.com/product/cowork>) session, the approval is yours alone.
* **Another organization’s public artifact** : Claude Code asks you first, even in auto mode. Where Claude Code can’t ask you, such as in `bypassPermissions` mode, Claude can’t read the artifact. Claude can read these artifacts only while [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is on.
* **Unconfirmed owner or network setting** : when Claude Code can’t confirm who made the artifact, or can’t confirm a cloud session’s network setting, it asks, and your approval covers that one request.
- * **Plan mode, or feature-flag fetching turned off** : in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>), or if you turned [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) off, Claude Code asks before the Artifact tool reads an artifact someone else in your organization made.
+ * **Plan mode** : in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>), Claude Code asks before the Artifact tool reads an artifact someone else in your organization made.
When Claude reads the artifact with WebFetch, WebFetch’s own [prompting rules](</docs/en/tools-reference#webfetch-tool-behavior>) still apply.
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,73 @@
This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Longer releases are grouped by type of change, with long lists of improvements and bug fixes collapsed. Run `claude --version` to check your installed version.
+
+
+
+2.1.301
+
+October 15, 2026
+
+**Added**
+
+ * Added `CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS` so unattended retry mode (`CLAUDE_CODE_RETRY_WATCHDOG`) ends a request at a usage limit that resets too far away instead of waiting
+ * Added OpenTelemetry tracing guidance to the `claude-api` skill, including setting up trace destinations with the `ant` CLI
+ * Added the `%` motion to vim mode: jump to the matching bracket, alone or with d/c/y
+ * Added `rows` to a mod’s `Input`: a text field of several lines in the terminal, where Enter submits and Shift+Enter or a backslash before Enter starts a new line
+ * Added `classifier_verdict` and `permission_mode` to OpenTelemetry `tool_decision` events, so auto mode classifier decisions can be told apart from permission rules
+ * Added `classifier_category` to OpenTelemetry `tool_decision` events, naming the built-in rule a classifier block matched, when `OTEL_LOG_TOOL_DETAILS=1`
+ * [VSCode] Added LaTeX math rendering in Claude’s responses, including `$$` and multi-line `\[ … \]` blocks and inline `$…$` and `\(…\)` math
+ * [VSCode] Added a “Get more usage” link to the usage-limit banner for Pro and Max plans in the VS Code and JetBrains panels
+
+**Changed**
+
+ * Changed a mod hook’s `.catch` handler to run only when the hook throws or times out; events raised beneath the hook’s own calls now skip that hook without asking its `.catch`
+ * Changed a mod’s `$.env.set` to resolve with `{}` once the variable is set or unset, or with `{ deny }` saying why when the write is not made
+
+**Improved**
+
+ * Improved switching to a model with a smaller context window: a conversation too long for the new model is now summarized by the previous model first
+ * Improved rendering performance while a long-running subagent works: its progress trail now updates incrementally instead of being reprocessed in full on every render
+ * Improved artifacts: pages Claude writes now paint the band above a sticky header, so scrolled text no longer shows there in the mobile apps
+ * Improved mods: in VS Code and the desktop and mobile apps, a tree drawn above the question dialog can now hold Markdown and up to 48 rows; the terminal keeps 12 plain rows
+
+Show 37 bug fixes
+
+ * Fixed quitting removing a worktree made by a `WorktreeCreate` hook without asking when it may hold unpushed commits
+ * Fixed the `fable` (and `best`) model alias erroring on the Anthropic API when the newest Fable model is not available to your organization: Claude Code now retries once on the previous Fable model
+ * Fixed a misleading “Please run /login” error when a full disk keeps the login from being refreshed; the error now names the disk and says to delete files
+ * Fixed Grep and Glob reporting no matches when the search program failed unexpectedly before returning any results; they now return an error saying the search failed
+ * Fixed workflow agents sometimes skipping their step, and the run still reporting success, after reading the harness note that their task text carries no user authority
+ * Fixed artifact updates being refused where a PreToolUse hook covers Edit or Write; Claude now edits the file and then republishes instead of changing it in the publish call
+ * Fixed skills and commands with very many or very long argument names stalling for seconds when invoked; only the first 64 names, each up to 64 characters, are now filled in
+ * Fixed skills, commands and hooks using very large amounts of memory when their arguments fill many placeholders
+ * Fixed stray characters such as `>0q` covering the folder trust prompt, and `>4m` before the shell prompt at exit, in terminals built on VTE older than 0.53 such as MATE Terminal on RHEL 8
+ * Fixed stray `GOK` text appearing in the prompt at startup in some versions of iTerm2
+ * Fixed switching to a model whose name contains `application-inference-profile` running your `awsAuthRefresh` command and delaying model-switch hooks when the provider is not Bedrock
+ * Fixed sign-in refresh timeouts and unexpected sign-outs after a short command such as `claude auth status` or `claude plugin list` exited in the middle of a token refresh
+ * Fixed a tool call cut off by a message sent mid-turn during its permission check being reported to the model as rejected by the user
+ * Fixed a case where switching to a model with a smaller context window could spend usage credits on a summary by the previous model without asking first
+ * Fixed conversations being compacted over and over, on a model you didn’t pick, behind an LLM gateway whose responses name a different model than the one requested
+ * Fixed vim mode sometimes staying in INSERT after Escape on a slow or busy machine
+ * Fixed Esc discarding a typed AskUserQuestion answer in vim mode: the free-text field now supports vim NORMAL mode, and Esc cancels only from NORMAL
+ * Fixed the Read tool reading binary files such as .xlsm, .parquet, .epub and .heic as text
+ * Fixed a Markdown table with only a header row drawing nothing when too wide for the terminal, including in plans on the plan approval card
+ * Fixed the /claude-api skill saying CMEK external-key endpoints aren’t available on Claude Platform on AWS
+ * Fixed skills no longer being listed to the model after using `/rewind`
+ * Fixed the compaction row in a resumed session offering ctrl+o for history that is not loaded; it now says where the earlier messages are saved, and also shows in fullscreen
+ * Fixed the “new task? /clear to save tokens” hint coming back right after you interrupt a response
+ * Fixed the permission prompt for a plugin or skill hook’s `ask` decision not showing which plugin or skill the hook comes from
+ * Fixed `/diff` not noticing a conflicted cherry-pick or revert in reftable repositories when one of its git checks timed out or failed
+ * Fixed workflow scripts asking for permission or being refused when read, edited or re-run after a Bash `cd` in the same session
+ * Fixed dim text on the dark ANSI theme and 16-color terminals: faint inside filled boxes, not faint under selection and search highlights, and list descriptions dimmed like other secondary text
+ * Fixed a mod’s `$.model.fork` returning `nothing-to-fork` when called before the first response of a new Claude Code process had finished, as in `claude -p` runs and cloud sessions
+ * Fullscreen mode: Fixed `/compact` and auto-compact briefly freezing the UI while the visible transcript is rebuilt
+ * Self-hosted runner: Fixed sessions started from Slack being unable to find or attach a repository when managed settings restrict MCP servers; use `deniedMcpServers` to keep those tools off
+ * Self-hosted runner: Fixed sessions being reported as having a deleted source branch, and not retried, when an unrelated setup or session failure quoted git’s missing-ref wording
+ * Self-hosted runner: Fixed the log promising a retry of a failed or declined session release for a session that is ending; repeated failures now show a count
+ * Windows: Fixed stopped background PowerShell commands missing the closing `[killed]` line in their output file
+ * [VSCode] Fixed a conversation that crashes or freezes the panel being reopened on every reload
+ * [VSCode] Fixed the chat panel slowing down during long thinking: it no longer re-parses the whole thinking text on every update
+ * [VSCode] Fixed diagnostics showing “[object Object]” instead of the rule code (e.g. MD013) for some language servers
+ * [VSCode] Fixed the native dictation audio module being loaded, to check microphone permission, where dictation is not offered (non-claude.ai sign-ins, remote windows)
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -102,7 +102,7 @@
A [subagent](</docs/en/sub-agents>) makes edits with Claude’s file editing tools, but Claude Code usually doesn’t capture those edits in your session’s checkpoints. Whether rewinding restores them depends on how the subagent runs:
* **Foreground forked skill** : a [skill with `context: fork`](</docs/en/skills#run-skills-in-a-subagent>) that runs in the foreground edits your working tree during your own turn, so rewinding restores its edits as usual. Set `background: false` to run a fork in the foreground; a few situations, [listed on the skills page](</docs/en/skills#run-skills-in-a-subagent>), run it there regardless of the setting.
- * **Any other subagent** : rewinding doesn’t restore the edits. Use git to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](</docs/en/code-review>) run.
+ * **Any other subagent** : rewinding restores only the files Claude had already edited in your conversation. The subagent’s edits to other files stay, so use git to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](</docs/en/code-review-local>) run.
###
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -49,7 +49,7 @@
In Anthropic-hosted environments, your GitHub credentials stay encrypted on Anthropic’s servers and never enter a session’s VM. GitHub operations from the VM go through the [GitHub proxy](</docs/en/cloud-environments#github-proxy>), which attaches the credential on the server side. See [Connect from your terminal](</docs/en/web-quickstart#connect-from-your-terminal>) for the `/web-setup` walkthrough, including what `/web-setup` stores and how to remove it.
-Organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled, or with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, can’t use `/web-setup` or other cloud session features.
+Organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled, or with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, can’t use `/web-setup` or other cloud session features. Organizations that use [customer-managed encryption keys](<https://platform.claude.com/docs/en/manage-claude/cmek>) (CMEK) can’t start cloud sessions either.
###
--- a/cloud-environments.md
+++ b/cloud-environments.md
@@ -525,7 +525,7 @@
}
}
-The `matcher` limits the hook to the `startup` and `resume` events, and `$CLAUDE_PROJECT_DIR` resolves to the repository root, so the hook finds the script regardless of the session’s working directory. Next, create the script at `scripts/install_pkgs.sh`. It exits immediately outside the cloud, then installs your dependencies:
+The `matcher` limits the hook to the `startup` and `resume` events, and `$CLAUDE_PROJECT_DIR` resolves to the repository root, so the hook finds the script regardless of the session’s working directory. Next, create the script at `scripts/install_pkgs.sh`. It exits immediately outside the cloud, then installs your dependencies. It skips `npm install` while `package.json`, `package-lock.json`, and the script itself are unchanged since the last successful install:
#!/bin/bash
@@ -533,11 +533,24 @@
exit 0
fi
- npm install
+ cd "$CLAUDE_PROJECT_DIR" || exit 1
+ hashes=node_modules/.install_pkgs.sha256
+
+ if ! sha256sum --check --status "$hashes" 2>/dev/null; then
+ # Delete the old hashes first, so a failed install runs again next time
+ rm -f "$hashes"
+ if npm install; then
+ sha256sum scripts/install_pkgs.sh package.json package-lock.json > "$hashes" || rm -f "$hashes"
+ fi
+ fi
+
+ # pip skips requirements that are already satisfied
pip install -r requirements.txt
exit 0
-The `CLAUDE_CODE_REMOTE` check is what scopes the install to cloud sessions: the session VM’s environment carries that variable as `true`, it’s never `true` locally, so on your laptop the script exits before installing anything. Together, the two files give every cloud session a fresh `npm install` and `pip install` at startup while leaving local sessions untouched.
+The `CLAUDE_CODE_REMOTE` check is what scopes the install to cloud sessions: the session VM’s environment carries that variable as `true`, it’s never `true` locally, so on your laptop the script exits before installing anything. To confirm `npm install` succeeded, start a cloud session and ask Claude to show `node_modules/.install_pkgs.sha256`. The file lists a hash for each of the three files. If the file is missing, ask Claude to run `npm install` and report the error.
+
+If `npm install` reads other files, such as a workspace’s `package.json`, an `.npmrc`, or your `postinstall` script’s inputs, add them to the `sha256sum` command that saves the hashes. Otherwise, you keep the old packages after one of those files changes.
####
@@ -551,7 +564,7 @@
* **No cloud-only scoping** : hooks run in both local and cloud sessions. To skip local execution, exit early unless the `CLAUDE_CODE_REMOTE` environment variable is `true`, the way the dependency install script does.
* **Requires network access** : install commands need to reach package registries. If your environment uses **None** network access, these hooks fail. The default allowlist under **Trusted** covers npm, PyPI, RubyGems, and crates.io.
* **Proxy compatibility** : in Anthropic-hosted environments, all outbound traffic passes through a security proxy, and some package managers don’t work correctly with it; Bun is a known example. In a [self-hosted environment](</docs/en/self-hosted-environments-deploy#default-deny-egress>), outbound traffic goes through your own network boundary instead.
- * **Adds startup latency** : hooks run each time a session starts or resumes, unlike setup scripts which benefit from environment caching. Keep install scripts fast by checking whether dependencies are already present before reinstalling.
+ * **Adds startup latency** : hooks run each time a session starts or resumes, unlike setup scripts which benefit from environment caching. Keep install scripts fast by skipping work that’s already done, the way the dependency install script does.
To customize the base image, use a setup script to install what you need on top of the provided image, or run your own image as a container alongside Claude with `docker compose`. Replacing the base image entirely isn’t supported yet.
Show diff (509 lines)
--- a/code-review.md
+++ b/code-review.md
@@ -1,14 +1,50 @@
-Code Review is in research preview, available for [Team and Enterprise](<https://claude.ai/admin-settings/claude-code>) subscriptions. It is not available for organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled or with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, and is not covered under Anthropic’s BAA. On other plans, you can still review a diff locally with the `/code-review` command.
+With Code Review, Claude reviews the pull requests in your GitHub repositories. Several agents read each change alongside the surrounding code, looking for issues such as logic errors, security vulnerabilities, or broken edge cases. A verification step checks findings against the code before they’re reported. Findings arrive as inline comments on the lines concerned, ranked by [severity](</docs/en/code-review-pull-requests#severity-levels>), with a summary and a check run on the pull request. A review never approves or blocks the pull request, so the decision to merge stays with your team.
-Code Review analyzes your GitHub pull requests and posts findings as inline comments on the lines of code where it found issues. A fleet of specialized agents examine the code changes in the context of your full codebase, looking for logic errors, security vulnerabilities, broken edge cases, and subtle regressions. Findings are tagged by severity and don’t approve or block your PR, so existing review workflows stay intact. You can tune what Claude flags by adding a `CLAUDE.md` or `REVIEW.md` file to your repository. To run Claude in your own CI infrastructure instead of this managed service, see [GitHub Actions](</docs/en/github-actions>) or [GitLab CI/CD](</docs/en/gitlab-ci-cd>). For repositories on a self-hosted GitHub instance, see [GitHub Enterprise Server](</docs/en/github-enterprise-server>). This page covers:
+Code Review uses AI to review code and may miss bugs, security vulnerabilities, or other issues. A review with no findings doesn’t mean your code is error-free or secure.
- * How reviews work
- * Setup
- * Triggering reviews manually with `@claude review` and `@claude review always`
- * Customizing reviews with `CLAUDE.md` and `REVIEW.md`
- * Pricing
- * Troubleshooting failed runs and missing comments
- * Reviewing a diff locally with the `/code-review` command
+To turn on Code Review, an Owner of your Claude organization follows [Set up Code Review](</docs/en/code-review-setup>). Claude can also review code without this service. Run [`/code-review`](</docs/en/code-review-local>) in your Claude Code session on any plan, or compare all the options.
+
+##
+
+
+
+Availability
+
+Check that your organization qualifies before you set up Code Review:
+
+ * **Plans** : [Team and Enterprise](</docs/en/feature-availability>)
+ * **Code hosts** : repositories hosted on GitHub, including [GitHub Enterprise Server](</docs/en/github-enterprise-server>) and GitHub Enterprise Cloud with data residency. For data residency, have an Owner follow the [GitHub Enterprise Server admin setup](</docs/en/github-enterprise-server#admin-setup>) and enter your enterprise’s `ghe.com` hostname.
+ * **Data retention** : Code Review isn’t available to organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled or with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, and isn’t covered under Anthropic’s Business Associate Agreement (BAA).
+ * **Encryption keys** : Code Review isn’t yet available for organizations that use customer-managed encryption keys (CMEK).
+ * **Cloud providers** : you need a Claude organization on one of these plans even if your developers use Claude Code through Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry
+
+##
+
+
+
+Set up and use Code Review
+
+Pick the page for what you need to do:
+
+## Set up Code Review
+
+Check the requirements, install the Claude GitHub App, and choose repositories, a review level, and when reviews run
+
+## Customize Code Review
+
+Tune what gets flagged with `REVIEW.md` and `CLAUDE.md` files in your repository
+
+## Read and request reviews on a pull request
+
+Read the findings and their severities, and request another review with a comment
+
+## Troubleshoot Code Review
+
+Fix a review that didn’t start, failed, or was skipped for budget
+
+## Code Review costs and usage
+
+See how reviews are billed, estimate spend, set the monthly spend limit, and track review activity
##
@@ -16,396 +52,71 @@
How reviews work
-Once an Owner enables Code Review for your organization, reviews trigger when a PR opens, on every push, or when manually requested, depending on the repository’s configured behavior. Commenting `@claude review` starts a review on a PR in any mode. When a review runs, multiple agents analyze the diff and surrounding code in parallel on Anthropic infrastructure. Each agent looks for a different class of issue, then a verification step checks candidates against actual code behavior to filter out false positives. The results are deduplicated, ranked by severity, and posted as inline comments on the specific lines where issues were found, with a summary in the review body. If no issues are found, Code Review updates the GitHub check run to show that no issues were detected. Claude may also post a short confirmation comment on the PR. Reviews scale in cost with PR size and complexity, completing in 20 minutes on average. Owners can monitor review activity and spend via the analytics dashboard.
+By default, Code Review focuses on correctness: bugs that would break production, not formatting preferences or missing test coverage. To change what it flags, [add guidance files](</docs/en/code-review-customize>) to your repository. A review runs on Anthropic infrastructure in four stages:
+
+ 1. **Find** : several agents examine the diff and the surrounding code in parallel.
+ 2. **Verify** : a verification step checks the candidate findings against the code and filters out false positives.
+ 3. **Rank** : the findings that remain are deduplicated and ranked by severity.
+ 4. **Post** : the review posts its results on the pull request.
+
+Each review leaves these on the pull request:
+
+ * **Findings** : inline comments on the lines concerned, with a summary in the review body
+ * **A check run** : named **Claude Code Review** , with the findings listed in its [details](</docs/en/code-review-pull-requests#check-run-output>). The check run doesn’t conclude as a failure.
+ * **When it finds nothing** : the check run’s title reads **Code review found no issues** , and Claude posts the same short note on the pull request
+
+Code Review chooses the Claude models that reviews run on, and its admin settings don’t offer a model choice. To make reviews more or less thorough, change the review level. After an Owner turns on Code Review, each repository has a setting for [when reviews run](</docs/en/code-review-setup#set-when-reviews-run>): once when a pull request opens, after every push, or only on request. Whichever it is, someone with write access to the repository can comment `@claude review` on a pull request to [start a review](</docs/en/code-review-pull-requests#comment-commands>).
###
-Severity levels
+Review levels
-Each finding is tagged with a severity level:
+The review level sets how thorough each review is, and a more thorough review costs more:
-Marker| Severity| Meaning
----|---|---
-🔴| Important| A bug that should be fixed before merging
-🟡| Nit| A minor issue, worth fixing but not blocking
-🟣| Pre-existing| A bug that exists in the codebase but was not introduced by this PR
+ * **Quick** : a lighter pass. The fastest level, at the lowest cost.
+ * **Standard** : balanced depth, speed, and cost. The default level.
+ * **Deep** : the most thorough pass. Takes the longest and costs the most.
-Findings include a collapsed **Why this was flagged** section that you can expand to read why Claude flagged the issue and how it verified the problem.
+An Owner [chooses one level for the organization](</docs/en/code-review-setup#set-the-default-review-level>) and can give an individual repository its own, such as Quick for a routine codebase and Deep for a critical one. For what else drives the cost of each review, see [Code Review costs and usage](</docs/en/code-review-costs>).
###
-Rate and reply to findings
+What a review can access
-Each review comment from Claude arrives with 👍 and 👎 already attached so both buttons appear in the GitHub UI for one-click rating. Click 👍 if the finding was useful or 👎 if it was wrong or noisy. Anthropic collects reaction counts after the PR merges and uses them to tune the reviewer. Reactions do not trigger a re-review or change anything on the PR. Replying to an inline comment does not prompt Claude to respond or update the PR. To act on a finding, fix the code and push. If the PR is subscribed to push-triggered reviews, the next run resolves the thread when the issue is fixed. To request a fresh review without pushing, comment `@claude review` as a top-level PR comment. To dismiss a finding without a code change, resolve its thread; replying doesn’t dismiss it.
+A review reaches your repository through the Claude GitHub App that an Owner [installs during setup](</docs/en/code-review-setup#turn-on-code-review>):
+
+ * **Where it runs** : on Anthropic infrastructure, in a managed environment. Reviews don’t run in [self-hosted environments](</docs/en/self-hosted-environments>).
+ * **What it reads and writes** : inside a review, access to your repository is read-only, and a review doesn’t push commits. On the pull request, it posts comments and the [check run](</docs/en/code-review-pull-requests#check-run-output>), resolves its own earlier comment threads, and can react to a comment command with 👀. The app itself holds a [broader permission set](</docs/en/github-actions#github-app-permissions>) that other Claude features share.
+ * **How it examines your code** : a review works from reading the diff and the surrounding code, without building or running your code.
###
-Check run output
+Who controls a review
-Beyond the inline review comments, each review populates the **Claude Code Review** check run that appears alongside your CI checks. Expand its **Details** link to see a summary of every finding in one place, sorted by severity:
-
-Severity| File:Line| Issue
----|---|---
-🔴 Important| `src/auth/session.ts:142`| Token refresh races with logout, leaving stale sessions active
-🟡 Nit| `src/auth/session.ts:88`| `parseExpiry` silently returns 0 on malformed input
-
-Each finding also appears as an annotation in the **Files changed** tab, marked directly on the relevant diff lines. Important findings render with a red marker, nits with a yellow warning, and pre-existing bugs with a gray notice. Annotations and the severity table are written to the check run independently of inline review comments, so they remain available even if GitHub rejects an inline comment on a line that moved. The check run always completes with a neutral conclusion so it never blocks merging through branch protection rules. If you want to gate merges on Code Review findings, read the severity breakdown from the check run output in your own CI. The last line of the Details text is a machine-readable comment your workflow can parse with `gh` and jq. To find the check run ID, list the commit’s check runs with `gh api repos/OWNER/REPO/commits/<commit-sha>/check-runs --jq '.check_runs[] | {id, name}'` and take the `id` of the `Claude Code Review` run. Replace `OWNER`, `REPO`, and `CHECK_RUN_ID` with your repository owner, repository name, and that ID:
-
- gh api repos/OWNER/REPO/check-runs/CHECK_RUN_ID \
- --jq '.output.text | split("bughunter-severity: ")[1] | split(" -->")[0] | fromjson'
-
-This returns a JSON object with counts per severity, for example `{"normal": 2, "nit": 1, "pre_existing": 0}`. The `normal` key holds the count of Important findings; a non-zero value means Claude found at least one bug worth fixing before merge.
-
-###
-
-
-
-What Code Review checks
-
-By default, Code Review focuses on correctness: bugs that would break production, not formatting preferences or missing test coverage. You can expand what it checks by adding guidance files to your repository.
+ * **Who can start one** : where reviews run automatically, opening or pushing to a pull request starts a review, [except on drafts and forks](</docs/en/code-review-pull-requests#review-drafts-and-pull-requests-from-forks>). A [comment command](</docs/en/code-review-pull-requests#comment-commands>) starts one only when it comes from a person with write access to the repository.
+ * **Which instructions it follows** : `REVIEW.md` from the base or default branch and [never from the pull request’s own changes](</docs/en/code-review-customize#which-branch-review-md-is-read-from>).
##
-Set up Code Review
+Compare ways to get a review
-An Owner enables Code Review once for the organization and selects which repositories to include.
+To find the options open to you, check the **Who can use it** column against your plan and code host:
-1
-
-Open Claude Code admin settings
-
-Go to [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>) and find the Code Review section. You need the Owner or Primary Owner role in your Claude organization and permission to install GitHub Apps in your GitHub organization.
-
-2
-
-Start setup
-
-Click **Setup**. This begins the GitHub App installation flow.
-
-3
-
-Install the Claude GitHub App
-
-Follow the prompts to install the Claude GitHub App: pick the GitHub organization that owns the repositories you want reviewed, choose which repositories the app can access, and approve the requested permissions.To review a pull request, Claude reads your repository contents through the app’s read access, and posts comments and the check run through its write access to pull requests and checks. During installation, you grant a broader permission set shared by other Claude features, such as [GitHub Actions](</docs/en/github-actions>); see [GitHub App permissions](</docs/en/github-actions#github-app-permissions>) for the full list.
-
-4
-
-Select repositories
-
-Choose which repositories to enable for Code Review. If you don’t see a repository, make sure you gave the Claude GitHub App access to it during installation. You can add more repositories later.
-
-5
-
-Set review triggers per repo
-
-After setup completes, the Code Review section shows your repositories in a table. For each repository, use the **Review Behavior** dropdown to choose when reviews run:
-
- * **Once after PR creation** : review runs once when a PR is opened or marked ready for review
- * **After every push** : review runs on every push to the PR branch, catching new issues as the PR evolves and auto-resolving threads when you fix flagged issues
- * **Manual** : opening or pushing to a PR doesn’t start a review; comment `@claude review` to request one, or `@claude review always` to also subscribe the PR to reviews on subsequent pushes
-
-Whichever option you choose, Claude reviews a pull request from a fork only when someone comments `@claude review` on it.Reviewing on every push runs the most reviews and costs the most. Manual mode is useful for high-traffic repos where you want to opt specific PRs into review, or to only start reviewing your PRs once they’re ready.
-
-The repositories table also shows the average cost per review for each repo based on recent activity. Use the row actions menu to turn Code Review on or off per repository, or to remove a repository entirely. To verify setup, open a test PR. If you chose an automatic trigger, a check run named **Claude Code Review** appears within a few minutes. If you chose Manual, comment `@claude review` on the PR to start the first review. If no check run appears, confirm the repository is listed in your admin settings and the Claude GitHub App has access to it.
-
-##
-
-
-
-Manually trigger reviews
-
-Comment commands start a review on demand. They work regardless of the repository’s configured trigger, so you can use them to opt specific PRs into review in Manual mode or to get an immediate re-review in other modes.
-
-Command| What it does
----|---
-`@claude review`| Starts a single review without subscribing the PR to future pushes
-`@claude review always`| Starts a review and subscribes the PR to push-triggered reviews going forward
-`@claude review once`| Same as `@claude review`: starts a single review without subscribing
-
-Use `@claude review always` when you want every subsequent push to the PR to start a fresh review, such as on a high-priority PR in a repository set to Manual mode. Because the bare command doesn’t subscribe the PR, you can request a one-off second opinion without changing whether later pushes trigger reviews.
-
-Before a July 2026 update, `@claude review` subscribed the PR to push-triggered reviews. If you relied on that behavior, comment `@claude review always` instead. `@claude review once` still works and behaves the same as the bare command.
-
-For any of these commands to trigger a review:
-
- * Post it as a top-level PR comment, not an inline comment on a diff line
- * Put the command at the start of the comment, with `once` or `always` on the same line as the rest of the command
- * You must have write, maintain, or admin permission on the repository
- * The PR must be open
-
-Unlike automatic triggers, manual triggers run on draft PRs, since an explicit request signals you want the review now regardless of draft status. If a review is already running on that PR, the request is queued until the in-progress review completes. You can monitor progress via the check run on the PR.
-
-###
-
-
-
-Review pull requests from forks
-
-Claude doesn’t review a pull request from a fork automatically, regardless of the repository’s **Review Behavior** setting. To start one, comment `@claude review` on the pull request. The requirements for comment commands still apply, and the write access you need is to the base repository, not the fork. To get another review of a fork pull request, post a new `@claude review` comment. `@claude review always` works too, but doesn’t subscribe the pull request to reviews on later pushes. Nothing other than a comment command starts a review on a fork pull request:
-
- * Clicking **Re-run** on the check run doesn’t start a review
- * Pushing new commits doesn’t start a review, even in a repository set to **After every push**
-
-##
-
-
-
-Customize reviews
-
-Code Review reads two files from your repository to guide what it flags. They differ in how strongly they influence the review:
-
- * **`CLAUDE.md`** : shared project instructions that Claude Code uses for all tasks, not just reviews. Code Review reads it as project context and flags newly introduced violations as nits.
- * **`REVIEW.md`** : review-only instructions, given to the agents that find and verify findings and consulted by the agents that rank and report them. Use it to say what your team wants flagged, at what severity, and how findings are reported.
-
-###
-
-
-
-CLAUDE.md
-
-Code Review reads your repository’s `CLAUDE.md` files and treats newly introduced violations as nit-level findings. This works bidirectionally: if your PR changes code in a way that makes a `CLAUDE.md` statement outdated, Claude flags that the docs need updating too. Claude reads `CLAUDE.md` files at every level of your directory hierarchy, so rules in a subdirectory’s `CLAUDE.md` apply only to files under that path. See the [memory documentation](</docs/en/memory>) for more on how `CLAUDE.md` works. For review-specific guidance that you don’t want applied to general Claude Code sessions, use `REVIEW.md` instead.
-
-###
-
-
-
-REVIEW.md
-
-`REVIEW.md` is a file at your repository root that tailors Code Review to your repo. The agents in the review pipeline that find and verify findings receive its contents as your repository’s review instructions, alongside Code Review’s default review guidance, and the agents that rank and report findings consult it before settling severity and writing the review. Put the rules you want enforced directly in `REVIEW.md`.
-
-####
-
-
-
-What you can tune
-
-`REVIEW.md` is freeform markdown, so anything you can express as a review instruction is in scope. The patterns below have the most impact in practice. **Severity** : redefine what 🔴 Important means for your repo. The default calibration targets production code; a docs repo, a config repo, or a prototype might want a much narrower definition. State explicitly which classes of finding are Important and which are Nit at most. You can also escalate in the other direction, for example treating any `CLAUDE.md` violation as Important rather than the default nit. **Nit volume** : cap how many 🟡 Nit comments a single review posts. Prose and config files can be polished forever. A cap like “report at most five nits, mention the rest as a count in the summary” keeps reviews actionable. **Skip rules** : list paths, branch patterns, and finding categories where Claude should post no findings. Common candidates are generated code, lockfiles, vendored dependencies, and machine-authored branches, along with anything your CI already enforces like linting or spellcheck. For paths that warrant some review but not full scrutiny, set a higher bar instead of skipping entirely: “in `scripts/`, only report if near-certain and severe.” **Repo-specific checks** : add rules you want flagged on every PR, like “new API routes must have an integration test.” Because `REVIEW.md` reaches every finding and verification agent directly, these land more reliably than the same rules in a long `CLAUDE.md`. **Verification bar** : require evidence before a class of finding is posted. For example, “behavior claims need a `file:line` citation in the source, not an inference from naming” cuts false positives that would otherwise cost the author a round trip. **Re-review convergence** : tell Claude how to behave when a PR has already been reviewed. A rule like “after the first review, suppress new nits and post Important findings only” stops a one-line fix from reaching round seven on style alone. **Summary shape** : ask for the review body to open with a one-line tally such as `2 factual, 4 style`, and to lead with “no factual issues” when that’s the case. The author wants to know the shape of the work before the details.
-
-####
-
-
-
-Example
-
-This `REVIEW.md` recalibrates severity for a backend service, caps nits, skips generated files, and adds repo-specific checks.
-
- # Review instructions
-
- ## What Important means here
-
- Reserve Important for findings that would break behavior, leak data,
- or block a rollback: incorrect logic, unscoped database queries, PII
- in logs or error messages, and migrations that aren't backward
- compatible. Style, naming, and refactoring suggestions are Nit at
- most.
-
- ## Cap the nits
-
- Report at most five Nits per review. If you found more, say "plus N
- similar items" in the summary instead of posting them inline. If
- everything you found is a Nit, lead the summary with "No blocking
- issues."
-
- ## Do not report
-
- - Anything CI already enforces: lint, formatting, type errors
- - Generated files under `src/gen/` and any `*.lock` file
- - Test-only code that intentionally violates production rules
-
- ## Always check
-
- - New API routes have an integration test
- - Log lines don't include email addresses, user IDs, or request bodies
- - Database queries are scoped to the caller's tenant
-
-####
-
-
-
-Keep it focused
-
-Length has a cost: a long `REVIEW.md` dilutes the rules that matter most. Keep it to instructions that change review behavior, and leave general project context in `CLAUDE.md`.
-
-##
-
-
-
-View usage
-
-Go to [claude.ai/analytics/code-review](<https://claude.ai/analytics/code-review>) to see Code Review activity across your organization. The dashboard shows:
-
-Section| What it shows
----|---
-PRs reviewed| Daily count of pull requests reviewed over the selected time range
-Code Review cost| Code Review spend so far this month
-Feedback| Count of review comments that were auto-resolved because a developer addressed the issue
-Repository breakdown| Per-repo counts of PRs reviewed, comments resolved, and review runs, with estimated cost and a per-PR view
-
-The Code Review cost card shows an amount only when the current month is selected. Cost figures in analytics can differ from your invoice. Repository breakdown costs are estimated at list price, before any discounts or credits, and cover only reviews that Claude posted on a pull request. For invoice-accurate spend, refer to your Anthropic bill.
-
-##
-
-
-
-Pricing
-
-Code Review is billed based on token usage. Each review averages $15-25 in cost, scaling with PR size, codebase complexity, and how many issues require verification. Code Review usage is billed separately through [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) and does not count against your plan’s included usage. The review trigger you choose affects total cost:
-
- * **Once after PR creation** : runs once per PR
- * **After every push** : runs on each push, multiplying cost by the number of pushes
- * **Manual** : no reviews on open or push, so cost accrues only from reviews someone requests
-
-In Once after PR creation or Manual mode, commenting `@claude review always` opts the PR into push-triggered reviews, so additional cost accrues per push after that comment. In After every push mode, pushes already trigger reviews, so the subscription doesn’t change per-push cost. Commenting `@claude review` runs a single review without subscribing to future pushes. Claude reviews a pull request from a fork only when someone comments `@claude review`, so a fork pull request never accrues per-push cost in any mode. Costs appear on your Anthropic bill regardless of whether your organization uses Amazon Bedrock or Google Cloud’s Agent Platform for other Claude Code features. To set a monthly spend cap for Code Review, go to [claude.ai/admin-settings/usage](<https://claude.ai/admin-settings/usage>) and configure the limit for the Claude Code Review service. To monitor spend, use the analytics dashboard.
-
-##
-
-
-
-Troubleshooting
-
-Review runs are best-effort, and a failed run never blocks your PR. Code Review retries some interrupted reviews on its own. This section covers how to run a review again yourself and where to look when the check run reports issues you can’t find.
-
-###
-
-
-
-Retrigger a failed or timed-out review
-
-When a review fails or exceeds its time limit, the check run completes with a title such as **Code review failed** or **Code review timed out**. The conclusion is still neutral, so nothing blocks your merge. Unless the check run’s summary says a new review of the commit has been queued automatically, run the review again yourself. To run the review again, comment `@claude review` on the PR. This starts a fresh review without subscribing the PR to future pushes. If the PR isn’t from a fork, you can instead click **Re-run** on the **Claude Code Review** check in GitHub’s Checks tab. A re-run also starts a fresh review without subscribing the PR.
-
-###
-
-
-
-Review didn’t run and the PR shows a budget message
-
-When your organization’s monthly spend cap for Code Review is reached or its usage-credits balance is used up, Code Review skips the review and posts a single comment on the PR. The comment and the check-run card both name the cause and link the admin page where an admin fixes it:
-
- * **Spend cap reached** : reviews resume at the start of the next billing period, or immediately after an admin raises the cap at [claude.ai/admin-settings/usage](<https://claude.ai/admin-settings/usage>)
- * **Usage credits used up** : reviews resume once an admin adds more [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) at [claude.ai/admin-settings/usage](<https://claude.ai/admin-settings/usage>)
-
-###
-
-
-
-Find issues that aren’t showing as inline comments
-
-If the check run title says issues were found but you don’t see inline review comments on the diff, look in these other locations where findings are surfaced:
-
- * **Check run Details** : click **Details** next to the Claude Code Review check in the Checks tab. The severity table lists every finding with its file, line, and summary regardless of whether the inline comment was accepted.
- * **Files changed annotations** : open the **Files changed** tab on the PR. Findings render as annotations attached directly to the diff lines, separate from review comments.
- * **Review body** : if you pushed to the PR while a review was running, some findings may reference lines that no longer exist in the current diff. Those appear under an **Additional findings** heading in the review body text rather than as inline comments.
-
-##
-
-
-
-Review a diff locally
-
-The [`/code-review` command](</docs/en/commands>) reviews a diff in your terminal without installing the GitHub App. It reports correctness bugs. Depending on your model and effort level, the review also covers reuse, simplification, and efficiency cleanups. `/review` is an alias of `/code-review`; before v2.1.223, it was a separate command that ran a single-pass, read-only review of a GitHub pull request.
-
-1
-
-Run /code-review
-
-From the session where you’re working, run the command:
-
- /code-review
-
-It reviews your branch’s commits ahead of its upstream plus any uncommitted changes, so it needs work on the branch or in the working tree to have something to report. To review something else, pass a target: a file path, a PR number, a branch name, or a ref range such as `main...my-feature`.You can also add flags:
-
- * `--fix`: applies the findings to your working tree after the review
- * `--comment`: posts the findings on a GitHub pull request as inline comments, or on a GitLab merge request as a single note
- * `--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
- * `--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. Later reviews reuse the value you typed until you pass `--max-findings default`. Requires Claude Code v2.1.288 or later
-
-When you pass `--comment` for a GitLab merge request, Claude Code posts the findings through GitLab’s `glab` CLI. Requires Claude Code v2.1.257 or later. When `glab` isn’t installed, Claude prints the findings in the terminal instead.Pass the merge request as its URL or a `!123` reference. Claude Code treats a bare number or branch name as a merge request only when the checkout’s origin is on `gitlab.com`. On a self-managed GitLab instance, pass the URL or `!123` form.
-
-2
-
-Keep working
-
-The 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.
-
-3
-
-Act on the findings
-
-Ask Claude to fix what the review found. If you passed `--fix` or `--comment`, the review has already applied or posted its findings.
-
-Claude reports the findings as text in the reply in both of these runs, even when a host application requests a findings list:
-
- * In a terminal session, where `/code-review` runs the review as a [forked subagent](</docs/en/skills#run-skills-in-a-subagent>)
- * In a `-p` run with text or JSON output
-
-In 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. Claude Code renders the report 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. When Claude fixes reported findings later in the session, it reports them again, and Claude Code marks each finding in the updated findings list as fixed, skipped, or no change needed.
-
-###
-
-
-
-What the review reads and edits
-
-The review follows your `CLAUDE.md` like any Claude Code session, but it doesn’t read `REVIEW.md`. A background review applies its `--fix` edits outside your session’s [checkpoints](</docs/en/checkpointing#subagent-edits-not-restored>), so `/rewind` doesn’t undo them; use git to revert them. When the review runs in the foreground, it edits your working tree during your own turn, so `/rewind` restores its edits as usual.
-
-###
-
-
-
-Tune effort and arguments
-
-Pass 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. When you don’t type a level, the review reuses the last level from `low` through `max` you typed, even in an earlier session, and Claude Code shows a notice such as `Reusing high effort, the level you typed last time`. Type a level, like `/code-review high`, to change what later runs reuse; a level you pass in a non-interactive `-p` run doesn’t update it. `ultra` neither updates nor uses the remembered level. If you’ve never typed a level, the review uses the session’s current effort. Before v2.1.223, a `/code-review` without a level always used the session’s current effort. After the effort level and flags, Claude Code reads the rest of the line in one of two ways:
-
- * **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#pass-arguments-to-skills>). Before v2.1.218, a command stacked after `/code-review` expanded as its own skill.
- * **With`ultra`**: Claude Code reads a single word as a base branch or PR number, and turns longer text that doesn’t name a branch or PR into [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.
-
-###
-
-
-
-Run in the foreground
-
-The review runs in the background by default; before v2.1.218, it ran inside your conversation. It runs in the foreground instead in cases like these:
-
- * You run `/code-review` again while an earlier review is still in progress
- * You 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>)
- * You set [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars>) to `1`, which also turns off every other background task feature
-
-###
-
-
-
-Let Claude start the review
-
-Claude can start `/code-review` on its own. Ask it to review your changes in plain language and it can run the skill without you typing the command, and a [scheduled task](</docs/en/scheduled-tasks>) with `/code-review` as its prompt runs the review. A scheduled task never launches the cloud review, so schedule `/code-review` without the `ultra` argument. To 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`:
-
- {
- "skillOverrides": {
- "code-review": "user-invocable-only"
- }
- }
-
-Before 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.
-
-###
-
-
-
-Escalate to ultrareview
-
-`/code-review ultra --fix` runs the deeper [ultrareview](</docs/en/ultrareview>) in the cloud, then applies its findings to your working tree when they arrive back in your session. Ultrareview uses its own scope: your current branch against the repository’s default branch, plus uncommitted and staged changes in the working tree. 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>). Pass a branch name, such as `/code-review ultra develop`, to compare against a different base. When 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.
-
-Ultrareview requires authentication with a claude.ai account and is not 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. When ultrareview is not available, `/code-review ultra` runs a local review in your session instead.
-
-To 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. The command was named `/simplify` before v2.1.147, when it applied fixes by default. `/simplify` runs a separate cleanup-only review that applies fixes without hunting for bugs. If you scripted `/simplify` for bug-finding, switch to `/code-review --fix`.
+Option| What starts a review| Where it runs| Who can use it
+---|---|---|---
+Code Review| Pull request activity, as each repository is set, or an `@claude review` comment| Anthropic infrastructure| Organizations on a Team or Enterprise plan with GitHub repositories, once an Owner turns it on
+[`/code-review`](</docs/en/code-review-local>)| You run the command on your branch| Your Claude Code session| Anyone, on any plan
+[Ultrareview](</docs/en/ultrareview>)| You start it from Claude Code| A cloud sandbox| Requires signing in with a claude.ai account. See [Ultrareview](</docs/en/ultrareview>) for where it isn’t available
+Claude in your own CI, with [GitHub Actions](</docs/en/github-actions>) or [GitLab CI/CD](</docs/en/gitlab-ci-cd>)| Your pipeline’s events, such as every pull request or merge request| Your own CI runners| Anyone with a Claude API key or cloud provider credentials, on GitHub or GitLab
+Your own reviewer, as a [subagent](</docs/en/sub-agents>) or [skill](</docs/en/skills>)| You or Claude invoke it during a session| Wherever you run Claude Code| Anyone who writes one
##
@@ -413,9 +124,6 @@
Related resources
- * [Commands](</docs/en/commands>): run `/code-review` in a local Claude Code session to check a diff before pushing
- * [GitHub Actions](</docs/en/github-actions>): run Claude in your own GitHub Actions workflows for custom automation beyond code review
- * [GitLab CI/CD](</docs/en/gitlab-ci-cd>): self-hosted Claude integration for GitLab pipelines
- * [Memory](</docs/en/memory>): how `CLAUDE.md` files work across Claude Code
- * [Analytics](</docs/en/analytics>): track Claude Code usage beyond code review
+ * [GitHub Enterprise Server](</docs/en/github-enterprise-server>): use Code Review with a self-hosted GitHub instance
+ * [GitHub App permissions](</docs/en/github-actions#github-app-permissions>): the full permission set the Claude GitHub App requests
* [How Anthropic secures its AI-native software development lifecycle](<https://claude.com/blog/how-anthropic-secures-its-ai-native-software-development-lifecycle>): how automated review fits as one layer of Anthropic’s secure development process
--- a/code-review-costs.md
+++ b/code-review-costs.md
@@ -0,0 +1,88 @@
+[Code Review](</docs/en/code-review>) has no flat per-review price. What you spend depends on the cost of each review and on how many reviews run:
+
+ * **Cost of each review** : scales with the [review level](</docs/en/code-review-setup#set-the-default-review-level>), the size of the change, the complexity of the surrounding code, and how many candidate issues need verification
+ * **Number of reviews** : set by how often reviews run in each repository
+
+##
+
+
+
+Pricing
+
+Code Review is billed on token usage through [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>), separately from your plan’s included usage. Reviews are billed to your organization, not to the developer who opened the PR or requested the review. Costs appear on your Anthropic bill regardless of whether your organization uses Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry for other Claude Code features.
+
+###
+
+
+
+How often reviews run
+
+A repository you add from the admin page starts at **After every push** , which runs the most reviews. Each repository’s [**Review runs** setting](</docs/en/code-review-setup#set-when-reviews-run>) decides how many reviews a pull request gets:
+
+ * **Once after PR creation** : a review runs when the pull request is opened, reopened, or marked ready for review
+ * **After every push** : runs on each push, multiplying cost by the number of pushes
+ * **Manual (@claude review)** : no reviews on open or push
+
+Comment commands, drafts, and pull requests from forks adjust those counts:
+
+ * **`@claude review always` in Once after PR creation or Manual mode**: [opts the PR into push-triggered reviews](</docs/en/code-review-pull-requests#comment-commands>), so additional cost accrues per push after that comment
+ * **`@claude review always` in After every push mode**: pushes already trigger reviews, so the subscription doesn’t change per-push cost
+ * **`@claude review`** : runs a single review without subscribing to future pushes
+ * **Drafts and pull requests from forks** : [automatic reviews skip both](</docs/en/code-review-pull-requests#review-drafts-and-pull-requests-from-forks>), so pushes to them don’t add reviews
+
+##
+
+
+
+Estimate your spend
+
+Before a wide rollout, run a small pilot to estimate monthly spend from your own pull requests.
+
+ 1. Set a monthly spend limit for the pilot.
+ 2. Turn on Code Review for a few representative repositories with **Review runs** set to **Once after PR creation** or **Manual (@claude review)**.
+ 3. After several reviews have run, read each repository’s average cost per review in the **Average cost** column of the **Repositories** table, in the **Code review** section of [**Admin settings > Claude Code**](<https://claude.ai/admin-settings/claude-code#code-review>).
+ 4. Multiply that average by the number of pull requests the repository opens in a month. For **After every push** , multiply again by the typical number of pushes per pull request.
+
+A repository’s average moves with the size of its pull requests and with the review level you choose.
+
+##
+
+
+
+Limit your spend
+
+To set a monthly spend limit for Code Review, go to [claude.ai/admin-settings/usage](<https://claude.ai/admin-settings/usage>) and configure the limit for the Claude Code Review service. The limit applies to the whole organization. Code Review skips reviews when any of these runs out:
+
+ * **Code Review spend limit** : the monthly limit you set for the Claude Code Review service. It resets at the start of the next billing period, and reviews resume sooner if you raise it.
+ * **Organization spend limit** : your organization’s overall monthly spend limit for usage credits. Raise it on the same page.
+ * **Usage credits balance** : your organization’s balance of usage credits. Add credits on the same page.
+
+Code Review also skips reviews once what’s left is less than the expected cost of one review. When a review is skipped, developers see a [comment on the PR](</docs/en/code-review-troubleshooting#review-didn%E2%80%99t-run-and-the-pr-shows-a-budget-message>) that names the cause and links to the usage settings. To monitor spend, use the analytics dashboard.
+
+##
+
+
+
+View usage
+
+Go to [claude.ai/analytics/code-review](<https://claude.ai/analytics/code-review>) to see Code Review activity across your organization.
+
+Section| What it shows
+---|---
+PRs reviewed| Daily count of pull requests reviewed over the selected time range
+Code Review cost| Code Review spend so far this month
+Feedback| Count of review comments that were auto-resolved because a developer addressed the issue
+Repository breakdown| Per-repo counts of PRs reviewed, comments resolved, and review runs, with estimated cost and a per-PR view
+
+The Code Review cost card shows an amount only when the current month is selected. Cost figures in analytics can differ from your invoice. Repository breakdown costs are estimated at list price, before any discounts or credits, and cover only reviews that Claude posted on a pull request. For invoice-accurate spend, refer to your Anthropic bill.
+
+##
+
+
+
+Related resources
+
+ * [Set up Code Review](</docs/en/code-review-setup>): where to choose the review level and when reviews run in each repository
+ * [Read and request reviews on a pull request](</docs/en/code-review-pull-requests>): the comment commands, pull requests from forks, and the budget message developers see when a review is skipped
+ * [Code Review](</docs/en/code-review>): what a review checks and what it posts
+ * [Manage costs effectively](</docs/en/costs>): spend controls and usage tracking for the rest of Claude Code
Show diff (142 lines)
--- a/code-review-customize.md
+++ b/code-review-customize.md
@@ -0,0 +1,139 @@
+You can change what [Code Review](</docs/en/code-review>) flags on your repository by committing instructions to it. This is how you cut nit volume, stop comments on generated files, or add a rule your team cares about. Put them in one of two files:
+
+ * **`CLAUDE.md`** : [project instructions](</docs/en/memory>) that Claude Code reads for every task, reviews included. Code Review reads them as project context and flags changes that violate them.
+ * **`REVIEW.md`** : instructions for reviews alone. Use it to say what your team wants flagged, at what severity, and what to skip.
+
+Add `REVIEW.md` at your repository root and merge it. Then protect your default branch.
+
+To change how thorough reviews are or when they run, ask an Owner to change the [review level](</docs/en/code-review-setup#set-the-default-review-level>) or the [**Review runs** setting](</docs/en/code-review-setup#set-when-reviews-run>).
+
+##
+
+
+
+Use CLAUDE.md for project-wide rules
+
+Code Review reads your repository’s `CLAUDE.md` files as project context. A change that violates one of their rules becomes a finding at whichever [severity level](</docs/en/code-review-pull-requests#severity-levels>) fits the issue. A review reads the `CLAUDE.md` at your repository root and the `CLAUDE.md` files in the parent directories of each changed file. A subdirectory’s `CLAUDE.md` is read when the pull request changes a file under that path.
+
+##
+
+
+
+Use REVIEW.md for review-only rules
+
+`REVIEW.md` is a file at your repository root that tailors Code Review to your repository. You can also add a `REVIEW.md` in a subdirectory to add checks for changes under that path, on top of the root file. The agents that find issues and the agents that verify them receive its contents as your repository’s review instructions, alongside Code Review’s default review guidance. The step that writes the final review consults it before settling severity and writing the summary. This example layout has a root file and one subdirectory file:
+
+ your-repo/
+ ├── REVIEW.md # Root file
+ ├── services/
+ │ └── billing/
+ │ └── REVIEW.md # Adds checks for changes under services/billing/
+ └── src/
+
+Before you rely on a subdirectory file, protect your default branch and check what a review reads for your branch setup.
+
+The Code Review service and the local [`/code-review` command](</docs/en/code-review-local>) are two separate tools, and they read different files. The service reads both `CLAUDE.md` and `REVIEW.md`. The `/code-review` command, which you run inside a Claude Code session on your own machine, reads your `CLAUDE.md` files and not `REVIEW.md`. Put guidance you want applied in both places in `CLAUDE.md`, and keep `REVIEW.md` for rules specific to pull request review.
+
+###
+
+
+
+Example REVIEW.md
+
+This `REVIEW.md` recalibrates severity for a backend service, caps nits, skips generated files, and adds repo-specific checks.
+
+ # Review instructions
+
+ ## What Important means here
+
+ Reserve Important for findings that would break behavior, leak data,
+ or block a rollback: incorrect logic, unscoped database queries, PII
+ in logs or error messages, and migrations that aren't backward
+ compatible. Style, naming, and refactoring suggestions are Nit at
+ most.
+
+ ## Cap the nits
+
+ Report at most five Nits per review.
+
+ ## Do not report
+
+ - Anything CI already enforces: lint, formatting, type errors
+ - Generated files under `src/gen/` and any `*.lock` file
+ - Test-only code that intentionally violates production rules
+
+ ## Always check
+
+ - New API routes have an integration test
+ - Log lines don't include email addresses, user IDs, or request bodies
+ - Database queries are scoped to the caller's tenant
+
+###
+
+
+
+Choose what to write in REVIEW.md
+
+`REVIEW.md` is freeform Markdown that changes what a review finds and reports. It doesn’t change the format of the review. Find the problem you’re seeing, then add an instruction like the one shown. The example uses the first four.
+
+ * **The wrong things are marked Important** : redefine what 🔴 Important means for your repository. The default calibration targets production code, and a docs repository, a config repository, or a prototype might want a much narrower definition. State which classes of finding are Important and which are Nit at most. You can also escalate, for example treating any `CLAUDE.md` violation as Important.
+ * **Too many nits** : cap how many 🟡 Nit comments a single review posts. A cap like “report at most five nits” keeps reviews actionable.
+ * **Comments on generated files or on what CI already checks** : list paths and finding categories where Claude should skip findings. Common candidates are generated code, lockfiles, and vendored dependencies, along with anything your CI already enforces like linting or spellcheck. For paths that warrant some review but not full scrutiny, set a higher bar instead: “in `scripts/`, only report if near-certain and severe.”
+ * **A team rule isn’t being checked** : add rules you want flagged on every pull request, like “new API routes must have an integration test.”
+ * **Findings that turn out to be wrong** : require evidence before a class of finding is posted. For example, “behavior claims need a `file:line` citation in the source, not an inference from naming” cuts false positives that would otherwise cost the author a round trip.
+
+Some of these instructions need the root file on a protected default branch. Keep `REVIEW.md` to instructions that change review behavior, and leave general project context in `CLAUDE.md`.
+
+###
+
+
+
+Which branch REVIEW.md is read from
+
+Code Review reads `REVIEW.md` from the pull request’s base branch or from the default branch, never from the pull request’s own changes. To change review behavior, merge the `REVIEW.md` change first. Keep `REVIEW.md` on your default branch and protect that branch. When a review reads the copy on a protected default branch, the first row of the table below, it honors these instructions from the root file:
+
+ * Lowering a finding’s severity
+ * Excluding paths, files, or classes of issue
+ * Capping nit comments
+
+####
+
+
+
+What counts as branch protection
+
+Code Review counts these settings as protection:
+
+ * **Default branch** : a classic branch protection rule or a ruleset
+ * **Any other branch** : a ruleset only
+
+A ruleset counts when it restricts updates or requires pull requests with at least one approval. If it requires pull requests, it must also dismiss that approval on a new push or require the approval to come after the last push.
+
+####
+
+
+
+What a review reads for each branch setup
+
+Find your repository’s situation in the first column of the table below.
+
+Branch protection| Copy read| Files read
+---|---|---
+The default branch is protected, and the pull request targets it or targets a branch no ruleset protects| Default branch| Root and subdirectory files
+The pull request targets another branch that a ruleset protects| That base branch| Root and subdirectory files
+The default branch isn’t protected, and the base branch has no protection rule of either kind| Default branch| Root file
+Code Review can’t confirm the protection settings. This includes an unprotected default branch with a base branch that has only a classic rule| None| None
+
+If the check run mentions `REVIEW.md`, see [The check run mentions REVIEW.md](</docs/en/code-review-troubleshooting#the-check-run-mentions-review-md>).
+
+##
+
+
+
+Related resources
+
+ * [Code Review](</docs/en/code-review>): what the service is and how a review runs
+ * [Read and request reviews on a pull request](</docs/en/code-review-pull-requests#severity-levels>): what each severity level means and how findings appear
+ * [Set up Code Review](</docs/en/code-review-setup>): the review level and when reviews run, which an Owner sets
+ * [Review locally with `/code-review`](</docs/en/code-review-local>): the `/code-review` command, its arguments, and effort levels
+ * [Memory](</docs/en/memory>): how `CLAUDE.md` files work across Claude Code
Show diff (194 lines)
--- a/code-review-local.md
+++ b/code-review-local.md
@@ -0,0 +1,191 @@
+`/code-review` is a command you type at the Claude Code prompt, in the session where you’re working. Claude reviews the changes on your branch, looks for correctness bugs, and reports what it found in your conversation. Depending on your model and effort level, the review also covers reuse, simplification, and efficiency cleanups. The command works on any plan. The review runs in your own session, so it counts toward your plan’s usage or API billing the same way the rest of the session does.
+
+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.
+
+`/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.
+
+1
+
+Run /code-review
+
+Run the command:
+
+ /code-review
+
+With no target, the review covers the changes on your current branch. To point the review at a pull request, another branch, a path, or a range of commits instead, see Choose what to review.You can also add flags:
+
+ * `--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>).
+ * `--comment`: posts the findings on a GitHub pull request as inline comments, or on a GitLab merge request as a single note
+
+2
+
+Keep working
+
+The 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.
+
+3
+
+Act on the findings
+
+Ask Claude to fix what the review found. With `--fix` or `--comment`, Claude applies or posts the findings as part of the review, and you may be asked to approve its edits.
+
+##
+
+
+
+Choose what to review
+
+To review something other than your current branch, type a target after the effort level and any flags. Claude receives that text as the review target. A target can be a pull request number, a branch name, a file path, or a Git revision range. Find what you want reviewed in the first column and type what the second column shows:
+
+To point the review at| Type
+---|---
+Your current branch and uncommitted changes| `/code-review`
+Your last 15 commits| `/code-review HEAD~15..HEAD`
+One branch against another| `/code-review main...my-feature`
+A single commit, where `abc1234` is the commit’s hash| `/code-review abc1234^..abc1234`
+A pull request by number| `/code-review 1234`
+A file or directory path| `/code-review src/auth`
+
+With no target, `/code-review` reviews your branch’s commits ahead of its upstream branch plus your uncommitted changes. If the branch has no upstream, Claude compares against `main`, or against the previous commit. With `ultra`, Claude Code reads the target differently, as Text after the effort level and flags describes.
+
+##
+
+
+
+What the review reads and edits
+
+Check these before you run a review, especially with `--fix`:
+
+ * **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.
+ * **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, it edits your working tree during your own turn, so `/rewind` restores its edits as usual.
+ * **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.
+
+##
+
+
+
+How findings are reported
+
+Claude reports the findings as text in the reply in both of these runs:
+
+ * In a terminal session, where `/code-review` runs the review as a [forked subagent](</docs/en/skills#run-skills-in-a-subagent>)
+ * In a `-p` run with text or JSON output
+
+In 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. When 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.
+
+##
+
+
+
+Tune effort and arguments
+
+Beyond `--fix` and `--comment`, the command takes these flags:
+
+ * `--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.
+ * `--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.
+
+Pass 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. When 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:
+
+ * **Typing a level** : a level you type, like `/code-review high`, changes what later runs reuse
+ * **Non-interactive runs** : a level you pass in a non-interactive `-p` run doesn’t update the remembered level
+ * **`ultra`** : the review neither uses nor updates the remembered level
+ * **No level ever typed** : the review uses the session’s current effort
+
+Before v2.1.223, a `/code-review` without a level always used the session’s current effort.
+
+###
+
+
+
+Post findings to a GitLab merge request
+
+When you pass `--comment` for a GitLab merge request, Claude Code posts the findings through GitLab’s `glab` CLI. Requires Claude Code v2.1.257 or later. When `glab` isn’t installed, Claude prints the findings in the terminal instead. Pass the merge request as its URL or a `!123` reference. Claude Code treats a bare number or branch name as a merge request only when the checkout’s origin is on `gitlab.com`. On a self-managed GitLab instance, pass the URL or `!123` form.
+
+###
+
+
+
+Text after the effort level and flags
+
+After the effort level and flags, Claude Code reads the rest of the line as the review target. The `ultra` argument changes that reading:
+
+ * **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.
+ * **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#pass-arguments-to-skills>). Before v2.1.218, a command stacked after `/code-review` expanded as its own skill.
+
+##
+
+
+
+Run in the foreground
+
+To make the review run in the foreground, do one of these:
+
+ * 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>).
+ * Set [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars>) to `1`, which also turns off every other background task feature
+ * Run `/code-review` again while an earlier review is still in progress
+
+Before v2.1.218, the review ran inside your conversation.
+
+##
+
+
+
+Let Claude start the review
+
+Claude can start `/code-review` on its own, without you typing the command:
+
+ * **When you ask in plain language** : ask Claude to review your changes and it can run the skill
+ * **From a scheduled task** : a [scheduled task](</docs/en/scheduled-tasks>) with `/code-review` as its prompt runs the review
+
+A scheduled task never launches the cloud review, so schedule `/code-review` without the `ultra` argument. To 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`:
+
+ {
+ "skillOverrides": {
+ "code-review": "user-invocable-only"
+ }
+ }
+
+Before 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.
+
+##
+
+
+
+Escalate to ultrareview
+
+`/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. Ultrareview uses its own scope:
+
+ * **What it compares** : your current branch against the repository’s default branch, plus uncommitted and staged changes in the working tree
+ * **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>)
+ * **A different base** : pass a branch name, such as `/code-review ultra develop`, to compare against a different base
+
+When 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.
+
+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`.
+
+To 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.
+
+##
+
+
+
+Change or build on the review
+
+`/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:
+
+ * **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>).
+ * **Build your own reviewer** : write a reviewer [subagent](</docs/en/sub-agents>) or a review [skill](</docs/en/skills>)
+ * **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
+
+The 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`.
+
+##
+
+
+
+Related resources
+
+ * [Code Review](</docs/en/code-review>): the managed service that reviews every pull request on GitHub for your organization
+ * [Ultrareview](</docs/en/ultrareview>): setup, limits, and cost of the deeper cloud review
+ * [Commands](</docs/en/commands>): the one-line reference for `/code-review`, `/review`, `/simplify`, and `/verify`
+ * [Skills](</docs/en/skills>): how bundled skills work and how to write your own
Show diff (168 lines)
--- a/code-review-pull-requests.md
+++ b/code-review-pull-requests.md
@@ -0,0 +1,165 @@
+Code Review is a managed service that an Owner in your Claude organization turns on for a set of GitHub repositories. Once it’s on, Claude reviews pull requests in those repositories and posts its findings as inline comments, a summary in the review body, and a check run named **Claude Code Review**. A review never approves or blocks your pull request, and the check run never concludes as a failure. An Owner controls [when reviews run](</docs/en/code-review-setup#set-when-reviews-run>) and [how thorough they are](</docs/en/code-review-setup#set-the-default-review-level>) for each repository.
+
+If your plan doesn’t include Code Review, you can still have Claude review your branch from a Claude Code session: see [Review locally with `/code-review`](</docs/en/code-review-local>).
+
+##
+
+
+
+Severity levels
+
+Claude posts each finding as an inline comment on the lines concerned and marks it with one of three severity levels:
+
+Marker| Severity| Meaning
+---|---|---
+🔴| Important| A bug that should be fixed before merging
+🟡| Nit| A minor issue, worth fixing but not blocking
+🟣| Pre-existing| A bug that exists in the codebase but wasn’t introduced by this PR
+
+When the review recorded its reasoning, the finding has a collapsed **Why this was flagged** section. Expand it to read why Claude flagged the issue and how it verified the problem. To change what Claude flags in your repository or how it ranks severity, see [Customize Code Review](</docs/en/code-review-customize>).
+
+##
+
+
+
+Respond to findings
+
+You can merge without responding to a finding, unless your repository’s own rules require it. If its branch protection [requires conversation resolution](<https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-conversation-resolution-before-merging>), resolve each finding’s thread before you merge. To clear a finding, resolve its thread or push a fix.
+
+ * **Dismiss it without a code change** : resolve the thread yourself on GitHub. Replying alone doesn’t dismiss a finding.
+ * **Fix the issue** : change the code and push. The next review of the pull request resolves its earlier thread when it judges the issue fixed, whether that review runs automatically on your push or you request it.
+ * **Explain or disagree** : reply to the comment. Claude doesn’t respond right away, and a reply doesn’t start a review. The next review of the pull request reads the replies on its earlier findings, and can resolve the thread or post one follow-up reply. If the same kind of finding keeps coming back, ask a maintainer to add a rule to [`REVIEW.md`](</docs/en/code-review-customize#choose-what-to-write-in-review-md>).
+
+To get that next review without pushing, comment `@claude review` as a top-level pull request comment.
+
+##
+
+
+
+Check run output
+
+The **Details** link on the **Claude Code Review** check run opens the findings in one table sorted by severity, including any finding whose inline comment GitHub didn’t accept:
+
+Severity| File:Line| Issue
+---|---|---
+🔴 Important| `src/auth/session.ts:142`| Token refresh races with logout, leaving stale sessions active
+🟡 Nit| `src/auth/session.ts:88`| `parseExpiry` silently returns 0 on malformed input
+
+A finding that has a line but wasn’t posted as an inline comment appears as an annotation in the **Files changed** tab, on the lines concerned. Important findings show in red, nits in yellow, and pre-existing bugs in gray. The check run concludes as neutral, or as skipped when an automatic review didn’t run because a push changed no files. It never concludes as a failure, so a finished review doesn’t fail a required check. If you don’t see findings, or a review didn’t run, see [Troubleshoot Code Review](</docs/en/code-review-troubleshooting>).
+
+###
+
+
+
+Read the result from a script
+
+To gate a merge or post a summary from your own CI, parse the last line of the Details text with `gh` and jq. That line is a machine-readable comment.
+
+1
+
+Find the check run ID
+
+From your shell, list the commit’s check runs and take the `id` of the `Claude Code Review` run. Replace `OWNER` and `REPO` with your repository owner and name, and `<commit-sha>` with the pull request’s head commit:
+
+ gh api repos/OWNER/REPO/commits/<commit-sha>/check-runs --jq '.check_runs[] | {id, name}'
+
+2
+
+Read the severity counts
+
+Read the counts from that check run, replacing `CHECK_RUN_ID` with the ID:
+
+ gh api repos/OWNER/REPO/check-runs/CHECK_RUN_ID \
+ --jq '.output.text | split("bughunter-severity: ")[1] | split(" -->")[0] | fromjson'
+
+This prints a JSON object with a count per severity and its keys in alphabetical order, for example `{"nit": 1, "normal": 2, "pre_existing": 0}`. The counts include findings from earlier reviews of the pull request whose threads are still open.
+
+3
+
+Act on the result
+
+Have your script handle these cases:
+
+ * **`normal` is above zero**: fail the job if you want to gate the merge. The `normal` key holds the count of Important findings, so Claude found at least one bug worth fixing before merge.
+ * **The line is missing** : treat it as no verdict rather than as zero findings. A check run for a review that failed, timed out, was canceled, or was superseded by a newer one has no such line, and some completed reviews have none either.
+
+##
+
+
+
+Request a review
+
+If your pull request is a draft or comes from a fork, automatic reviews skip it, so request the review with a comment command. To get a review on your pull request, do one of these:
+
+ * **Open it or mark it ready** : in a repository set to **Once after PR creation** or **After every push** , a review starts when you open or reopen the pull request, or mark a draft ready for review.
+ * **Comment a command** : post `@claude review` on the pull request.
+ * **Push a commit** : a push starts a review in a repository set to **After every push** , or on a pull request you subscribed with `@claude review always`.
+ * **Click Re-run** : after a review fails or times out on a pull request that isn’t from a fork, [run it again](</docs/en/code-review-troubleshooting#retrigger-a-failed-or-timed-out-review>) from the check run.
+ * **Wait for the automatic retry** : a review whose session was interrupted is retried once automatically. The [check run’s summary](</docs/en/code-review-troubleshooting#retrigger-a-failed-or-timed-out-review>) says when that’s happening.
+
+###
+
+
+
+Comment commands
+
+Post one of these commands as a comment on the pull request:
+
+Command| What it does| When to use it
+---|---|---
+`@claude review`| Starts a single review without subscribing the PR to future pushes| You want one review now, such as on a pull request in a repository set to Manual, or another review right away in the other modes
+`@claude review always`| Starts a review and subscribes the PR to push-triggered reviews going forward| You want every subsequent push to start a fresh review, such as on a high-priority PR in a repository set to Manual
+`@claude review once`| Same as `@claude review`: starts a single review without subscribing| The same cases as `@claude review`
+
+For any of these commands to start a review, all of these conditions have to hold:
+
+ * Post it as a new top-level pull request comment, not an inline comment on a diff line and not the body of a review. Editing an earlier comment doesn’t count.
+ * Put the command at the start of the comment, with `always` on the same line as the rest of the command. Capitalization doesn’t matter.
+ * You need write, maintain, or admin permission on the repository. Claude checks this with GitHub for each person who comments, and comments from bots don’t start reviews.
+ * The pull request must be open.
+
+When the command is accepted, a **Claude Code Review** check run appears on the pull request with the title **Code review queued…**. The title changes to **Code review in progress…** when the review starts. Claude may also react to your comment with 👀, but that reaction can appear when no review starts, so look for the check run instead. If a review is already running on the pull request’s latest commit, a new request doesn’t start a second one.
+
+Before a July 2026 update, `@claude review` subscribed the PR to push-triggered reviews. If you relied on that behavior, comment `@claude review always` instead.
+
+###
+
+
+
+What a later review covers
+
+A later review that starts on its own, such as after a push, focuses on what changed since the last review and posts fewer nits and pre-existing findings. Its summary counts what it left out, in a line that ends “found and not posted” or “outside the scope of this re-review and not posted.” To get a review that leaves none of these out, comment `@claude review`. It covers the whole pull request again.
+
+###
+
+
+
+Review drafts and pull requests from forks
+
+Automatic reviews skip both of these, so request the review with a comment command:
+
+ * **Draft pull requests** : a comment command runs on a draft, so you can request a review before you mark the pull request ready. Pushes to a draft don’t start reviews, even after `@claude review always`. The subscription takes effect once you mark the pull request ready.
+ * **Pull requests from forks** : Claude doesn’t review a pull request from a fork automatically, regardless of the repository’s **Review runs** setting. To start one, comment `@claude review` on the pull request. The conditions for comment commands still apply, and the write access you need is to the base repository, not the fork.
+
+On a pull request from a fork, `@claude review always` works too, but doesn’t subscribe the pull request to reviews on later pushes. Clicking **Re-run** on the check run doesn’t start a review there.
+
+###
+
+
+
+Use Code Review alongside the Claude Code GitHub Action
+
+If the repository also runs the [Claude Code GitHub Action](</docs/en/github-actions>) in interactive mode with its default `@claude` trigger phrase, an `@claude review` comment starts the Action as well. To keep the two apart, set the Action’s `trigger_phrase` input to a different phrase.
+
+##
+
+
+
+Related resources
+
+ * [Troubleshoot Code Review](</docs/en/code-review-troubleshooting>): a review that didn’t start, failed, or was skipped for budget
+ * [Code Review](</docs/en/code-review>): what the service is and how a review runs
+ * [Set up Code Review](</docs/en/code-review-setup>): for Owners, turn on Code Review and choose when reviews run and at what level
+ * [Customize Code Review](</docs/en/code-review-customize>): change what Claude flags with `REVIEW.md` and `CLAUDE.md`
+ * [Code Review costs and usage](</docs/en/code-review-costs>): how reviews are billed and where the spend limit is set
+ * [Review locally with `/code-review`](</docs/en/code-review-local>): run a review of your branch from a Claude Code session
Show diff (202 lines)
--- a/code-review-setup.md
+++ b/code-review-setup.md
@@ -0,0 +1,199 @@
+As an Owner of your Claude organization, you turn on Code Review in [**Admin settings > Claude Code**](<https://claude.ai/admin-settings/claude-code#code-review>) on claude.ai. Reviews run on Anthropic infrastructure, so you don’t add workflow files to your repositories. After setup, you choose how thorough reviews are and when they run in each repository. You spend more at a higher review level and when reviews run more often. See [Code Review costs](</docs/en/code-review-costs#pricing>).
+
+##
+
+
+
+What you need to turn on Code Review
+
+First check that your organization [qualifies for Code Review](</docs/en/code-review#availability>). Then make sure you have this access, or someone who does:
+
+Access| Needed for
+---|---
+[Owner role](</docs/en/server-managed-settings#access-control>) in your Claude organization| Every step on the admin page
+Owner of the GitHub organization| Installing the Claude GitHub App and [linking it to your Claude organization](</docs/en/admin-setup#connected-github-accounts>). If you aren’t an owner, have one install and link the app before you start
+Write access to each repository you add, from the GitHub account you connect to Claude| Adding the repository
+
+##
+
+
+
+Turn on Code Review
+
+1
+
+Click the Allow code review switch
+
+Go to the **Code review** section of [**Admin settings > Claude Code**](<https://claude.ai/admin-settings/claude-code#code-review>) and click the **Allow code review** switch.If Code Review turns on right away with no dialog, your organization already has the Claude GitHub App linked or repositories added. Go to Add more repositories, then come back for the last step.
+
+2
+
+Connect your GitHub account
+
+If a **Connect GitHub** dialog opens, click **Connect**. If your organization uses GitHub Enterprise Server, select your instance in the dialog first. GitHub asks you to authorize Claude, then returns you to the admin page with the **Add a repository** dialog open.If **Add a repository** opened straight away, your account is already connected, so go on to the next step.
+
+3
+
+Install the Claude GitHub App
+
+If the repositories you want are listed in the **Add a repository** dialog, or you find them by searching there, go on to the next step. The dialog lists a repository only if the Claude GitHub App can access it, so if they aren’t there, install the app:
+
+ * Click **Install GitHub App**. When no repositories are listed, it’s a button in the dialog. Otherwise, it’s at the bottom of the dialog’s GitHub organization filter menu. GitHub’s install page opens in a new tab.
+ * Pick the GitHub organization that owns the repositories.
+ * Choose which repositories the app can access.
+ * Approve the requested permissions. The set is broader than a review uses and is shared by other Claude features, such as [GitHub Actions](</docs/en/github-actions>). See [what a review can access](</docs/en/code-review#what-a-review-can-access>) and the [full permission list](</docs/en/github-actions#github-app-permissions>).
+ * When the install completes, the tab returns to Claude. If it shows a **Finish connecting GitHub** button, click it to link the installation to your Claude organization.
+ * Go back to the admin page’s tab, where the list in the dialog refreshes.
+
+4
+
+Choose repositories
+
+Select the repositories you want reviewed, then click **Continue**. Adding a repository needs write access to it from the GitHub account you connected. You can add more repositories later.
+
+5
+
+Click Finish
+
+A **Code review is set up** dialog follows. Click **Finish** to turn Code Review on. If you close the dialog any other way, your repositories stay added but **Allow code review** stays off, and you turn it on from the switch.Each repository starts set to review after every push, which runs the most reviews. To run fewer, set when reviews run.
+
+6
+
+Verify with a test pull request
+
+Open a test pull request in one of the repositories you added, and don’t mark it as a draft. A check run named **Claude Code Review** appears within a few minutes. If you already set the repository to **Manual (@claude review)** , comment `@claude review` on the pull request to start the first review.If no check run appears, see [No check run appears on the test pull request](</docs/en/code-review-troubleshooting#no-check-run-appears-on-the-test-pull-request>).Once the review arrives, send your developers [Read and request reviews on a pull request](</docs/en/code-review-pull-requests>), which covers the severity levels, the comment commands, and how to respond to findings.
+
+##
+
+
+
+Set defaults for your organization
+
+As an Owner, you decide how thorough reviews are and how often they run. Both are in the **Code review** section of [**Admin settings > Claude Code**](<https://claude.ai/admin-settings/claude-code#code-review>).
+
+###
+
+
+
+Set the default review level
+
+The review level sets how thorough each review is, and a more thorough review costs more. You set one default for the organization and can override it for individual repositories.
+
+Level| What it trades
+---|---
+Quick| A lighter pass. The fastest level, at the lowest cost
+Standard| Balanced depth, speed, and cost. The default level
+Deep| The most thorough pass. Takes the longest and costs the most
+
+ * **Organization default** : select a level under **Review level** and confirm with **Change level**. Every repository uses it unless you give that repository its own.
+ * **One repository** : click **Edit** on the repository’s row, then select a **Review level** there. The first option, **Default** , follows the organization. The level saves as soon as you select it.
+
+A new level applies to reviews that start after the change. For what else drives the cost of each review, see [Code Review costs and usage](</docs/en/code-review-costs>).
+
+###
+
+
+
+Set when reviews run
+
+Each repository has its own **Review runs** setting, which decides when its pull requests get reviewed.
+
+ * **Once after PR creation** : a review runs when a pull request is opened, reopened, or marked ready for review
+ * **After every push** : a review runs on pushes to the pull request branch, catching new issues as the pull request evolves and auto-resolving threads when you fix flagged issues
+ * **Manual (@claude review)** : opening or pushing to a pull request doesn’t start a review. Comment [`@claude review`](</docs/en/code-review-pull-requests#comment-commands>) to request one, or `@claude review always` to also subscribe the pull request to reviews on subsequent pushes.
+
+Manual is useful for high-traffic repositories where you want to opt specific pull requests into review, or to start reviewing pull requests only once they’re ready. To compare what each option does to spend, see [How often reviews run](</docs/en/code-review-costs#how-often-reviews-run>). To change the setting, click **Edit** on the repository’s row in the **Repositories** table and select a **Review runs** option. The choice saves as soon as you select it, and the table’s **Review runs** column shows it shortened to Once per PR, Every push, or Manual.
+
+ * **Drafts and pull requests from forks** : whichever option you choose, [automatic reviews skip both](</docs/en/code-review-pull-requests#review-drafts-and-pull-requests-from-forks>)
+ * **New repositories** : a repository you add from the **Add a repository** dialog starts at **After every push**. If its GitHub organization is covered as a whole, it takes that organization row’s setting instead.
+
+###
+
+
+
+Turn tip comments on or off
+
+A tip comment is a short comment Claude posts on a pull request when no review starts, saying why and what to do next. **Show tips on pull requests** is on by default. With it on, Claude posts a tip in each of these cases, explaining:
+
+ * **The repository is set to Manual** : how to request a review with a comment
+ * **The pull request comes from a fork** : that a maintainer can request the review
+ * **A bot, or someone without write access, comments`@claude review`**: that no review was started, and who can request one
+ * **The GitHub organization isn’t linked to your Claude organization** : that reviews are paused, and how to link it
+
+Turn the setting off to stop these comments.
+
+###
+
+
+
+What developers can change
+
+Developers come to you to change the review level, the **Review runs** setting, or which repositories get reviews. From GitHub, without the Owner role, they can do these:
+
+ * **Request a review** : comment [`@claude review`](</docs/en/code-review-pull-requests#comment-commands>) on a pull request. This needs write access to the repository, and it works on [drafts and pull requests from forks](</docs/en/code-review-pull-requests#review-drafts-and-pull-requests-from-forks>), which automatic reviews skip.
+ * **Subscribe one pull request to a review on each push** : comment `@claude review always` on a pull request that isn’t [a draft or from a fork](</docs/en/code-review-pull-requests#review-drafts-and-pull-requests-from-forks>), such as in a repository set to Manual
+ * **Change what reviews flag** : commit [`REVIEW.md` and `CLAUDE.md` files](</docs/en/code-review-customize>) to the repository, for example to add a check
+
+Reviews that developers request are [billed to your organization](</docs/en/code-review-costs#pricing>). To limit what Code Review spends in a month, see [Limit your spend](</docs/en/code-review-costs#limit-your-spend>).
+
+##
+
+
+
+Manage repositories
+
+You can add repositories one at a time or cover a whole GitHub organization at once, and stop reviews wherever you don’t want them.
+
+###
+
+
+
+Add more repositories
+
+To add repositories after setup, click **Add** above the **Repositories** table in the **Code review** section. The **Add a repository** dialog opens. Select repositories and click **Continue**.
+
+ * **A repository isn’t listed** : see [A repository isn’t listed in Add a repository](</docs/en/code-review-troubleshooting#a-repository-isn%E2%80%99t-listed-in-add-a-repository>).
+ * **You want every repository in a GitHub organization** : cover the organization instead of selecting repositories one at a time
+
+###
+
+
+
+Cover a whole GitHub organization
+
+To turn on Code Review for every repository in a GitHub organization, set **Review runs** on the organization’s row in the **Repositories** table. That covers every repository there that the Claude GitHub App can access, including repositories added later. This can raise spend significantly. It requires all of these:
+
+ * The GitHub account you connected to Claude is an owner of that GitHub organization.
+ * The organization is on github.com. GitHub Enterprise Server instances and personal GitHub accounts aren’t eligible.
+ * A [monthly spend limit](</docs/en/code-review-costs#limit-your-spend>) is set, for your Claude organization or for Code Review.
+
+To cover the organization, click **Edit** on its row, select a **Review runs** option, and confirm. The options are the three from Set when reviews run plus **Off**. After you confirm, these changes take effect:
+
+ * **Coverage** : each repository is covered from its next pull request. If the Claude GitHub App was installed on selected repositories rather than all of them, Claude reviews those repositories; change the app’s repository access on GitHub to cover the rest.
+ * **Existing settings** : every repository in that GitHub organization takes the option you select, including repositories you had set individually. Setting the row again does the same. Repositories you turned off on their own rows stay off.
+ * **Individual changes afterward** : a repository you later set differently from its organization is marked **Custom** in the table.
+ * **Review level** : an organization row has no review level of its own.
+
+###
+
+
+
+Turn off Code Review or remove a repository
+
+In the **Code review** section of [**Admin settings > Claude Code**](<https://claude.ai/admin-settings/claude-code#code-review>), pick the control that matches what you want to stop:
+
+ * **One repository, keeping it in the list** : click **Edit** on its row and turn off **Code review**. The table shows the repository as Off.
+ * **One repository, removing it** : click **Edit** on its row, then **Remove repository** at the bottom of the dialog. Reviews stop there, and another Claude organization can then set that repository up. While the repository’s GitHub organization is covered as a whole, you can’t remove it; turn off its **Code review** switch instead.
+ * **A whole GitHub organization** : click **Edit** on the organization’s row and select **Off**. This also turns off repositories in that organization that you added one at a time.
+ * **Everything** : turn off **Allow code review**. No new reviews start in any repository, and your repository list stays so you can turn it back on later.
+
+##
+
+
+
+Related resources
+
+ * [Code Review costs and usage](</docs/en/code-review-costs>): how the review level and when reviews run affect spend, how to set a spend limit, and where to see usage
+ * [Read and request reviews on a pull request](</docs/en/code-review-pull-requests>): what developers see on a pull request and the comment commands
+ * [Customize Code Review](</docs/en/code-review-customize>): tune what Claude flags with `REVIEW.md` and `CLAUDE.md`
+ * [GitHub Enterprise Server](</docs/en/github-enterprise-server>): connect a self-hosted GitHub instance before setup
Show diff (126 lines)
--- a/code-review-troubleshooting.md
+++ b/code-review-troubleshooting.md
@@ -0,0 +1,123 @@
+When [Code Review](</docs/en/code-review>) doesn’t do what you expect on a pull request, start with the **Claude Code Review** check run. Its title says how far the review got.
+
+##
+
+
+
+Check how far the review got
+
+Find the **Claude Code Review** check run on your pull request, then match its title to one of these common ones:
+
+Check run title| What it means| What to do
+---|---|---
+**Code review queued…** or **Code review in progress…**| The review hasn’t finished| Wait for the title to change
+**Code review found no issues**| The review finished and found nothing to flag| Nothing
+A title that says issues were found| The review finished with findings| If you don’t see them on the diff, see Find issues that aren’t showing as inline comments
+**Code review skipped — no new changes**| An automatic review didn’t run on your latest push| To get a review anyway, comment `@claude review`
+**Code review failed** or **Code review timed out**| The review didn’t finish| To run it again, see Retrigger a failed or timed-out review
+**Code review declined**| The review didn’t run| Read the check run’s summary. If it names a budget or a spend limit, see Review didn’t run and the PR shows a budget message
+No check run| No review started| Comment `@claude review`. If no check run appears after that, see A comment command didn’t start a review
+
+##
+
+
+
+A review didn’t start
+
+Check these cases when no **Claude Code Review** check run appears, or when Claude posts a comment saying the review was skipped.
+
+###
+
+
+
+A comment command didn’t start a review
+
+After you comment `@claude review`, look for a **Claude Code Review** check run titled **Code review queued…** or **Code review in progress…** on the pull request. An 👀 reaction on your comment doesn’t confirm a review is coming. If no check run appears, check for each of these causes:
+
+ * **Code Review isn’t on for this repository** : Claude posts no comment and no check run in response to the command. Ask an Owner to [add the repository](</docs/en/code-review-setup#add-more-repositories>).
+ * **The comment doesn’t meet a condition** : it was an inline comment or a review body rather than a new top-level comment, or the command wasn’t at the start of the comment. Editing an earlier comment instead of posting a new one doesn’t count either, and the pull request has to be open. See the [conditions for comment commands](</docs/en/code-review-pull-requests#comment-commands>) and post a new comment that meets them.
+ * **You don’t have write access** : you need write, maintain, or admin permission on the repository, and on a pull request from a fork the permission that counts is on the base repository. If your organization has tips turned on, Claude replies “No review was started: manual reviews can only be requested by someone with write access to this repository.” Ask someone with write access to comment instead.
+ * **The budget ran out** : Claude posts a comment that begins with “⚠️ Code review skipped”. See Review didn’t run and the PR shows a budget message.
+
+###
+
+
+
+Review didn’t run and the PR shows a budget message
+
+When your organization’s budget can’t cover a review, Code Review skips the review and Claude posts a comment on the pull request that begins with “⚠️ Code review skipped”. In some of these cases a check run titled **Code review declined** also appears. The comment links [claude.ai/admin-settings/usage](<https://claude.ai/admin-settings/usage>), where an admin restores the budget. Its wording tells you which limit was reached:
+
+ * **“has reached its monthly code review spending cap”** : the [monthly spend limit for Code Review](</docs/en/code-review-costs#limit-your-spend>) was reached. Reviews resume at the start of the next billing period. To get them sooner, ask an admin to raise the limit.
+ * **“has no extra usage available to pay for this review”** : your organization’s [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) balance is empty, or its overall monthly spend limit was reached. Ask an admin to add usage credits or raise that limit.
+ * **“is too low to start another review”** : what’s left of the budget or balance is less than the expected cost of one review. Ask an admin to raise the limit or add usage credits.
+
+After the budget is restored, comment `@claude review` on the pull request to get the review that was skipped. The [conditions for comment commands](</docs/en/code-review-pull-requests#comment-commands>) apply, so the commenter needs write access.
+
+##
+
+
+
+Retrigger a failed or timed-out review
+
+If the check run’s summary says “The review session was interrupted before it could finish. A new review of this commit has been queued automatically.”, you don’t need to do anything. That review is retried once automatically. Otherwise, when the check run’s title is **Code review failed** or **Code review timed out** , run the review again with a comment or a re-run:
+
+ * **Comment`@claude review`**: post it as a top-level comment on the pull request. This starts a fresh review without subscribing the pull request to future pushes.
+ * **Click Re-run** : if the pull request isn’t [from a fork](</docs/en/code-review-pull-requests#review-drafts-and-pull-requests-from-forks>), click **Re-run** on the **Claude Code Review** check in GitHub’s **Checks** tab. The re-run covers the pull request’s current head commit and doesn’t subscribe the pull request either.
+
+##
+
+
+
+Find issues that aren’t showing as inline comments
+
+If the check run title says issues were found but you don’t see inline review comments on the diff, look in these other locations where findings are surfaced:
+
+ * **Check run Details** : click **Details** next to the **Claude Code Review** check in the **Checks** tab. The severity table lists findings with their file, line, and summary regardless of whether the inline comment was accepted.
+ * **Files changed annotations** : open the **Files changed** tab on the PR. A finding that has a line but wasn’t posted as an inline comment appears there as an annotation on the lines concerned.
+ * **Review body** : findings that have no inline location, or that fall outside the current diff, appear under an **Additional findings** heading in the review body.
+
+##
+
+
+
+The check run mentions REVIEW.md
+
+Two of the messages a check run can carry about `REVIEW.md` concern branch protection:
+
+ * **“This review applied the repository’s review instructions (REVIEW.md) from its default branch, which is not protected against direct pushes.”** : the review read the root file only. See [Which branch REVIEW.md is read from](</docs/en/code-review-customize#which-branch-review-md-is-read-from>) for what protecting the branch changes.
+ * **“were not applied to this review: branch protection could not be confirmed”** : the review read no `REVIEW.md`.
+
+##
+
+
+
+Setup problems
+
+These cases come up for an Owner while [setting up Code Review](</docs/en/code-review-setup>).
+
+###
+
+
+
+A repository isn’t listed in Add a repository
+
+Search for the repository by name first, because the dialog doesn’t load a long list in full. The dialog lists a repository only if the Claude GitHub App can access it. Click **Install GitHub App** and give the app access to the repository. When no repositories are listed, **Install GitHub App** is a button in the dialog. Otherwise, it’s at the bottom of the dialog’s GitHub organization filter menu.
+
+###
+
+
+
+No check run appears on the test pull request
+
+Confirm that **Allow code review** is on, that the repository is listed under **Repositories** in the **Code review** section, and that the Claude GitHub App has access to it. Automatic reviews skip draft pull requests, and a repository set to **Manual (@claude review)** needs an `@claude review` comment to start the first review.
+
+##
+
+
+
+Related resources
+
+ * [Read and request reviews on a pull request](</docs/en/code-review-pull-requests>): what the findings and the check run mean, and the comment commands
+ * [Set up Code Review](</docs/en/code-review-setup>): for Owners, turn on Code Review and manage repositories
+ * [Code Review costs and usage](</docs/en/code-review-costs>): the spend limits behind a budget message
+ * [Customize Code Review](</docs/en/code-review-customize>): which copy of `REVIEW.md` a review reads
--- a/commands.md
+++ b/commands.md
@@ -46,7 +46,7 @@
`/claude-api [migrate|upgrade|managed-agents-onboard|prompt-audit|cost-optimize|build-eval|hillclimb|preserved-thinking-migration]`| **[Skill](</docs/en/skills#bundled-skills>).** Load [Claude API](<https://platform.claude.com/docs/en/api/overview>) and [Managed Agents](<https://platform.claude.com/docs/en/managed-agents/overview>) reference material for your project’s language. Also activates automatically when your code imports `anthropic` or `@anthropic-ai/sdk`. For what each subcommand does and the version it requires, see [Work on Claude API projects](</docs/en/skills#work-on-claude-api-projects>)
`/claude-in-chrome [task]`| **[Skill](</docs/en/skills#bundled-skills>).** Have Claude carry out a task in your browser, such as testing a page, filling a form, or reading console logs, through [Claude in Chrome](</docs/en/chrome>). Available when Chrome integration is enabled for the session, for example with `claude --chrome`, or when Claude Code can offer to [install the extension](</docs/en/chrome#install-the-extension-when-claude-asks>)
`/clear [name]`| Start a new conversation with empty context. Pass a name to label the previous conversation in the `/resume` picker. To free up context while continuing the same conversation, use `/compact` instead. Resume the previous conversation with `/resume`, or, in the same Claude Code process, restore it from [the rewind menu’s previous-session entry](</docs/en/checkpointing#rewind-past-a-cleared-conversation>). Aliases: `/reset`, `/new`
-`/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]`| **[Skill](</docs/en/skills#bundled-skills>).** Review the current diff, or a PR number, branch, or path you pass, for correctness bugs. Depending on your model and effort level, the review also covers cleanup opportunities. Pass `--fix` to apply findings, `--comment` to post them on the GitHub PR or GitLab merge request, or `ultra` to run a deep [cloud review](</docs/en/ultrareview>). Posting to a GitLab merge request requires Claude Code v2.1.257 or later. With `ultra` on a `github.com` PR target, pass `--post` to preselect [posting the finished findings to the PR](</docs/en/ultrareview#post-findings-to-the-pull-request>) in the launch dialog; `--post` requires Claude Code v2.1.227 or later. See [Review a diff locally](</docs/en/code-review#review-a-diff-locally>) for the effort levels, targeting, and how it relates to `/simplify`. Alias: `/review`
+`/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]`| **[Skill](</docs/en/skills#bundled-skills>).** Review the current diff, or a PR number, branch, or path you pass, for correctness bugs. Depending on your model and effort level, the review also covers cleanup opportunities. Pass `--fix` to have Claude apply the findings, `--comment` to post them on the GitHub PR or GitLab merge request, or `ultra` to run a deep [cloud review](</docs/en/ultrareview>). Posting to a GitLab merge request requires Claude Code v2.1.257 or later. With `ultra` on a `github.com` PR target, pass `--post` to preselect [posting the finished findings to the PR](</docs/en/ultrareview#post-findings-to-the-pull-request>) in the launch dialog; `--post` requires Claude Code v2.1.227 or later. See [Review locally with `/code-review`](</docs/en/code-review-local>) for the effort levels, targeting, and how it relates to `/simplify`. Alias: `/review`
`/color [color|default]`| Set the prompt bar color for the current session. Available colors: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, `cyan`. Use `default` to reset, or run with no argument to pick a random color. When [Remote Control](</docs/en/remote-control>) is connected, the color syncs to claude.ai/code. Also available in non-interactive mode (`-p`)
`/compact [instructions]`| Free up context by summarizing the conversation so far. Optionally pass focus instructions for the summary. See [how compaction handles rules, skills, and memory files](</docs/en/context-window#what-survives-compaction>)
`/config [key=value ...]`| Open the [Settings](</docs/en/settings>) interface to adjust theme, model, [output style](</docs/en/output-styles>), and other preferences. Pass one or more `key=value` pairs to set a setting directly without opening the interface, for example `/config thinking=false`, `/config theme=dark`, or `/config model=sonnet`. The `key=value` form also works in non-interactive mode (`-p`) and from the Claude mobile app via [Remote Control](</docs/en/remote-control>). The `key=value` form can’t turn on a setting that needs your confirmation in the panel, such as [`autoContinueAtUsageLimit`](</docs/en/interactive-mode#turn-automatic-continue-off>), though it can turn one off. Run `/config --help` to list the keys it accepts. Alias: `/settings`
@@ -108,7 +108,7 @@
`/remote-env`| Choose the default [cloud environment](</docs/en/cloud-environments#select-an-environment-from-the-cli>) for cloud sessions you start from the CLI
`/rename [name]`| Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history. Also available in non-interactive mode (`-p`). From every rename surface, including claude.ai and the desktop app, Claude Code replaces control and invisible characters in the new name with spaces and caps the name at 200 characters. If the name is empty once invisible characters are removed, Claude Code rejects it and shows `That name is empty once invisible characters are removed. Usage: /rename <name>`. The character replacement and length cap require Claude Code v2.1.221 or later
`/resume [session]`| Resume a conversation by ID or name, or open the session picker. [Background sessions](</docs/en/agent-view>) appear in the picker marked with `bg`. Resuming one that is still running, from the picker or by ID or name, [opens that session](</docs/en/sessions#resume-a-running-background-session>): your current conversation moves to the background and this terminal attaches to the running one. Press `←` on an empty prompt to return to agent view, which also lists the conversation you left. Before v2.1.285, Claude Code refused and told you to open the session with `claude attach` or stop it first. Alias: `/continue`
-`/review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]`| Alias of [`/code-review`](</docs/en/code-review#review-a-diff-locally>): reviews the current diff, or a PR number, branch, or path you pass, such as `/review 1234`, and takes the same effort levels and flags. With no level given, the review reuses the last `low` through `max` level you typed; see [Review a diff locally](</docs/en/code-review#review-a-diff-locally>) for the exact rules. For a deep cloud review, use [`/code-review ultra`](</docs/en/ultrareview>). Before v2.1.223, `/review` was a separate command that ran a single-pass, read-only review of a GitHub pull request by number, listing open PRs to pick from when run with no argument; from v2.1.186 through v2.1.201, it ran the same multi-agent engine as `/code-review medium`
+`/review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]`| Alias of [`/code-review`](</docs/en/code-review-local>): reviews the current diff, or a PR number, branch, or path you pass, such as `/review 1234`, and takes the same effort levels and flags. With no level given, the review reuses the last `low` through `max` level you typed; see [Review locally with `/code-review`](</docs/en/code-review-local>) for the exact rules. For a deep cloud review, use [`/code-review ultra`](</docs/en/ultrareview>). Before v2.1.223, `/review` was a separate command that ran a single-pass, read-only review of a GitHub pull request by number, listing open PRs to pick from when run with no argument; from v2.1.186 through v2.1.201, it ran the same multi-agent engine as `/code-review medium`
`/rewind`| Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](</docs/en/checkpointing>). Aliases: `/checkpoint`, `/undo`
`/run`| **[Skill](</docs/en/skills#bundled-skills>).** Launch and drive your project’s app to see a change working, not only passing tests. See [Run and verify your app](</docs/en/skills#run-and-verify-your-app>)
`/run-skill-generator`| **[Skill](</docs/en/skills#bundled-skills>).** Teach `/run` and `/verify` how to build, launch, and drive your project’s app from a clean environment by writing a per-project [skill](</docs/en/skills#run-and-verify-your-app>)
--- a/desktop.md
+++ b/desktop.md
@@ -189,7 +189,7 @@
* Click **Walk through in diff** to open the diff view and step through the findings one at a time. A finding in the current diff appears at its line, where you can click **Fix this one** or dismiss it.
* Click **Apply fixes** to ask Claude to fix the findings that are still open.
-In any session, you can also ask Claude in the prompt box to fix what the review found. For what `/code-review` looks for and the arguments it takes, see [Review a diff locally](</docs/en/code-review#review-a-diff-locally>).
+In any session, you can also ask Claude in the prompt box to fix what the review found. For what `/code-review` looks for and the arguments it takes, see [Review locally with `/code-review`](</docs/en/code-review-local>).
###
--- a/env-vars.md
+++ b/env-vars.md
@@ -297,7 +297,7 @@
`CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS`| Context size, in tokens, at which [idle compaction](</docs/en/settings-reference#idlecompaction>) applies to a conversation (default: `200000`). Accepts a positive whole number, and anything else is ignored. Values below `100000` are raised to `100000`, the lowest threshold. Idle compaction is on by default for conversations that meet its conditions. To turn it off, set `idleCompaction` to `false`. Requires Claude Code v2.1.290 or later
`CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`| How many [subagents](</docs/en/sub-agents#concurrent-subagent-limit>) can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but can’t disable it. Requires Claude Code v2.1.217 or later
`CLAUDE_CODE_MAX_CONTEXT_TOKENS`| Override the context window size Claude Code assumes for the active model. As of v2.1.193, how it applies depends on how Claude Code resolves the model ID; see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>). Use this when routing to a model through `ANTHROPIC_BASE_URL` whose context window does not match the built-in size for its name
-`CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH`| Maximum length in characters of each MCP tool description and each MCP server’s instructions that Claude Code sends to the model. The value you set replaces both [default limits](</docs/en/mcp#for-mcp-server-authors>): 4096, and 16384 for the description of a tool that Claude loads through tool search. Claude Code truncates longer text. Accepts a positive whole number in plain digits. Anything else is ignored and the defaults apply. Requires Claude Code v2.1.280 or later
+`CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH`| Maximum length in characters of MCP tool descriptions and MCP server instructions that Claude Code sends to the model. The value you set replaces both [default limits](</docs/en/mcp#for-mcp-server-authors>): 4096, and 16384 for the description of a tool that Claude loads through tool search. Accepts a positive whole number in plain digits. Anything else is ignored and the defaults apply. Requires Claude Code v2.1.280 or later
`CLAUDE_CODE_MAX_OUTPUT_TOKENS`| Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see [max output tokens](<https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison>). Claude Code lowers a value above a model’s cap to the cap. For a model ID Claude Code can’t resolve to a model it knows, the default is 32000 and the cap is 128000. Increasing this value reduces the effective context window available before [auto-compaction](</docs/en/costs#reduce-token-usage>) triggers
`CLAUDE_CODE_MAX_RETRIES`| Override the number of times to retry failed API requests (default: 10). Capped at 15 as of v2.1.186; as of v2.1.199, `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. For unattended sessions that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG` instead
`CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION`| Removed in v2.1.224 and now a no-op. Previously capped the total number of [subagents](</docs/en/sub-agents>) Claude could spawn with the Agent tool in one session (default: 200); spawning past the cap failed with `Subagent spawn limit reached`. The [concurrent subagent limit](</docs/en/sub-agents#concurrent-subagent-limit>) and the [depth limit](</docs/en/sub-agents#let-subagents-spawn-their-own-subagents>) still apply
@@ -555,6 +555,7 @@
* Run [`/skill-doctor`](</docs/en/skills#find-unused-skills>) or open its report in the `/plugin` **Stats** tab
* Sync the [skills](</docs/en/skills#where-synced-skills-load>) and [plugins](</docs/en/plugins/loading#synced-plugins>) enabled for your claude.ai account into your terminal sessions
* Turn on the [You should know mod](</docs/en/interactive-mode#you-should-know-suggestions>)
+ * See what a [mod](</docs/en/plugins/mods/overview#where-mods-run>) draws in the VS Code extension’s chat panel; the mod’s hooks still run
* Use [the advisor tool](</docs/en/advisor#requirements>)
* Read or reply to [comments on an artifact](</docs/en/artifacts#collect-comments-on-an-artifact>)
* Have Claude read [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>)
Show diff (360 lines)
--- a/errors.md
+++ b/errors.md
@@ -62,6 +62,7 @@
`Claude.ai login was rejected — run /login, then /remote-control`| Authentication
`OAuth token unavailable — run /login to restore Remote Control`| Authentication
`Signed out of Claude — run /login, then /remote-control`| Authentication
+`Remote Control could not renew this computer's connection`| Authentication
`signed-in claude.ai account or organization changed on this machine`| Authentication
`Remote Control stopped — the app running this session is now signed in to a different Claude account`| Authentication
`Remote Control stopped — the app running this session is signed out of Claude`| Authentication
@@ -143,6 +144,7 @@
`Request too large`| Request errors
`Request too large for the API's 32MB request limit`| Request errors
`Image was too large`| Request errors
+`API Error: an image in the conversation could not be processed and was removed`| Request errors
`Unable to resize image`| Request errors
`Request rejected as unprocessable by the model`| Request errors
`PDF too large` / `PDF is password protected` / `pdftoppm is not installed`| Request errors
@@ -169,6 +171,7 @@
`Effort '<level>' isn't available with thinking turned off on this model`| Request errors
`effort '<level>' is not supported when thinking is disabled`| Request errors
`max_tokens must be greater than thinking.budget_tokens`| Request errors
+`Claude's response exceeded the ... output token maximum`| Request errors
`API Error: 400 due to tool use concurrency issues`| Request errors
`API Error: 400 orphaned tool_result in conversation history`| Request errors
`API Error: 400 duplicate tool_use ID in conversation history`| Request errors
@@ -189,6 +192,7 @@
`The connection dropped while downloading the update`| [Troubleshoot installation and login](</docs/en/troubleshoot-install#the-connection-dropped-while-downloading-the-update>)
`Download timed out: exceeded the total deadline`| [Troubleshoot installation and login](</docs/en/troubleshoot-install#the-connection-dropped-while-downloading-the-update>)
`--bg and --print conflict`| Command-line errors
+`Couldn't tell whether --bg is a flag or text here, so nothing was started`| Command-line errors
`Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.`| Command-line errors
`Cloud sessions cannot be created from a --restricted session`| Command-line errors
`Cloud sessions are disabled by your organization's policy`| Command-line errors
@@ -207,6 +211,7 @@
`couldn't be resolved to a real location, so its skills, commands, and agents weren't loaded`| Command-line errors
`Error: Workspace not trusted` when starting Remote Control| Command-line errors
``<flag>` before `remote-control` is not carried over to the sessions Remote Control starts`| Command-line errors
+`--sandbox is not supported by claude remote-control` / `--no-sandbox is not supported by claude remote-control`| Command-line errors
``claude import` is not yet available in this build`| Command-line errors
`Could not read Claude Code config`| Command-line errors
`Could not import <server>: <reason>`| Command-line errors
@@ -223,6 +228,7 @@
`Shell command failed for pattern "..."`, from `/security-review` or any skill that injects dynamic context| Command-line errors
`Shell command permission check failed for pattern "..."`, from a skill that injects dynamic context| Command-line errors
`Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found`| Command-line errors
+`No shell command in <name> was run, because the <tool> tool does not accept one of them`| Command-line errors
`Input must be provided either through stdin or as a prompt argument when using --print`| Command-line errors
`Claude Code can't read the keyboard here: stdin is not a terminal`| Command-line errors
`Error: Input contained only whitespace`| Command-line errors
@@ -357,6 +363,7 @@
`Claude Code exited after an unrecoverable interface error (...)`| Configuration warnings
`Agent descriptions are over the 15.0k-token limit`| Configuration warnings
`hook needs quotes around a path with a space`| Configuration warnings
+`Instruction file not loaded`| Configuration warnings
`Not loaded: rename <path>, then restart — its name uses "<name>", a name reserved for the skills synced from your claude.ai account`| Configuration warnings
`N skill or command names refused: run with --debug to see which ([names]), rename, then restart`| Configuration warnings
`Ignoring N permissions.allow entries from ... this workspace has not been trusted`| Configuration warnings
@@ -367,9 +374,11 @@
`Your organization's managed settings allow Claude Code to use: <providers>`| Configuration warnings
`Your organization's managed settings allow Claude Code to use no API provider at all`| Configuration warnings
`MCP server <name> is blocked by enterprise managed policy`| Configuration warnings
+`"<name>" is a reserved MCP server name and was not loaded`| Configuration warnings
`Managed settings document could not be parsed as a JSON object; none of its settings are in effect. Fix or remove it.`| Configuration warnings
`Managed settings drop-in directory could not be read`| Configuration warnings
`Unable to read managed policy settings`| Configuration warnings
+`Managed settings contain invalid entries, including PreToolUse/PermissionRequest hooks that are NOT loaded; fix or remove each entry:`| Configuration warnings
`otelHeadersHelper failed; telemetry is not being exported. See /status: ...`| Configuration warnings
`"crossSessionInbound" must be one of "accept", "hold", "refuse"`| Configuration warnings
`API Error: ANTHROPIC_FOUNDRY_RESOURCE must be a Foundry resource name`| Configuration warnings
@@ -379,7 +388,10 @@
`... has a wildcard before the rest of the command`| Configuration warnings
`Denying Bash also turns off the PowerShell tool, so Claude has neither`| Configuration warnings
`CLAUDE_CODE_DISABLE_1M_CONTEXT is set, but the 200K limit isn't enforced`| Configuration warnings
+`Model "<model>" isn't recognized · context assumed to be 200k tokens`| [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>)
+`Claude Code doesn't recognize the model "<model>", so it assumes a context window of 200k tokens`| [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>)
`[claude-code:unrecognized_model]`| Configuration warnings
+`is ignored — managed settings set allowManagedReadPathsOnly` / `is ignored — managed settings set allowManagedDomainsOnly`| Configuration warnings
`Stale sandbox mask files left by a killed session`| Configuration warnings
Responses seem lower quality than usual| Response quality
@@ -1087,6 +1099,21 @@
+Remote Control could not renew this computer’s connection
+
+This warning appears in the terminal running [`claude remote-control`](</docs/en/remote-control#start-a-remote-control-session>) when the server can’t use your claude.ai login to renew its connection’s credential before it expires. The warning’s last sentence says how long the current credential still works, or that it has already expired:
+
+ Remote Control could not renew this computer's connection: claude.ai did not accept the sign-in it uses. Run `claude /login` to sign in again. The connection keeps working for about 26 hours; if it still cannot sign in then, it stops.
+
+**What to do:**
+
+ * If the warning tells you to run `claude /login`, open another terminal on the machine running the server, run `claude /login` there, and sign in with your claude.ai account
+ * If the server still can’t sign in once the connection’s credential has expired, it prints an error containing `Poll: Authentication failed (401)` and stops. Sign in again as the warning’s second sentence says, then run `claude remote-control` again in the terminal where the server stopped.
+
+###
+
+
+
Remote Control stopped because the signed-in account changed
Claude Code shows this line during a [Remote Control](</docs/en/remote-control>) session when you sign in to a different claude.ai account or organization on this machine. You made the switch outside the Claude Code session, for example by running `/login` in another terminal. A Remote Control session that you started while signed in through `/login` belongs to the claude.ai account and organization that were signed in at the time.
@@ -1970,6 +1997,7 @@
* Disable MCP servers you are not using with `/mcp disable <name>` to remove their tool definitions from context
* Trim large `CLAUDE.md` memory files, or move instructions into [path-scoped rules](</docs/en/memory#path-specific-rules>) that load only when relevant
* Auto-compact is on by default and normally prevents this error. If you turned it off in `/config` or with [`DISABLE_AUTO_COMPACT`](</docs/en/env-vars>), turn it back on. If you keep it off, run `/compact` yourself before the window fills.
+ * If the error appears near 200K tokens on a model that accepts more, one cause is a model ID that Claude Code doesn’t recognize. Claude Code assumes a 200K window for such an ID, so to keep working past that point, [give it the model’s real context window](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>).
See [Explore the context window](</docs/en/context-window>) for an interactive view of how context fills up.
@@ -2026,8 +2054,15 @@
Image was too large. Double press esc to go back and try again with a smaller image.
API Error: 400 ... image dimensions exceed max allowed size
-
-Claude Code replaces the unprocessable image with a text placeholder and retries, so subsequent messages succeed. On versions before 2.1.142, a pasted image could remain in the conversation and repeat the same error on every subsequent message. To recover on those versions, press Esc twice and step back past the turn where the image was added. **What to do:**
+ API Error: an image in the conversation could not be processed and was removed.
+
+The `could not be processed and was removed` line means the API refused an image in the conversation, such as one over the size or dimension limits. If one of these errors keeps coming back, update Claude Code. On older versions, an image error could repeat for reasons such as these:
+
+ * Before v2.1.299, in a long conversation with many images, Claude Code could remove the images you attached last instead of the one over the limit. The `was removed` line then repeated on every turn, and Claude didn’t see your new images.
+ * Before v2.1.299, in VS Code, the Desktop app, and the Agent SDK, images you attached while Claude was working didn’t get the resizing that other attached images get. They reached the API at their original size, which led to repeated image errors in long conversations.
+ * Before v2.1.166, a pasted image could remain in the conversation, and the same error then repeated on every subsequent message
+
+**What to do:**
* Resize the image before pasting. The API accepts images up to 8000 pixels on the longest edge for a single image, or 3000 pixels when more than 20 images are in context.
* Take a tighter screenshot of the relevant region instead of the full screen
@@ -2437,6 +2472,23 @@
+Response exceeded the output token maximum
+
+Claude’s reply reached the largest number of output tokens the request allowed and was cut off there:
+
+ API Error: Claude's response exceeded the ... output token maximum. To configure this behavior, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
+ API Error: Claude's response exceeded the 64000 output token maximum for a request sent without streaming. The CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable cannot raise this limit.
+
+The form that names `a request sent without streaming` means a streaming request failed and Claude Code re-sent it without streaming, which limits the reply to 64,000 output tokens. Before v2.1.299, a reply cut off on such a re-sent request ended the turn without this message, as if the reply were complete. **What to do:**
+
+ * If Claude wrote some text before the reply was cut off, reply `continue` in an interactive session to ask for the rest. That text stays in the conversation.
+ * If the message says to set `CLAUDE_CODE_MAX_OUTPUT_TOKENS`, see [`CLAUDE_CODE_MAX_OUTPUT_TOKENS`](</docs/en/env-vars>) for how the value is capped and [Set environment variables](</docs/en/env-vars#set-environment-variables>) for where to set it
+ * To keep each reply under the limit, ask Claude for the output in smaller pieces, such as one file or one section per reply
+
+###
+
+
+
Tool use or thinking block mismatch
The conversation history reached the API in an inconsistent state.
@@ -2544,13 +2596,19 @@
The model’s safety measures flagged content in the conversation as a cybersecurity topic. The message names the model that flagged the request:
- API Error: Opus 4.8's safeguards flagged this message. Our intentionally broad safeguards allow us to deliver more capabilities faster, but can sometimes flag legitimate cybersecurity work. Apply to the Cyber Verification Program to reduce these interruptions. Send feedback with /feedback or learn more: https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude
-
-If the message includes the line `Details: `[reasoning_extraction]``, see Safeguards flagged a request for Claude’s reasoning. This message links to the [Cyber Verification Program](<https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude>), which grants access for legitimate cybersecurity work. Models with [automatic model fallback](</docs/en/model-config#automatic-model-fallback>) print a different message, without this link; on Opus 5.5 and Sonnet 5.5 it opens with `<model>'s safeguards flagged this session`. That section also covers when Claude Code switches models instead. On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), and [Microsoft Foundry](</docs/en/microsoft-foundry>), a cybersecurity flag produces the Usage Policy refusal message instead. The safeguard itself is server-side and predates v2.1.203; client releases since then have changed only the message’s wording. From v2.1.203 through v2.1.218, the message read `<model> has safety measures that flagged this message for a cybersecurity topic. To learn about the Cyber Verification Program and apply for access, visit our help center:` followed by the same help-center link, and interactive sessions appended `If you were not engaging in a cybersecurity topic, please send feedback via /feedback.` Before v2.1.203, it read `<model>'s safeguards flagged this message for a cybersecurity topic. If your work requires this access, you can apply for an exemption:` followed by an exemption form link. **What to do:**
+ API Error: Opus 4.8's safeguards flagged this message. Our intentionally broad safeguards allow us to deliver more capabilities faster, but can sometimes flag legitimate cybersecurity work. Send feedback with /feedback or learn more: https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude
+
+If the message includes the line `Details: `[reasoning_extraction]``, see Safeguards flagged a request for Claude’s reasoning. This message links to the [Cyber Verification Program](<https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude>), which grants access for legitimate cybersecurity work. Models with [automatic model fallback](</docs/en/model-config#automatic-model-fallback>) print a different message, without this link; on Opus 5.5 and Sonnet 5.5 it opens with `<model>'s safeguards flagged this session`. That section also covers when Claude Code switches models instead. On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), and [Microsoft Foundry](</docs/en/microsoft-foundry>), a cybersecurity flag produces the Usage Policy refusal message instead. **What to do:**
* If your work requires this content, apply for access through the [Cyber Verification Program](<https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude>)
* If your request wasn’t about a cybersecurity topic, run `/feedback` to report the false positive
* To keep working in the same session, press Esc twice or run `/rewind` to step back to a checkpoint before the turn that triggered the flag, then take a different approach. See [Checkpointing](</docs/en/checkpointing>).
+
+If the message you see is worded like one of these instead, it’s the same flag on an earlier Claude Code version:
+
+ * From v2.1.219 through v2.1.296, the message could also include `Apply to the Cyber Verification Program to reduce these interruptions.` before its closing sentence
+ * From v2.1.203 through v2.1.218, the message read `<model> has safety measures that flagged this message for a cybersecurity topic. To learn about the Cyber Verification Program and apply for access, visit our help center:` followed by the same help-center link. In interactive sessions, it continued with `If you were not engaging in a cybersecurity topic, please send feedback via /feedback.`
+ * Before v2.1.203, it read `<model>'s safeguards flagged this message for a cybersecurity topic. If your work requires this access, you can apply for an exemption:` followed by an exemption form link
###
@@ -2613,6 +2671,20 @@
+Couldn’t tell whether `--bg` is a flag or text
+
+You ran `claude` with `--bg` or `--background` at a position where Claude Code couldn’t tell whether you meant it as the background flag or as text. The command started nothing, printed this line, and exited with code 1:
+
+ Couldn't tell whether --bg is a flag or text here, so nothing was started. To start a background session put it first: claude --bg <prompt>
+
+If you typed `--background`, the line names `--background` instead. **What to do:**
+
+ * To start a [background session](</docs/en/agent-view#from-your-shell>), run the command again in your shell with the flag first: `claude --bg --name nightly-audit "<task>"`
+
+###
+
+
+
Conflict between a system prompt flag and its file form
You passed [`--append-subagent-system-prompt`](</docs/en/cli-reference#cli-flags>) together with `--append-subagent-system-prompt-file` in one `claude` invocation, so `claude` exits with code 1 instead of starting the session:
@@ -2857,6 +2929,24 @@
+`--sandbox` or `--no-sandbox` is not supported by claude remote-control
+
+This error means the command that starts your [Remote Control](</docs/en/remote-control>) server passes `--sandbox` or `--no-sandbox` after `remote-control`, and `claude remote-control` accepts neither flag. The server exits with code 1 instead of starting:
+
+ Error: --sandbox is not supported by claude remote-control. The flag had no effect and was removed. To sandbox sessions, set sandbox.enabled to true in settings.
+ Error: --no-sandbox is not supported by claude remote-control. The flag had no effect and was removed. Remove it from the command.
+
+**What to do:**
+
+ * Remove the flag from the command, including in a script or service definition that starts the server for you, then run it again
+ * To sandbox the sessions the server starts, turn on [sandboxing](</docs/en/sandboxing>) by setting [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true` in a [settings file](</docs/en/settings#where-settings-live>)
+
+Both flags were removed from `claude remote-control` in v2.1.300, so a command written for an earlier version can still carry one.
+
+###
+
+
+
claude import is not yet available in this build
You ran [`claude import`](</docs/en/cli-reference#cli-commands>), and Claude Code found the import flow turned off, so the command exits with code 1 instead of starting the import. Before v2.1.222, a build with the import flow off treated `import` as a prompt and started an interactive session instead of printing this message.
@@ -3075,16 +3165,32 @@
* A remote whose server-side HEAD points at a branch nobody pushed
* A repository with no `origin` remote, or one you never fetched
-Claude Code shows the same error for any skill that [injects dynamic context](</docs/en/skills#when-an-injected-command-fails>), and a failed injected command aborts that skill’s invocation. Two sibling strings fire before the command runs at all:
+Claude Code shows the same error for any skill that [injects dynamic context](</docs/en/skills#when-an-injected-command-fails>), and a failed injected command aborts that skill’s invocation. Sibling strings fire before the command runs at all:
* `Shell command permission check failed for pattern "..."`: the command’s permission check didn’t allow it. [Permission checks on injected commands](</docs/en/skills#permission-checks-on-injected-commands>) covers which results abort in each permission mode and how to pre-approve a command with `allowed-tools`
* `Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found`: the skill’s frontmatter demands bash on a machine without it. Install Git for Windows or change the frontmatter to `shell: powershell`. See [How injected commands run](</docs/en/skills#how-injected-commands-run>)
+ * `No shell command in <name> was run`: one of the file’s `!` commands contains a raw control character other than tab or newline, so none of them runs. See how to find and remove the character
**What to do:**
* Create the ref by naming your remote’s default branch: `git remote set-head origin <default-branch>`. This works whenever the local tracking ref `origin/<default-branch>` exists. If it doesn’t, as in single-branch clones, fetch the branch first: run `git remote set-branches --add origin <branch>`, then `git fetch origin`, then rerun the set-head command. Rerun `/security-review`.
* If you’d rather not name the branch, run `git fetch origin` and then `git remote set-head origin --auto`, which asks the remote which branch is its default. It fails with `error: Cannot determine remote HEAD` when the remote advertises no default branch, because it is empty or its HEAD points at a branch nobody pushed; name the branch explicitly instead. It fails with `error: Not a valid ref` when your clone doesn’t fetch that branch; widen the refspec as above first.
* If the repository has no remote, add one with `git remote add origin <url>` and fetch before creating the ref. If the remote is empty, push your branch first with `git push -u origin HEAD` and name that branch in the set-head command; `origin/HEAD` then points at the branch you just pushed, so `/security-review` sees an empty diff until the branch diverges from it.
+
+###
+
+
+
+No shell command in a skill or command was run
+
+One of the `!`<command>`` [dynamic context commands](</docs/en/skills#inject-dynamic-context>) in a skill or custom command file contains a raw control character other than tab or newline. Claude Code refuses the whole invocation before any of the file’s commands runs. The message names the shell tool that would have run the commands, Bash or PowerShell, and ends with the refused command. Each such character is replaced by `�` so you can see where it is:
+
+ No shell command in /my-skill was run, because the Bash tool does not accept one of them: command contains control characters that would be hidden in the approval dialog. Unprintable characters are shown as � below: remove them from the skill or command file, or from the arguments or options substituted into it.
+ build.sh --target�dist
+
+**What to do:**
+
+ * Find each `�` in the command quoted at the end of the message. Remove the character it stands for from the skill or command file, or from the arguments or options substituted into the file.
###
@@ -4827,6 +4933,32 @@
+Instruction file not loaded
+
+This notice in the conversation view of an interactive session means a [memory file](</docs/en/memory#how-claude-md-files-load>) that exists wasn’t loaded. A read restriction is in force.
+
+ Instruction file not loaded (a Read deny rule covers it):
+ path: .claude/rules/shared.md
+
+The parenthetical names the reason, for example:
+
+ * **`a Read deny rule covers it`** : a `Read` [deny rule](</docs/en/permissions#read-and-edit>) matches the file’s path as written or where a link on it leads
+ * **`it's read from outside your working directories, where reads are blocked`** : the file resolves outside the [working directories](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on
+ * **`where it leads couldn't be worked out`** : for example, the file is a link that leads back to itself, directly or through other links
+
+When a subdirectory’s own memory file can’t be loaded as Claude works with files there, the same lines appear in the conversation during the turn. When more files are withheld than the lines name, a final line counts the rest, such as `and 3 more instruction files not loaded`. **What to do:**
+
+ * Nothing, if the restriction is intended: the session runs without that file’s instructions.
+ * To load a file withheld because `a Read deny rule covers it`, [remove or narrow that rule](</docs/en/permissions#manage-permissions>). Then start a new session.
+ * To load a file withheld because `it's read from outside your working directories, where reads are blocked`, move it or its link target inside the working directories. Then start a new session.
+ * To load a file withheld because `where it leads couldn't be worked out`, check whether the file is a link that leads back to itself. If it is, point the link at a file that exists or put a regular file in its place. Then start a new session.
+
+Before v2.1.292, the notice named the file at the end of the same line after the reason.
+
+###
+
+
+
A skill, command, or workflow wasn’t loaded because its name is reserved
A skill folder, a frontmatter `name`, a file or subfolder in `.claude/commands/`, or a [saved workflow](</docs/en/workflows#save-the-workflow-for-reuse>) uses the name `anthropic-skills` or a name that starts with `anthropic-skills:`. Claude Code [reserves that name for skills synced from claude.ai](</docs/en/skills#names-reserved-for-synced-skills>) and doesn’t load that item. Claude Code shows this warning as a startup notice in the conversation view rather than on stderr:
@@ -4997,6 +5129,21 @@
+MCP server name is reserved
+
+This message names one of your MCP servers, whose name is among those Claude Code reserves, such as the names of its built-in servers:
+
+ "workspace" is a reserved MCP server name and was not loaded
+
+**What to do:**
+
+ * Rename the server where you define it, for example from `workspace` to `my-workspace`
+ * For other reserved names to avoid, see [MCP configuration warnings](</docs/en/mcp#configuration-warnings>)
+
+###
+
+
+
Managed settings document could not be parsed
Your organization deploys [managed settings](</docs/en/managed-settings>), and one of the deployed documents is present but can’t be parsed as a JSON object, so Claude Code exits with code 1 at startup instead of running without the policy the document carries. The line names the failed source before the message:
@@ -5034,6 +5181,25 @@
* If you don’t, send the message to your administrator. Nothing in your own settings files causes or clears this error
Before v2.1.285, only sessions signed in with claude.ai or Claude Console credentials exited with this message, and a read that the operating system denied produced it too.
+
+###
+
+
+
+Managed settings contain invalid entries, including PreToolUse/PermissionRequest hooks that are NOT loaded
+
+This stderr block from a `-p` run means that a [managed settings](</docs/en/managed-settings>) source holds a hook entry Claude Code can’t load. That hook doesn’t run, and when a line lists the source’s `hooks` field as ignored, none of that source’s hooks run. Each line names the source, the field when there is one, and the problem, such as an unknown hook `type` or a hook declared outside the `hooks` key:
+
+ Managed settings contain invalid entries, including PreToolUse/PermissionRequest hooks that are NOT loaded; fix or remove each entry:
+ <source> (<field>): <message>
+
+**What to do:**
+
+ * If you administer the source, fix or remove each entry the block lists. [Hook configuration](</docs/en/hooks#configuration>) shows the shape Claude Code expects under `hooks`.
+ * If a line’s source is `parent managed settings`, the application that launched Claude Code passed that entry in as [parent settings](</docs/en/managed-settings#parent-settings-from-embedding-hosts>), so report it to that application’s developer
+ * Otherwise, send the block to your administrator
+
+Before v2.1.300, a `-p` run listed this case under the `Managed settings failed to load; policies from the failed source are NOT in effect:` header.
###
@@ -5237,6 +5403,22 @@
+Sandbox allow entries are ignored under a managed lock
+
+This warning in `/status` and `claude doctor` means managed settings set [`allowManagedReadPathsOnly`](</docs/en/settings-reference#sandbox-filesystem-allowmanagedreadpathsonly>) or [`allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>), so the [`allowRead`](</docs/en/settings-reference#sandbox-filesystem-allowread>) or [`allowedDomains`](</docs/en/settings-reference#sandbox-network-alloweddomains>) entries in the file it names don’t apply:
+
+ sandbox.filesystem.allowRead is ignored — managed settings set allowManagedReadPathsOnly, so only allowRead paths from managed settings are honored. The 3 entries in /home/you/.claude/settings.json will NOT apply (see https://code.claude.com/docs/en/settings#sandbox-settings).
+
+For the network lock, the warning names `sandbox.network.allowedDomains` and `allowManagedDomainsOnly`, and says `only allowed domains (and WebFetch domain rules) from managed settings are honored`. **What to do:**
+
+ * You don’t have to act on the warning
+ * If you need those paths or domains and your organization’s managed settings set the lock, ask your administrator to add them to those settings. The warning stays until you also remove the entries from the named file.
+ * To clear the warning, remove the entries from the named file. For a file you share, such as a project’s `.claude/settings.json`, you can leave the entries in for teammates without the lock and leave the warning showing.
+
+###
+
+
+
Stale sandbox mask files left by a killed session
`claude doctor` prints this warning in its diagnostics, and `/status` lists the same line. It appears on Linux and WSL2 when [sandboxing](</docs/en/sandboxing>) is enabled with filesystem isolation on. While a sandboxed command runs, the sandbox holds a write denial on a file that doesn’t exist yet by creating a 0-byte read-only placeholder there, and removes it afterward. A session killed before that cleanup runs, for example by SIGKILL, leaves the placeholders behind. Later sessions bind them read-only again on every start, so a settings write such as saving “Yes, and don’t ask again” fails where one sits.
--- a/file-checkpointing.md
+++ b/file-checkpointing.md
@@ -596,7 +596,7 @@
Limitation| Description
---|---
Write/Edit/NotebookEdit tools only| Changes made through Bash commands are not tracked
-Subagent edits| Edits a [subagent](</docs/en/agent-sdk/subagents>) applies aren’t tracked or restored, except a skill with `context: fork` running in the foreground; use git to revert untracked edits
+Subagent edits| Edits a [subagent](</docs/en/agent-sdk/subagents>) applies aren’t tracked, except a skill with `context: fork` running in the foreground. A rewind reverts them only in files the main conversation had already edited; use git to revert the rest
Same session| Checkpoints are tied to the session that created them
File content only| Creating, moving, or deleting directories is not undone by rewinding
Local files| Remote or network files are not tracked
--- a/gallery.md
+++ b/gallery.md
@@ -161,7 +161,7 @@
Show code and changes
-`Code` draws source text with Claude Code’s own syntax colors, or a diff.
+`Code` draws source text with Claude Code’s own syntax colors, or a diff. In the VS Code extension, `Code` shows its `source` as plain text, with none of the colors, line numbers, or diff shading in these screenshots.
###
@@ -233,7 +233,7 @@
Take input
-`Button`, `Input`, and `Select` are controls: the user moves between them with Tab and uses the one that has the focus. [Keyboard focus and hotkeys](</docs/en/plugins/mods/interface#know-which-keys-your-mod-can-receive>) covers which keys reach them. Opening a pane with `focus: true` gives the pane keyboard focus. Typed letters reach an `Input` once it has the focus, so add `autoFocus: true` to a field that should take typing as soon as the pane opens.
+`Button`, `Input`, and `Select` are controls: the user moves between them with Tab and uses the one that has the focus. [Keyboard focus and hotkeys](</docs/en/plugins/mods/interface#know-which-keys-your-mod-can-receive>) covers which keys reach them. Open a pane with `focus: true` to request keyboard focus for it. Typed letters reach an `Input` once it has the focus. To choose which field has the focus when the pane opens, see [Set a hotkey and the first focus](</docs/en/plugins/mods/interface#set-a-hotkey-and-the-first-focus>).
###
@@ -329,7 +329,7 @@
`Svg`
-An `Svg` draws an SVG document in the Desktop app:
+An `Svg` draws an SVG document in the Desktop app and the VS Code extension:
Svg({
alt: 'Three bars of rising height',
--- a/github-enterprise-server.md
+++ b/github-enterprise-server.md
@@ -57,7 +57,7 @@
Enable Code Review
-Go to [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>) and enable [Code Review](</docs/en/code-review#set-up-code-review>) for your GHES repositories using the same configuration as github.com.
+Go to [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>) and enable [Code Review](</docs/en/code-review-setup>) for your GHES repositories using the same configuration as github.com.
###
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -216,6 +216,7 @@
`T{char}`| Jump to just after previous occurrence of character on the current line
`;`| Repeat last f/F/t/T motion
`,`| Repeat last f/F/t/T motion in reverse
+`%`| Jump to the matching `()`, `[]`, or `{}` bracket, starting from the next bracket on the current line when the cursor isn’t on a bracket. Requires Claude Code v2.1.301 or later
`/`| Open reverse history search, same as `Ctrl+R`. The empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead
In vim NORMAL mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and `↑`/`↓` navigate command history instead. `←` on an empty prompt opens [agent view](</docs/en/agent-view>) from NORMAL mode as well as INSERT; before v2.1.219, `←` on an empty prompt did nothing in NORMAL mode.
@@ -237,6 +238,7 @@
`dj`/`dk`| Delete the current line and the line below or above
`dgg`/`dG`| Delete from the current line to the first or last line
`d0`/`c0`/`y0`| Delete, change, or yank from the cursor back to the beginning of the line. Requires Claude Code v2.1.281 or later
+`d%`/`c%`/`y%`| Delete, change, or yank from the cursor through the bracket that `%` jumps to. Requires Claude Code v2.1.301 or later
`cc`| Change line
`C`| Change to end of line
`cw`/`ce`/`cb`| Change word/to end/back
Show diff (126 lines)
--- a/interface.md
+++ b/interface.md
@@ -192,7 +192,7 @@
`Spinner`, `ToolProgress`, `TurnDuration`| Status lines for a turn: the line that animates while Claude works, a running tool’s live progress line, and the line that closes a turn
`InfoNotice`, `SessionMode`, `PromptHint`| Status lines under the logo, the mode labels in the footer, and the hint line under the prompt
-At a site Claude Code already draws, your hook can change a detail, replace the drawing, or leave it alone. Select a tab to see each one applied to the spinner. The examples read a `calls` variable that another hook counts, as in the [tutorial mod](</docs/en/plugins/mods/create#write-a-mod-yourself>).
+`Pane`, `AskUserQuestion`, `Spinner`, `UserMessage`, `AssistantMessage`, and the tool call sites work in the terminal, the Desktop app, and the VS Code extension. The [render sites table](</docs/en/plugins/mods/reference#render-sites>) lists where each of the others is raised. At a site Claude Code already draws, your hook can change a detail, replace the drawing, or leave it alone. Select a tab to see each one applied to the spinner. The examples read a `calls` variable that another hook counts, as in the [tutorial mod](</docs/en/plugins/mods/create#write-a-mod-yourself>).
* Change a detail
@@ -243,7 +243,7 @@
return Box({ flexDirection: 'column', children: [theirs, Text({ children: ['under the spinner'] })] })
})
-While Claude works, the spinner animates as before, and `under the spinner` appears below it. The permission prompt isn’t a render site, so a mod can’t change what it shows. The question dialog, `AskUserQuestion`, is one, so a mod can change that. A tree for the dialog has to hold the reference exactly once, with your elements above it. Otherwise, Claude Code draws its own dialog. The terminal and the Desktop app don’t raise all the same sites. `Pane`, `AbovePrompt`, `Spinner`, and the transcript sites work in both. A few other status lines are raised in the terminal only. The [render sites table](</docs/en/plugins/mods/reference#render-sites>) lists where each one is raised.
+While Claude works, the spinner animates as before, and `under the spinner` appears below it. The permission prompt isn’t a render site, so a mod can’t change what it shows. The question dialog, `AskUserQuestion`, is one, so a mod can change that. A tree for the dialog has to hold the reference exactly once, with your elements above it. Otherwise, Claude Code draws its own dialog.
###
@@ -270,7 +270,7 @@
`rows`| The height to ask for when the pane sits above the prompt. The default is a third of the space.
`columns`| The width to ask for when the pane sits beside the transcript
-`focus`, `closeOnEscape`, and `holdToasts` are optional and accept only `true`. To leave one off, omit it. Passing `false` throws an error such as `ui.open: focus is true or left out`. To set one of them conditionally, add the field only when the condition holds. This call asks for keyboard focus only when `items` isn’t empty:
+The VS Code extension ignores `rows` and `columns` and sizes the pane itself. `focus`, `closeOnEscape`, and `holdToasts` are optional and accept only `true`. To leave one off, omit it. Passing `false` throws an error such as `ui.open: focus is true or left out`. To set one of them conditionally, add the field only when the condition holds. This call asks for keyboard focus only when `items` isn’t empty:
const pane = { id: 'hello-tabs', title: 'Hello tabs' }
await $.ui.open(items.length > 0 ? { ...pane, focus: true } : pane)
@@ -298,13 +298,30 @@
When the pane appears, `$.ui.open` resolves to `{ isPlaced: true }`. When the pane is waiting, `isPlaced` is `false` and `reason` is a string that says why. A waiting pane appears when the user opens it or widens the terminal. To say something is available without opening a pane, call `$.ui.toast('Your message')`, which shows a toast notification.
+###
+
+
+
+Draw in the VS Code extension
+
+In the VS Code extension, what a mod draws appears in the chat panel with extension version 2.1.299 or later, in a session that [fetches feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). In a `ui.render` hook for the panel, `e.surface` is `vscode`. To check which sites and elements the panel draws, and which props it ignores, see the [render sites](</docs/en/plugins/mods/reference#render-sites>) and [elements](</docs/en/plugins/mods/reference#elements>) tables. To make a mod work in the panel as well as the terminal, account for these differences:
+
+ * **Panes** : in a panel 800 pixels or wider, panes dock beside the conversation, `e.props.placement` is `'dock'`, and `e.viewport.isFullscreen` is `true`. In a narrower panel, panes draw above the prompt box, `placement` is `'inline'`, and a pane shows 12 rows before it scrolls.
+ * **Toasts and status lines** : these sit in one stack directly above the prompt box, together with the panes when the panel is narrow, with one status line per mod. The stack is hidden while a permission request or a dialog shows.
+ * **Labels** : the panel frames what a mod draws or rewrites and labels it with the plugin’s name, as in **From the token-chart plugin** or **Edited by the token-chart plugin**.
+ * **Keyboard** : buttons have no hotkeys, so the user clicks a button or presses Enter on it once it has focus.
+ * **Keyboard focus** : the panel grants a pane’s `focus: true` request only when the panel has focus, Claude is idle with no question waiting, and the prompt box is empty.
+ * **The question dialog** : at `AskUserQuestion`, the panel keeps its own question card and draws your elements above it. Props you pass to `next` don’t change the card.
+ * **Prompt suggestions** : `$.prompt.suggest` resolves with `isShown: false` and shows nothing, because the panel keeps the prompt box’s dim suggestion text for Claude’s own suggestions.
+ * **Text limits** : the panel cuts a status line at 200 characters or two rows, and a toast at 500 characters.
+
##
Build a tree from elements
-What a `ui.render` hook returns is an element tree: a description of what to draw, made of boxes, text, and controls nested inside each other. You describe the drawing, and Claude Code renders it in the terminal or the Desktop app. To get the elements, call `$.ui.resolve(e)` in your hook, as in `const { Box, Text, Button } = $.ui.resolve(e)`. Each element is a function. You pass it props, and you put the elements and strings that go inside it in `children`. Select a tab to see each of the most common elements and how the terminal draws it:
+What a `ui.render` hook returns is an element tree: a description of what to draw, made of boxes, text, and controls nested inside each other. You describe the drawing, and Claude Code renders it in whichever app the user has open: the terminal, the Desktop app, or the VS Code extension. To get the elements, call `$.ui.resolve(e)` in your hook, as in `const { Box, Text, Button } = $.ui.resolve(e)`. Each element is a function. You pass it props, and you put the elements and strings that go inside it in `children`. Select a tab to see each of the most common elements and how the terminal draws it:
* Text
@@ -362,8 +379,8 @@
`Text`| Styled text. Takes `color`, `bold`, `dimColor`, `italic`, and `wrap`. A `color` is a theme key or a color such as `'red'`. A `wrap` is `'wrap'`, `'truncate'`, `'truncate-start'`, `'truncate-middle'`, or `'truncate-end'`.| Everywhere
`Button`| A control that calls `onPress`| Everywhere
`Link`, `Code`, `Markdown`| A link with `href` and an optional `label`, a code block, and text formatted the way Claude’s replies are. `Markdown` takes its content in a `text` prop, not in `children`, and needs a `key` when you pass `onLinkPress`.| Everywhere
-`Input`, `Select`| A text field and a dropdown| Terminal, Desktop
-`Svg`| An SVG document| Desktop
+`Input`, `Select`| A text field and a dropdown| Terminal, Desktop, VS Code
+`Svg`| An SVG document| Desktop, VS Code
`Client`| A region drawn by a second file of yours, for animation and pointer input. That file gets no mods API. It reaches your hooks by posting data, which arrives as a `ui.message` event. If it fails to load, draw, or run, your hooks receive a [`ui.fault`](</docs/en/plugins/mods/reference#interface>) event.| Terminal, Desktop
`Raster`, `Image`| A grid of colored cells, and a picture| Terminal
@@ -373,9 +390,9 @@
-`Link` in the Desktop app
-
-In the Desktop app, a `Link` draws as plain text unless its `href` meets these requirements:
+`Link` in the Desktop app and VS Code
+
+In the Desktop app and the VS Code extension, a `Link` draws as plain text unless its `href` meets these requirements:
* **Scheme and host** : an `https:` URL, or an `http://localhost` URL such as `http://localhost:3000`
* **No`@`**: write an `@` in the path or query as `%40`
@@ -397,7 +414,7 @@
Draw a grid of colored cells
-For a heat map, a sparkline, or a game board in the terminal, draw one `Raster` and not a `Box` for each cell. A `Raster` takes a `key`, its size in `columns` and `rows`, and `cells`, a base64 string that packs every cell. Each cell is three numbers: the character’s code point, its color, and its background color. A color is a 24-bit RGB value in hexadecimal, such as `0xc62828` for a red. The value `0x01000000`, one above that range, means the terminal’s default. The Desktop app has no `Raster`, so check `e.surface` and draw text there. This pane body draws a three by two heat map:
+For a heat map, a sparkline, or a game board in the terminal, draw one `Raster` and not a `Box` for each cell. A `Raster` takes a `key`, its size in `columns` and `rows`, and `cells`, a base64 string that packs every cell. Each cell is three numbers: the character’s code point, its color, and its background color. A color is a 24-bit RGB value in hexadecimal, such as `0xc62828` for a red. The value `0x01000000`, one above that range, means the terminal’s default. Apps other than the terminal have no `Raster`, so check `e.surface` and draw text there. This pane body draws a three by two heat map:
// The value that means "use the terminal's default color"
const DEFAULT_COLOR = 0x01000000
@@ -449,7 +466,7 @@
Keyboard focus and hotkeys
-Your mod never reads the keyboard itself. The user presses a key, Claude Code decides which of your controls it’s for, and that control’s callback runs. Apart from a [digit hotkey on the band](</docs/en/plugins/mods/reference#elements>), that happens only while your pane or band has keyboard focus. The rest of the time, keys go to the prompt.
+Your mod never reads the keyboard itself. The user presses a key, Claude Code decides which of your controls it’s for, and that control’s callback runs. Apart from a [digit hotkey on the band](</docs/en/plugins/mods/reference#elements>), that happens only while your pane or band has keyboard focus. The rest of the time, keys go to the prompt. In the VS Code extension, buttons have no hotkeys: the user clicks a button or presses Enter on it, and types into fields.
####
@@ -492,17 +509,15 @@
Set a hotkey and the first focus
-These props on a control decide how the keyboard reaches it:
-
* **`hotkey`** : to let the user press a `Button` with one key, give it a `hotkey` of one digit or one lowercase letter, as in `hotkey: 'a'`
- * **`autoFocus`** : to choose which control has the focus when the pane opens, add `autoFocus: true` to it. The prop accepts only `true`, so omit it on the other controls.
+ * **`autoFocus`** : to choose which control has the focus when the pane opens, add `autoFocus: true` to it. In the VS Code extension, `autoFocus` does nothing: the control draws as if you had left it out, and you don’t need to change anything. The prop accepts only `true`, so omit it on the other controls.
How a hotkey shows depends on the button and the app:
-Button| In the terminal| In the Desktop app
----|---|---
-With brackets, the default| `[ Add one ]`, with no hotkey shown| The label with a small key beside it
-With `plain: true`| `1: One`| The label with a small key beside it
+Button| In the terminal| In the Desktop app| In the VS Code extension
+---|---|---|---
+With brackets, the default| `[ Add one ]`, with no hotkey shown| The label with a small key beside it| The label, and the hotkey does nothing
+With `plain: true`| `1: One`| The label with a small key beside it| The label, and the hotkey does nothing
In the terminal, name the key in a bracketed button’s label, or use `plain: true`, so the user can see what to press. The [elements reference](</docs/en/plugins/mods/reference#elements>) has the other `Button` rules: `action`, digit hotkeys on the band, and two buttons on one hotkey.
--- a/mcp-quickstart.md
+++ b/mcp-quickstart.md
@@ -335,6 +335,8 @@
$env:MCP_TIMEOUT = "60000"; claude
+Before v2.1.299, some connections to HTTP servers that were up timed out at startup regardless of `MCP_TIMEOUT`. If you use one of those versions and an HTTP server that is up still times out after you raise the limit, [update Claude Code](</docs/en/setup#update-claude-code>).
+
Server already exists
You’ve already added a server with that name at the same scope. Either remove the existing entry first or choose a different name:
--- a/memory.md
+++ b/memory.md
@@ -572,6 +572,7 @@
CLAUDE.md content is delivered as a user message after the system prompt, not as part of the system prompt itself. Claude reads it and tries to follow it, but there’s no guarantee of strict compliance, especially for vague or conflicting instructions. To debug:
* Run `/context` and check the list under **Memory files** to verify the CLAUDE.md and CLAUDE.local.md files that should load at launch. If one is missing there, Claude can’t see it. Use `/memory` to open and edit the files.
+ * If an `Instruction file not loaded` notice appears, see [what it means and what to do about it](</docs/en/errors#instruction-file-not-loaded>).
* A `CLAUDE.md` in a subdirectory of your working directory doesn’t appear under **Memory files** , because it loads on demand rather than at launch. When it loads, a `Loaded` line with its path appears in the terminal. To test a new one, create it from your shell rather than asking Claude to write it, then ask Claude to read a file in that subdirectory.
* Check that the relevant CLAUDE.md is in a location that gets loaded for your session (see Choose where to put CLAUDE.md files).
* Make instructions more specific. “Use 2-space indentation” works better than “format code nicely.”
--- a/model-config.md
+++ b/model-config.md
@@ -729,6 +729,26 @@
Correct the window for a gateway or custom model ID
+Either of these startup warnings means Claude Code doesn’t recognize your session’s model ID, so it can’t tell the model’s context window and assumes 200K tokens:
+
+ ⚠ Model "my-gateway-opus" isn't recognized · context assumed to be 200k tokens · ...
+ Claude Code doesn't recognize the model "my-gateway-opus", so it assumes a context window of 200k tokens. Update Claude Code, or see https://code.claude.com/docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id to set the window.
+
+Claude Code auto-compacts the conversation at the assumed 200K, so if the model’s real context window is 200K, there is nothing to correct. Otherwise, give Claude Code the real window in whichever of these ways fits your ID:
+
+ * **A model newer than your Claude Code version** : run `claude update` in your shell. If Claude Code recognizes the ID after the update, you don’t need to configure anything else.
+ * **Your gateway’s or provider’s name for a model Claude Code knows** : add a `modelOverrides` entry that maps the Anthropic model ID to your ID, such as `"claude-opus-4-8": "my-gateway-opus"`. You can instead list your ID in a [`modelPicker`](</docs/en/settings-reference#fields-for-modelpicker>) row with `behavesAs` set to that model. Either way, Claude Code then treats the ID as that model.
+ * **A model with a 1M window** : append `[1m]` to the ID where you set the model, such as `claude --model 'my-gateway-opus[1m]'` in your shell. If you turned off 1M context, you get the same window with or without the suffix.
+ * **Any other window** : set [`CLAUDE_CODE_MAX_CONTEXT_TOKENS`](</docs/en/env-vars>) to the window size in tokens in the environment that starts Claude Code, such as `CLAUDE_CODE_MAX_CONTEXT_TOKENS=400000`. For an unrecognized ID that doesn’t start with `claude-` and has no `[1m]` suffix, the variable takes effect on its own. For any other ID, check which IDs it applies to first.
+
+Once Claude Code recognizes the ID or uses the window you gave it, the warning no longer appears when you start a session on that ID.
+
+####
+
+
+
+Which IDs `CLAUDE_CODE_MAX_CONTEXT_TOKENS` applies to
+
On an [LLM gateway](</docs/en/llm-gateway>) or other custom deployment, Claude Code can assume a context window for the model ID that differs from the model’s real window, whether or not it resolves the ID to a Claude model. Set [`CLAUDE_CODE_MAX_CONTEXT_TOKENS`](</docs/en/env-vars>) to the window Claude Code should assume instead. How the variable applies depends on the ID. Claude Code treats an ID as a provider or custom spelling when it doesn’t start with `claude-`, in any casing, or when it carries a suffix that Claude Code strips when reading the ID, such as the `@YYYYMMDD` date used on Google Cloud’s Agent Platform. Before v2.1.259, Claude Code didn’t count a stripped suffix, so an unrecognized `claude-` ID with a date suffix was treated as a bare `claude-` name. An unrecognized provider or custom spelling, the same spelling with `[1m]`, and every other ID are three separate cases:
* If Claude Code can’t resolve a provider or custom spelling to a model it recognizes and the ID doesn’t contain `[1m]`, the variable applies directly and proactive compaction continues at the declared window.
--- a/reference.md
+++ b/reference.md
@@ -1,4 +1,4 @@
-Look up any event a [mod](</docs/en/plugins/mods/overview>) can handle, mods API method it can call, or render site it can draw in, for the Claude Code CLI and the Desktop app as of v2.1.290. Each entry gives the name and a one-line description, and links to the guide section that explains it where there is one.
+Look up any event a [mod](</docs/en/plugins/mods/overview>) can handle, mods API method it can call, or render site it can draw in. Entries cover the Claude Code CLI and the Desktop app as of v2.1.290, and the VS Code extension as of v2.1.299. Each entry gives the name and a one-line description, and links to the guide section that explains it where there is one.
The complete reference is Claude Code’s [TypeScript declarations for mods](<https://github.com/anthropics/claude-code/blob/main/mods/types/claude-code.d.ts>), which describe every event, method, and element, with examples. The copy on GitHub can be older than the Claude Code version you have installed. When the two disagree, trust [the copy Claude Code writes for your version](</docs/en/plugins/mods/create#get-the-types-for-your-build>).
@@ -277,29 +277,29 @@
Render sites
-A render site is an extension point in Claude Code’s interface. Each row is a value of `e.component` in a `ui.render` hook, with the fields of `e.props` and the apps that render it. `e.surface` is `terminal` or `desktop`. [Change what Claude Code already draws](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>) shows what a hook can do at a site, with an example of each choice.
+A render site is an extension point in Claude Code’s interface. Each row is a value of `e.component` in a `ui.render` hook, with the fields of `e.props` and the apps that render it. `e.surface` names the app that’s drawing, such as `terminal`, `desktop`, or `vscode`. [Change what Claude Code already draws](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>) shows what a hook can do at a site, with an example of each choice. Rendering in the VS Code extension requires extension version 2.1.299 or later and a session that [fetches feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). [Draw in the VS Code extension](</docs/en/plugins/mods/interface#draw-in-the-vs-code-extension>) lists what the extension draws differently.
Site| `e.props`| `e.requestId`| Rendered on
---|---|---|---
-[`Pane`](</docs/en/plugins/mods/interface#pick-where-to-draw>)| `title`, `isFocused`, `bodyColumns`, `placement`, `scroll`, `view`| The pane’s `id`| Terminal, Desktop
+[`Pane`](</docs/en/plugins/mods/interface#pick-where-to-draw>)| `title`, `isFocused`, `bodyColumns`, `placement`, `scroll`, `view`| The pane’s `id`| Terminal, Desktop, VS Code
[`AbovePrompt`](</docs/en/plugins/mods/interface#pick-where-to-draw>)| `hasSurvey`, `isWorking`, `maxRows`, `bodyColumns`, `scroll`, `view`| One instance| Terminal, Desktop
-`UserMessage`| `text`, `origin`, `isExpanded`, and `task` or `from` by origin| The message id| Terminal, Desktop
-`AssistantMessage`| The reply’s text| The message id| Terminal, Desktop
-`ToolUse`, `ToolResult`, `ToolGroup`| The tool’s name, input, and result| The tool call id| Terminal, Desktop
+`UserMessage`| `text`, `origin`, `isExpanded`, and `task` or `from` by origin| The message id| Terminal, Desktop, VS Code
+`AssistantMessage`| The reply’s text| The message id| Terminal, Desktop, VS Code
+`ToolUse`, `ToolResult`, `ToolGroup`| The tool’s name, input, and result| The tool call id| Terminal, Desktop, VS Code
`CommandOutput`| `command`, `text`| The message id| Terminal, Desktop
-[`AskUserQuestion`](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>)| The question and options| The tool call id| Terminal, Desktop
+[`AskUserQuestion`](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>)| The question and options| The tool call id| Terminal, Desktop, VS Code
`ToolProgress`| `kind`| The tool call id| Terminal
-[`Spinner`](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>)| `word`, `message`, `suffix`, `mode`| The agent id| Terminal, Desktop
+[`Spinner`](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>)| `word`, `message`, `suffix`, `mode`| The agent id| Terminal, Desktop, VS Code
`TurnDuration`| `word`, `durationMs`| The message id| Terminal
`InfoNotice`| `text`, `command`| The message id| Terminal
`SessionMode`| `modes`| One instance| Terminal, Desktop
`PromptHint`| `isDraft`, `isWorking`, `hint`| One instance| Terminal, Desktop
-`e.viewport` holds `columns`, `rows`, and `isFullscreen`. It’s absent until the app has measured its window. Its `rows` is the height of the whole window, not of your pane. To fit a tree to its site, read these props in the hook:
+`e.viewport` holds `columns`, `rows`, and `isFullscreen`. In the terminal and the Desktop app, it’s absent until the app has measured its window. There, its `rows` is the height of the whole window, not of your pane. In the VS Code extension, it’s always present. To fit a tree to its site, read these props in the hook:
* **Width of a`Pane` or the band**: draw to `e.props.bodyColumns`
* **Height of a`Pane` beside the transcript**: where `e.props.placement` is `'dock'`, `e.props.scroll.bodyRows` is the number of rows the pane has for your tree
- * **Height of a`Pane` above the prompt**: where `e.props.placement` is `'inline'`, the pane grows with your tree up to a limit, and `bodyRows` is that limit. The [`rows` field of `$.ui.open`](</docs/en/plugins/mods/interface#open-a-pane-at-the-right-time>) asks for a different one.
+ * **Height of a`Pane` above the prompt**: where `e.props.placement` is `'inline'`, the pane grows with your tree up to a limit, and `bodyRows` is that limit. To ask for a different limit, see the [`rows` field of `$.ui.open`](</docs/en/plugins/mods/interface#open-a-pane-at-the-right-time>).
A tree taller than the pane scrolls as a whole.
@@ -311,22 +311,27 @@
Elements are the building blocks of a tree a `ui.render` hook returns, and you get them from `$.ui.resolve(e)`. [Build a tree from elements](</docs/en/plugins/mods/interface#build-a-tree-from-elements>) shows the common ones with how the terminal draws them, and the [interface gallery](</docs/en/plugins/mods/gallery>) has screenshots of most. A check mark means the app can draw the element.
-Element| Main props| Terminal| Desktop
----|---|---|---
-[`Box`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `key`, flex layout, `gap`, `padding`, `margin`, `width`, `height`, `borderStyle`, `backgroundColor`, `position`, `hover`| ✓| ✓
-[`Text`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `color`, `backgroundColor`, `bold`, `italic`, `underline`, `dimColor`, `inverse`, `wrap`| ✓| ✓
-[`Button`](</docs/en/plugins/mods/interface#respond-to-presses-and-typing>)| `key`, `label`, `onPress`, `hotkey`, `plain`, `dimColor`, `autoFocus`, `action`| ✓| ✓
-[`Link`](</docs/en/plugins/mods/interface#link-in-the-desktop-app>)| `href`, `label`. See Limits.| ✓| ✓
-[`Code`](</docs/en/plugins/mods/gallery#show-code-and-changes>)| `source`, `language`, `path`, `startLine`, `format`, `wrap`| ✓| ✓
-`Markdown`| `text`, `key`, `dimColor`, `onLinkPress`, `pressableLinks`| ✓| ✓
-[`Input`](</docs/en/plugins/mods/interface#take-typed-input-and-draw-a-row-for-each-item>)| `key`, `label`, `placeholder`, `value`, `submitLabel`, `onSubmit`, `onInput`, `autoFocus`| ✓| ✓
-`Select`| `key`, `label`, `options`, `value`, `onSelect`, `autoFocus`| ✓| ✓
-`Svg`| An SVG document, up to 131,072 characters| | ✓
-[`Client`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `module`, `key`| ✓| ✓
-[`Raster`](</docs/en/plugins/mods/interface#draw-a-grid-of-colored-cells>)| `key`, `columns` up to 512, `rows` up to 256, `cells`. See [Draw a grid of colored cells](</docs/en/plugins/mods/interface#draw-a-grid-of-colored-cells>).| ✓|
-`Image`| PNG or RGBA bytes up to 2 MiB, or a file path, `columns` and `rows` up to 255, and `alt` text.| ✓|
-
-More `Button` rules: `action` names one of Claude Code’s own [keybinding actions](</docs/en/keybindings>), and the user’s binding for it presses the button when that binding is a chord or a modified key. A digit `hotkey` on a button in the band also fires when the user types that digit alone into an empty prompt and pauses. When two buttons in one drawing name the same `hotkey`, the later one gets it. `autoFocus` accepts only `true` on any control, so omit the prop to leave it off.
+Element| Main props| Terminal| Desktop| VS Code
+---|---|---|---|---
+[`Box`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `key`, flex layout, `gap`, `padding`, `margin`, `width`, `height`, `borderStyle`, `backgroundColor`, `position`, `hover`| ✓| ✓| ✓
+[`Text`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `color`, `backgroundColor`, `bold`, `italic`, `underline`, `dimColor`, `inverse`, `wrap`| ✓| ✓| ✓
+[`Button`](</docs/en/plugins/mods/interface#respond-to-presses-and-typing>)| `key`, `label`, `onPress`, `hotkey`, `plain`, `dimColor`, `autoFocus`, `action`| ✓| ✓| ✓
+[`Link`](</docs/en/plugins/mods/interface#link-in-the-desktop-app>)| `href`, `label`. See Limits.| ✓| ✓| ✓
+[`Code`](</docs/en/plugins/mods/gallery#show-code-and-changes>)| `source`, `language`, `path`, `startLine`, `format`, `wrap`| ✓| ✓| ✓
+`Markdown`| `text`, `key`, `dimColor`, `onLinkPress`, `pressableLinks`| ✓| ✓| ✓
+[`Input`](</docs/en/plugins/mods/interface#take-typed-input-and-draw-a-row-for-each-item>)| `key`, `label`, `placeholder`, `value`, `submitLabel`, `onSubmit`, `onInput`, `autoFocus`| ✓| ✓| ✓
+`Select`| `key`, `label`, `options`, `value`, `onSelect`, `autoFocus`| ✓| ✓| ✓
+`Svg`| An SVG document, up to 131,072 characters| | ✓| ✓
+[`Client`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `module`, `key`| ✓| ✓|
+[`Raster`](</docs/en/plugins/mods/interface#draw-a-grid-of-colored-cells>)| `key`, `columns` up to 512, `rows` up to 256, `cells`. See [Draw a grid of colored cells](</docs/en/plugins/mods/interface#draw-a-grid-of-colored-cells>).| ✓| |
+`Image`| PNG or RGBA bytes up to 2 MiB, or a file path, `columns` and `rows` up to 255, and `alt` text.| ✓| |
+
+More `Button` rules: `action` names one of Claude Code’s own [keybinding actions](</docs/en/keybindings>), and the user’s binding for it presses the button when that binding is a chord or a modified key. A digit `hotkey` on a button in the band also fires when the user types that digit alone into an empty prompt and pauses. When two buttons in one drawing name the same `hotkey`, the later one gets it. `autoFocus` accepts only `true` on any control, so omit the prop to leave it off. The VS Code extension ignores some element props and draws the element as if you had left them out:
+
+ * **`Box`** : `position` and `hover`
+ * **`Button`** : `hotkey`, `plain`, `autoFocus`, and `action`, so the user presses a button there with a click, or with Enter once it has focus
+ * **`Code`** : `language`, `path`, `startLine`, `format`, and `wrap`, so code draws without colors or line numbers, and a `format: 'diff'` block shows the diff’s raw text
+ * **`Input` and `Select`**: `autoFocus`
###
--- a/remote-control.md
+++ b/remote-control.md
@@ -70,6 +70,7 @@
`-d`, `--debug[=<filter>]`| Turn on debug logging for the server, optionally filtered by category. Pass a filter only in the `=` form, such as `--debug=api,hooks`. Requires Claude Code v2.1.282 or later.
`--debug-file <path>`| Write debug logs to the given file.
`--verbose`| Show detailed connection and session logs.
+`--sandbox`, `--no-sandbox`| Removed in v2.1.300. If you pass either flag, the server [exits with an error](</docs/en/errors#sandbox-is-not-supported-by-claude-remote-control>) instead of starting.
If you pass a global `claude` flag before `remote-control`, or a wrapper script adds one, Claude Code doesn’t carry the flag over to the sessions the server creates. Claude Code lets the flag through only when dropping it is known not to change what those sessions can do, such as `--verbose` or `--model`. For any other flag, such as `--settings`, Claude Code [refuses to start](</docs/en/errors#not-carried-over-to-the-sessions-remote-control-starts>) and names the flag to remove.To sandbox the sessions the server starts, turn on [sandboxing](</docs/en/sandboxing>) in a settings file.Claude Code checks Remote Control eligibility before printing help, so `claude remote-control --help` returns an error instead of this flag list when you aren’t signed in with an eligible account.
--- a/troubleshoot.md
+++ b/troubleshoot.md
@@ -295,15 +295,22 @@
Hotkeys do nothing
-Your pane doesn’t have keyboard focus. Press Ctrl+X then Tab, or click the pane. Open it with `focus: true` from a command.
-
-###
-
-
-
-A drawing works in the terminal and not in the Desktop app
-
-The site or element isn’t available there. Check the [render sites](</docs/en/plugins/mods/reference#render-sites>) and [elements](</docs/en/plugins/mods/reference#elements>) tables.
+Your pane doesn’t have keyboard focus, or the drawing is in the VS Code extension, where buttons have no hotkeys. Do the one that matches:
+
+ * **No keyboard focus** : press Ctrl+X then Tab, or click the pane. To have the pane take focus when it opens, open it with `focus: true` from a command.
+ * **In the VS Code extension** : click the button, or press Enter on it once it has focus
+
+###
+
+
+
+A drawing works in the terminal and not in the Desktop app or VS Code
+
+Either that app doesn’t draw the site or element, or the session is one where the VS Code extension draws nothing for mods. The mod’s other hooks still run. Check for these causes:
+
+ * **The site or element isn’t drawn in that app** : look up your site in the [render sites](</docs/en/plugins/mods/reference#render-sites>) table and your elements in the [elements](</docs/en/plugins/mods/reference#elements>) table. For an element the app lacks, check `e.surface` in the hook and return a tree the app can draw.
+ * **The VS Code extension is older than 2.1.299** : the chat panel draws for mods from [extension version](</docs/en/vs-code#install-the-extension>) 2.1.299. Check the version in VS Code’s Extensions view and update the extension there.
+ * **The VS Code session doesn’t fetch feature flags** : drawing in the chat panel requires it. Sessions on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, or through a [Claude apps gateway](</docs/en/claude-apps-gateway>), skip it, among others that [Features that need feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) lists. To see the drawing in such a session, run `claude` in a terminal instead, such as VS Code’s integrated terminal.
##
--- a/ultrareview.md
+++ b/ultrareview.md
@@ -6,7 +6,7 @@
* **Broader coverage** : a larger fleet of reviewer agents explores the change in parallel, which surfaces issues that a local review can miss
* **No local resource use** : the review runs entirely in a cloud sandbox, so your terminal stays free for other work while it runs
-Ultrareview requires authentication with a claude.ai account because it runs as a cloud session on Anthropic’s infrastructure. If you are signed in with an API key only, run `/login` and authenticate with claude.ai first. Ultrareview is not available when using Claude Code with Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, and it is not available to organizations that have enabled Zero Data Retention or have the [HIPAA configuration](</docs/en/hipaa-setup>) applied. When ultrareview is not available, `/code-review ultra` runs a local review in your session instead.
+Ultrareview requires authentication with a claude.ai account because it runs as a cloud session on Anthropic’s infrastructure. If you are signed in with an API key only, run `/login` and authenticate with claude.ai first. Ultrareview is not available when using Claude Code with Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, and it is not available to organizations that have enabled Zero Data Retention or have 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`.
##
--- a/vs-code.md
+++ b/vs-code.md
@@ -156,6 +156,19 @@
+LaTeX math in responses
+
+The chat panel shows LaTeX math in Claude’s responses as typeset formulas. Math rendering requires Claude Code v2.1.301 or later. In terminal mode, math isn’t typeset. The panel typesets both display math and inline math:
+
+ * **Display math** : a `$$ … $$` or `\[ … \]` block on a line or lines of its own, and a fenced code block with `math` as its language
+ * **Inline math** : `$…$` or `\(…\)` that opens and closes on the same line, such as `$E = mc^2$` or `\(a^2 + b^2 = c^2\)`
+
+The panel tries to tell math apart from other uses of the same characters, so text such as `$HOME`, a price like `$5`, or `sed 's/\(foo\)/\1/'` isn’t typeset. Neither is text inside a code span or inside any code block other than a fenced `math` block. If a formula shows as written when you expected it typeset, see A formula shows as raw LaTeX. When you select and copy text that includes a typeset formula, you get the formula’s TeX source in `$…$` or `$$…$$` delimiters rather than the drawn symbols. **Copy response** and `/copy` give you the response as Claude wrote it, TeX source included.
+
+###
+
+
+
Resume past conversations
Click the **Session history** button at the top of the Claude Code panel to access your conversation history. You can search by keyword or browse by time. Click any conversation to resume it with the full message history. If the conversation is already open in another tab of the current window, clicking it switches to that tab. If the messages stay blank at first, see why they’re blank and when they appear. For more on resuming sessions, see [Manage sessions](</docs/en/sessions>).
@@ -248,6 +261,21 @@
* **Sidebar** : the conversation comes back if you sent a message or Claude responded in it within the last 10 minutes. If it doesn’t come back, resume the conversation from Session history.
If another Claude Code process still has the conversation open, you’re asked before it opens here, with the same **Open here anyway** notice as when you resume it from session history. If the messages stay blank at first, see why they’re blank and when they appear. If the reload interrupted Claude mid-step, Claude continues that step when the conversation comes back, and a notice in the chat marks the continuation. Requires Claude Code v2.1.274 or later. If the step was interrupted more than an hour ago or the session is open elsewhere, the conversation comes back idle instead. To turn continuation off, open the [Continue After Reload setting](<vscode://settings/claudeCode.continueAfterReload>) and uncheck it. Setting [`CLAUDE_CODE_RESUME_INTERRUPTED_TURN`](</docs/en/env-vars#variables>) or any other `CLAUDE_CODE_RESUME_` variable in VS Code’s environment or in the `environmentVariables` setting has no effect in the panel, because the extension removes those variables before it starts the panel’s sessions.
+
+####
+
+
+
+A conversation was not reopened
+
+After a reload, a new chat with a notice like this above its prompt box means the panel left your conversation closed because the conversation’s last two opens didn’t finish:
+
+ “Fix the login bug” was not reopened. It did not finish opening the last 2 times, and opening it again may stop Claude Code from responding here.
+
+An open doesn’t finish when the panel crashes or stops responding while loading the conversation, or when you reload or close the window within about three seconds of it opening. Nothing is lost: the conversation is unchanged and stays in Session history.
+
+ * **To open it anyway** : click **Open it anyway** or pick the conversation from Session history. If it opens and the panel keeps working, it comes back after later reloads as usual. If the panel stops responding again, reload the window to return to a new chat with the notice.
+ * **To leave it closed** : keep working in the new chat. The notice disappears once you send a prompt.
###
@@ -383,6 +411,26 @@
Plugin management in VS Code uses the same CLI commands under the hood. Plugins and marketplaces you configure in the extension are also available in the CLI, and vice versa.
For more about the plugin system, see [Plugins](</docs/en/plugins/overview>) and [Plugin marketplaces](</docs/en/plugins/overview>).
+
+###
+
+
+
+Plugins that draw in the panel
+
+A plugin that contains a [mod](</docs/en/plugins/mods/overview>) can draw in the chat panel. Drawing requires extension version 2.1.299 or later and a session that [fetches feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). From such a plugin you can see:
+
+ * A pane beside the conversation or above the prompt box
+ * A toast or a status line above the prompt box
+ * A message or a tool call drawn the plugin’s own way
+
+When a plugin you installed adds or changes something in the panel, a label names it, in phrases such as these:
+
+ * **From the token-chart plugin** : the plugin drew or printed this, or this card is the plugin asking you something
+ * **Edited by the token-chart plugin** : the plugin changed something Claude Code draws, such as a tool call
+ * **Prompt from the token-chart plugin** : the plugin sent this message on your behalf
+
+To stop a plugin from drawing, turn the plugin off in the plugin dialog.
##
@@ -788,6 +836,28 @@
+The panel stops responding each time a reload reopens a conversation
+
+If the whole panel crashes, freezes, or shows only `Something went wrong` each time you reload and your conversation comes back, update the extension to v2.1.301 or later. Then reload the window or restart VS Code again. After the conversation fails to finish opening twice in a row, you get a new chat in its place, with a notice that it was not reopened.
+
+###
+
+
+
+A formula shows as raw LaTeX
+
+If none of the math in Claude’s responses is typeset, check the extension’s version in the Extensions view, because math rendering requires version 2.1.301 or later. If you use terminal mode, which doesn’t typeset math whatever the version, uncheck the [Use Terminal setting](<vscode://settings/claudeCode.useTerminal>) so that Claude Code opens in the chat panel instead. If one formula shows as written while others near it are typeset, check it for these causes:
+
+ * **It reads as something other than math** : `$…$` text that reads as a word stays as written, such as `$O(n log n)$`. `$…$` text that starts with a digit, such as `$30$` or `$1/N$`, also stays as written unless a character such as `=`, `+`, or `^` marks it as math. Ask Claude for a `$$` block on its own lines instead, which the panel typesets without this check.
+ * **It’s padded, long, or split across lines** : `$ x^2 $` with spaces inside the dollars, `$…$` content over 60 characters, and `$…$` or `\(…\)` split across two lines aren’t typeset. Ask Claude for a `$$` block on its own lines instead, which has none of these limits.
+ * **The TeX can’t be typeset** : a formula with a syntax error, a macro definition such as `\newcommand` or `\def`, or an unescaped `%` shows as written. Ask Claude to rewrite it with the error corrected, without the macro, or with `\%` for a percent sign.
+ * **It’s too large** : a formula longer than 8,192 characters, or one that would draw far larger than its source, shows as written. Ask Claude to split it into smaller formulas or to write it more compactly.
+ * **It follows a large amount of math** : within one block of text in a response, the panel typesets formulas in order up to a limit. A later formula that would go past the limit shows as written. Ask Claude to send the formula you need again by itself.
+
+###
+
+
+
Claude Code never responds
If Claude Code isn’t responding to your prompts:
--- a/web-quickstart.md
+++ b/web-quickstart.md
@@ -86,7 +86,7 @@
If you already use the GitHub CLI (`gh`), you can connect GitHub for cloud sessions from your terminal. This requires the [Claude Code CLI](</docs/en/quickstart>). On Team and Enterprise plans, `/web-setup` is available only after an Owner turns on [Quick setup](</docs/en/claude-code-on-the-web#quick-setup-for-team-and-enterprise>). When you run `/web-setup`, Claude Code reads the token that `gh auth token` prints, asks you to confirm, and sends the token to Anthropic. Anthropic stores it encrypted with your claude.ai account, and your cloud sessions use it for GitHub access until you remove it. A cloud session you start yourself can then access any repository that token can access, with no Claude GitHub App installation. Threads in a [project](</docs/en/claude-projects#set-up-github-access>) still need the Claude GitHub App. If you already connected GitHub in the browser, `/web-setup` warns you that continuing replaces that connection for your cloud sessions.
-Organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled, or with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, cannot use `/web-setup` or other cloud session features. If the GitHub CLI isn’t installed or isn’t authenticated, Claude Code opens the browser onboarding flow instead.
+Organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled, or with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, cannot use `/web-setup` or other cloud session features. Organizations that use [customer-managed encryption keys](<https://platform.claude.com/docs/en/manage-claude/cmek>) (CMEK) can’t start cloud sessions either. If the GitHub CLI isn’t installed or isn’t authenticated, Claude Code opens the browser onboarding flow instead.
1