usage

Claude Code 2.1.307

Tools and page contents
On this page

New 8

01

Code Review adds stop commands to end automatic PR reviews

After you enable automatic reviews on a GitHub pull request, you often do not need the bot to step in again once the feature has been tested and is ready to merge. ⟦Canceling a daily milk delivery used to mean contacting customer service and possibly receiving milk for another day. Now deliveries stop as soon as the cancellation is processed, without an extra bottle arriving at your door that day.⟧ Code Review now supports @claude review stop, along with @claude review off and @claude review pause. These commands directly end the @claude review always subscription for that pull request without triggering another review. As you prepare to merge the code, you can wrap things up without extra review comments getting in the way.

Original changelog

[Code Review] Added @claude review stop (also off and pause) to Code Review, ending an @claude review always subscription on a pull request without starting a new review

02

Built-in command menus show shorter descriptions and add API version switching

When you press / in the terminal or enter /help to look up features, a tidy display directly affects how quickly you can find a command. For built-in skills such as /claude-api, the list previously displayed lengthy instructions written for the model, making the menu cumbersome. ⟦When readers browsed a reference book's index, entries used to be crowded with long notes intended for typesetters and proofreaders. Those notes have now been replaced with short summaries, leaving the layout clear and easy to read.⟧ The menu now shows concise descriptions written for users, making it easier to read. If you need to migrate your project's Claude API code to version 2026-10-21, enter /claude-api api-version to make the switch quickly.

Original changelog

Added /claude-api api-version to move Claude API code to API version 2026-10-21

Fixed /help and the / command menu showing long model-facing descriptions for bundled skills such as /claude-api instead of their short descriptions

03

Safety events gain telemetry tracking, and permission lists identify denied commands

When you control tools through auto mode or safety rules, the details of blocked actions and the approval process are now clearer. Whenever permission rules, auto mode, safety checks, hooks (small programs triggered by specific events), or the sandbox block a tool call, prompt for approval, or send it back, OpenTelemetry records a claude_code.safety_event telemetry event. Previously, the Recently denied view in /permissions did not show denied shell commands, and auto mode's local classifier ignored approvals made there when reviewing retried commands. Approval records now identify the specific command rather than giving an abstract description. When the web search budget runs out, the notification also tells Claude not to turn to external search engines through the browser or computer use (operating a computer's interface). Previously, it was difficult to trace the original command after it was blocked, and an approved retry could be blocked again. Now each safety check leaves a record, and command approvals take effect correctly.

Original changelog

Added the claude_code.safety_event OpenTelemetry event for each tool call a permission rule, auto mode, a safety check, a hook or the sandbox stopped, prompted or sent back

Fixed /permissions > Recently denied not showing the denied shell command, and auto mode's local classifier ignoring an approval from there when it checks a retried command; approving a row now names the command, not its description

Changed the notice Claude gets when the WebSearch budget is used up to also tell it not to query search engines in a browser or through computer use

04

Subagents avoid duplicate assignments, and malformed tool calls can retry automatically

If you use subagents or the Agent SDK for complex multitasking workflows, several safeguards for asynchronous collaboration have been strengthened. Multiple fork subagents launched at the same time now receive explicit identities when dispatched, making them less likely to take each other's assignments. ⟦When a factory foreman assigned several workers to assemble something together, workers used to compete for the same work order. Now each worker clearly receives a dedicated job card and actively asks for clarification when instructions are unclear, up to two times.⟧ Tool calls that cannot be parsed now retry up to two times. An error is reported and the turn ends only if parsing still fails. In transcripts, streaming responses no longer include placeholder token (a unit of text AI processes and bills for) counts or empty stop reasons. When switching models through the SDK's setModel(), the wait for confirmation has also been extended from 5 seconds to 15 seconds. These changes reduce unexpected interruptions in automated workflows and help complex schedules run more smoothly.

Original changelog

Fixed subagent transcripts recording placeholder token usage and an empty stop reason for streamed responses

Fixed model switches through the Agent SDK's setModel(), and apps built on it, being refused when the API took more than 5 seconds to confirm the model; Claude Code now waits up to 15 seconds

Improved recovery from unparseable tool calls: Claude Code now retries the call up to twice before ending the turn with an error

Improved fork subagents launched together: each is now told which launch is its own, so forks are much less likely to try to start each other's work

05

Browser sign-in shows success immediately, and remote and cloud connections are faster

When you sign in through a browser or use remote connections, several changes improve waiting times and status reporting. As soon as browser sign-in finishes, the browser now immediately shows a success page without waiting for account profile data to load. In cloud sessions, the wait for the first response is shorter when one of the desktop app's MCP servers can't connect. Remote Control connections also start faster when the conversation transcript contains large pasted images or PDF content that has been read. When archiving an idle session through the desktop app stops a background command, the notification clearly identifies the output filename and no longer incorrectly tells Claude that the user stopped it manually.

Original changelog

Fixed a background command stopped through a connected app (such as the desktop app archiving an idle session) being reported to Claude as stopped by the user; the notice now names its output file

Improved browser sign-in: the success page now appears as soon as sign-in completes, without waiting for your account profile to load

Improved the time to the first reply in cloud sessions when one of the desktop app's MCP servers can't connect

Improved Remote Control connect time for sessions whose transcript contains large pasted images or PDF reads

06

Cloud search shows live progress, and web fetch failures return normal results

When you select a repository in the cloud or have Claude fetch web content, several interface states and error messages now more accurately reflect what is happening. The repository picker explicitly shows “Searching…” while a search is running, instead of prematurely showing a false “No repositories match” message before results arrive. In self-hosted environments, the “Waiting for a runner” message is no longer cut off. For on-demand runners, it also shows the seconds spent waiting since your last message and the number of failures. For web fetching, when a website returns a 4xx status code or robots.txt blocks access, WebFetch in Cowork cloud sessions now presents this as a normal result, as it does locally, instead of raising a tool error. In cloud or self-hosted runner sessions, when a search is denied with a 403 response that includes a reason, that reason is now shown instead of just “Authentication error”.

Original changelog

Fixed WebFetch in Cowork cloud sessions reporting a tool error when a site answered with a 4xx status or a robots.txt refusal; it is now a normal result, as in local sessions

Improved web search errors in cloud and self-hosted runner sessions: a search refused with a 403 that gives a reason now shows that reason instead of a generic "Authentication error"

[Cloud sessions] Fixed the repository picker saying "No repositories match" while a search was still running; it now shows "Searching…" until the results arrive

[Cloud sessions] Fixed the "Waiting for a runner" status on self-hosted environments being cut off; with on-demand runners it now counts up from your last message and shows failed attempts

07

Self-hosted runners add a default hook timeout and prevent leftover processes from occupying slots

If you run automation on a self-hosted runner, there are four changes to note in this release. Checkout hooks (small programs triggered by specific events) during project preparation now have a default limit of 30 minutes, after which setup is marked as failed. If a task needs longer, use --checkout-hook-timeout-min to extend the limit or set it to 0 to remove the limit. Previously, archiving or requeuing a session while a hook was running, or stopping the runner, left the hook's process running and kept the runner's slot occupied. This has been fixed. With --use-anthropic-git-proxy enabled, .claude/settings.local.json left over from a previous session is also no longer mistakenly committed to version control. When creating certificate files for Anthropic-managed Git, the runner now filters trusted certificates the same way as the CLI and logs the number excluded with [runner:warn].

Original changelog

Self-hosted runner: Fixed sessions with --use-anthropic-git-proxy committing a .claude/settings.local.json left in the clone by an earlier session

Self-hosted runner: Fixed archiving or requeueing a session, or stopping the runner, during its checkout hook leaving the hook's processes running and the runner's slot held

Self-hosted runner: Changed checkout hooks to be stopped after 30 minutes by default, failing the session's setup; if yours needs longer, raise --checkout-hook-timeout-min or set it to 0

Self-hosted runner: Changed the certificate file built for Anthropic-managed git to filter its trusted certificates as the CLI does; a [runner:warn] line gives the number left out

08

VS Code voice dictation adds stop explanations and improves TLS certificate support

When you dictate coding requirements into a microphone in VS Code, automatic stopping and compatibility with corporate network certificates now work more reliably. If voice dictation stops automatically after 15 consecutive seconds without recognized speech or upon reaching the 2-minute limit, the microphone button displays an explanation and confirms that everything you dictated has been preserved. On proxy networks with TLS inspection, setting NODE_EXTRA_CA_CERTS only in ~/.claude/settings.json could cause dictation connections to fail. This is now fixed, and dictation also follows CLAUDE_CODE_CERT_STORE. Voice dictation and the extension’s own requests now filter trusted certificates the same way the CLI does. The extension’s own requests also trust the NODE_EXTRA_CA_CERTS certificate file specified through environment variables or user settings.

Original changelog

[VSCode] Added a notice on the microphone button when voice dictation stops by itself (15 seconds without recognized speech, or the 2-minute limit), saying why and that the text so far is kept

[VSCode] Fixed dictation failing behind a TLS-inspecting proxy when NODE_EXTRA_CA_CERTS is set only in ~/.claude/settings.json; it now also follows CLAUDE_CODE_CERT_STORE

[VSCode] Changed voice dictation to filter its trusted certificates as the CLI does

[VSCode] Changed the extension's own requests to filter their trusted certificates as the CLI does, and to trust the NODE_EXTRA_CA_CERTS file named in the environment or in user settings

Fixed 4

09

MCP connection and sleep timeout fixes prevent duplicate write requests

If you rely on MCP (a protocol that connects AI to external tools) for added functionality, the following connection problems have been fixed. On macOS, if the login keychain is locked, claude -p explains why authentication is blocked. After unlocking it, the next run can connect without requiring you to log in again. Previously, if a macOS or Linux computer went to sleep while connecting to an MCP server, the server was reported as timed out and continued to appear failed in headless mode (running without a visual interface). This has been fixed. If an HTTP call loses its connection midway, automatic retries are now limited to tools that are read-only or idempotent (repeating the operation does not change the result), preventing writes from being triggered twice. A new conversation turn sometimes failed to get the latest tools from SDK MCP servers while background tasks were running; this has been fixed. In the desktop app's Code tab, write tools from directly configured GitHub MCP servers showed a form that closed without creating anything. This has also been fixed.

Original changelog

Fixed MCP servers showing "needs authentication" in claude -p on macOS while the login keychain was locked; they now say why, and the next run after an unlock connects without a new sign-in

Fixed MCP servers being reported as timed out, and staying failed in headless runs, when a macOS or Linux computer went to sleep while they were connecting

Fixed HTTP MCP tool calls being sent twice when the connection closed mid-call; only read-only or idempotent tools are now retried

Fixed a turn sometimes starting without an SDK MCP server's latest tools when a background task was running

Fixed write tools on a directly configured GitHub MCP server showing a form that closed without creating anything in the desktop app's Code tab

10

Custom gateway header and telemetry fixes improve model setting handling

If you use a custom ANTHROPIC_BASE_URL gateway (an intermediary service that forwards connection requests) or Foundry, the invalid prompt-caching-scope header is no longer sent. Claude apps gateway sessions no longer ignore CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS. Telemetry rejection after setting OTEL_EXPORTER_OTLP_HEADERS in their Claude Desktop sessions has been fixed. Using CLAUDE_CODE_DISABLE_1M_CONTEXT with a model alias containing [1m] no longer produces a model-not-found error. Artifact reads no longer produce connection reset errors when the server has closed a reused connection. Starting with 2.1.305, axScreenReader and CLAUDE_AX_SCREEN_READER in the env block take effect only from user settings, managed settings, or --settings.

Original changelog

Fixed requests failing with a model-not-found error when CLAUDE_CODE_DISABLE_1M_CONTEXT is set and the model is an alias with the [1m] suffix, such as opus[1m]

Fixed the prompt-caching-scope beta header being sent behind custom ANTHROPIC_BASE_URL gateways and on Foundry, where it has no effect

Fixed CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS being ignored in Claude apps gateway sessions

Fixed telemetry from Claude Desktop sessions behind a Claude apps gateway being rejected when OTEL_EXPORTER_OTLP_HEADERS is set

Fixed Artifact tool reads failing with a connection reset when the server had closed a reused connection

Changed the axScreenReader setting and CLAUDE_AX_SCREEN_READER in a settings env block to apply only from user, managed or --settings settings (since 2.1.305)

11

Fixes reduce autocompaction thrashing and keep cleared messages from returning after restarts

In long conversations with lots of charts and other data, the way message history is compressed and cleared determines whether the conversation can continue smoothly. ⟦When an office shredder handled a thick book of design drawings, feeding in too many large sheets used to make it repeatedly jam and reverse. Even an emptied waste bin would spit out old drafts after the power was turned back on. Now there are fewer jams, and an emptied bin no longer spits out old drafts.⟧ Previously, reading many PDF pages, images, or large tool outputs in a single turn could cause an “Autocompact is thrashing” error, meaning automatic compaction was repeatedly oscillating. Some of these cases have been fixed. In cloud sessions, a custom /autocompact window range no longer resets to its default after the session restarts. Conversation history cleared with /clear also no longer unexpectedly returns after a cloud or self-hosted runner restarts.

Original changelog

Fixed some "Autocompact is thrashing" errors in turns that read many PDF pages, images or other large tool results

Fixed /autocompact in cloud sessions going back to the default window after the session restarted

Fixed a conversation cleared with /clear sometimes coming back when a cloud or self-hosted runner session restarted

12

VS Code limits expanded prompt height and fixes pasted LaTeX formatting

Writing complex instructions or organizing notes with Claude Code in VS Code now feels smoother, with better conversation layouts and text pasting. Previously, clicking Show more to expand a long prompt made the entire input card take over the conversation panel. Pinned prompts are now limited to 40% of the panel’s height, with a scrollbar appearing automatically when the content exceeds that limit. When you copy list items or table cells containing LaTeX equations into a rich text editor, they no longer get incorrectly split into new lists or tables. The “still open somewhere else” notice now clearly identifies Claude background processes left over after an extension restart and explains that they usually exit on their own within about 10 minutes. Previously, expanding long text obscured the conversation history, and pasting equations could break their formatting. With more stable layout boundaries, editing and reviewing no longer get in each other’s way.

Original changelog

[VSCode] Fixed a long prompt expanded with Show more covering the whole chat panel: a pinned prompt is now capped at 40% of the panel and scrolls

[VSCode] Fixed part of a list item or table cell with LaTeX math pasting as a new list or table in rich text editors

[VSCode] Changed the "still open somewhere else" notice to also cover a Claude process left over from an extension restart, which usually ends on its own within about 10 minutes