Claude Code's /claude-api now moves your code to the new Claude API version

2 hours ago

Claude Code v2.1.306 to v2.1.307: /claude-api api-version moves Claude API code to API version 2026-10-21. Also: MCP servers that recover after sleep, a locked keychain or a dropped connection; fewer compaction errors in long sessions; an OpenTelemetry event for every stopped tool call; @claude review stop for Code Review. https://github.com/anthropics/claude-code/releases/tag/v2.1.306 https://github.com/anthropics/claude-code/releases/tag/v2.1.307 https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00/claude-api api-version
  2. 0:14MCP servers that stay connected
  3. 0:30Long sessions
  4. 0:47OpenTelemetry safety events
  5. 1:03Fixes you may have hit
  6. 1:17@claude review stop
  7. 1:28The full changelog
Show transcript

/claude-api api-version

Claude Code

/claude-api now moves your Claude API code to API version 2026-10-21

New command
/claude-api api-version
Target
Claude API version 2026-10-21
In /help
bundled skills show their short description
Release v2.1.307 · anthropics/claude-code

Claude Code's /claude-api skill gains an API version command. It moves your Claude API code to the API version dated October 21, 2026. And /help now shows the skill's short description.

MCP servers that stay connected

Claude Code

>MCP servers recover from sleep, a locked keychain and a dropped connection

After sleep
servers that were connecting no longer stay timed out
Locked keychain
claude -p on macOS says why, then connects after an unlock
Dropped connection
HTTP tool calls are not sent twice; only read-only or idempotent tools retry
Release v2.1.307 · anthropics/claude-code

Three MCP failures are fixed. Servers recover after your computer sleeps, a locked Mac keychain gets a reason instead of a sign-in prompt, and a dropped connection no longer sends a tool call twice.

Long sessions

Claude Code

>Fewer turns end on compaction errors or a malformed tool call

Many MCP tools
the real API error shows, not “prompt is too long”, and no needless compaction
Large reads
fewer “Autocompact is thrashing” errors after many PDF pages or images
Unparseable tool call
retried up to twice before the turn ends
Releases v2.1.306 and v2.1.307 · anthropics/claude-code

Long sessions end early less often. With many MCP tools you see the real API error instead of prompt is too long. Reading lots of PDF pages trips autocompact less, and a garbled tool call gets two retries.

OpenTelemetry safety events

Claude Code

>Every stopped tool call now sends an OpenTelemetry event

Event
claude_code.safety_event
Sent when
a permission rule, auto mode, a safety check, a hook or the sandbox stops, prompts or sends back a tool call
/permissions
Recently denied now shows the denied shell command
Release v2.1.307 · anthropics/claude-code

If you watch Claude Code through OpenTelemetry, each tool call a permission rule, auto mode, a hook or the sandbox stops now sends a safety event. And Recently denied in /permissions shows the actual command.

Fixes you may have hit

Claude Code

>Fixed: opus[1m] aliases, slow model switches, claude -p in cloud sessions

opus[1m]
no model-not-found error with CLAUDE_CODE_DISABLE_1M_CONTEXT set
setModel()
the Agent SDK waits up to 15 seconds for the API, up from 5
claude -p
no “Not logged in” in a cloud session started without its environment variables
Releases v2.1.306 and v2.1.307 · anthropics/claude-code

An alias like opus one M stops failing when the million-token context is turned off. Agent SDK model switches wait 15 seconds instead of 5. And print mode in cloud sessions stops saying Not logged in.

@claude review stop

Claude Code

>@claude review stop ends Code Review on a pull request

Ends
an @claude review always subscription
Same as
@claude review off and @claude review pause
Does not
start a new review
Release v2.1.307 · anthropics/claude-code

On a pull request, at Claude review stop ends an always-on Code Review subscription. Off and pause do the same, and none of them starts a new review.

The full changelog

Claude Code

Every change is in the Claude Code changelog

https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

CHANGELOG.md in anthropics/claude-code

Which Claude API version is your code on today?

Releases v2.1.306 and v2.1.307 · anthropics/claude-code

The Claude Code changelog has the rest, including VS Code dictation and cloud session fixes. So, which Claude API version is your code on today?

Up next

1:30

Claude Code v2.1.305 works again on Vertex and Bedrock, and its Linux sandbox can run Chromium

@claude-code · 1 day ago

1:35

Claude Code’s /auto-mode-setup teaches auto mode your project, and resume warns before it eats your 5-hour limit

@claude-code · 2 days ago

1:54

Claude Code v2.1.302 turns fork subagents on in the Agent SDK and VS Code, and standalone Claude Design closes December 14

@claude-code · 5 days ago

1:36

Claude Code v2.1.301: switching to a smaller model now summarizes your long conversation first

@claude-code · 6 days ago

2:06

Claude Code v2.1.300: one rejected MCP tool no longer fails every turn of your conversation

@claude-code · 1 week ago

1:53

Claude Code v2.1.299: come back from a break without reprocessing your whole session

@claude-code · 1 week ago

1:46

Claude Code v2.1.296: Claude can read a large file in one call

@claude-code · 1 week ago

1:36

Claude Code: hooks can now block an action when they fail

@claude-code · 1 week ago

1:39

Claude Code v2.1.293: Claude Haiku 5.5 becomes the default Haiku model, and finished work stays finished after a compaction

@claude-code · 1 week ago

1:32

Claude Code: subagents run at the effort you ask for, plugins install from a marketplace in one command, and network-path reads ask first

@claude-code · 2 weeks ago

1:23

Claude Code v2.1.290: WebSearch refills by the hour, WebFetch says what it left unread, and scheduled tasks stop going missing

@claude-code · 2 weeks ago

1:25

Claude Code v2.1.289: Bash deny rules hold under sandbox auto-allow, and a failing plugin no longer ends your session

@claude-code · 2 weeks ago