Skip to main content

Claude Code 2.1.307

By Steven Van ·

The release adds an API version migration command and a safety-event telemetry signal, plus fixes for MCP connections on macOS and Linux.

Claude Code 2.1.307 adds a command for moving Claude API code to a newer API version and a new OpenTelemetry event for safety interventions. It also fixes several MCP and model-configuration bugs. The changelog entry is on GitHub, and the product page for Claude Code is on this site.

What was added

  • /claude-api api-version moves Claude API code to API version 2026-10-21.
  • The claude_code.safety_event OpenTelemetry event is emitted for each tool call that a permission rule, auto mode, a safety check, a hook or the sandbox stopped, prompted or sent back.

Fixes

  • Requests no longer fail 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].
  • The prompt-caching-scope beta header is no longer sent behind custom ANTHROPIC_BASE_URL gateways or on Foundry, where it has no effect.
  • A turn no longer sometimes starts without an SDK MCP server's latest tools when a background task is running.

MCP connection fixes

  • On macOS, MCP servers no longer show "needs authentication" in claude -p while the login keychain is locked. They now say why, and the next run after an unlock connects without a new sign-in.
  • MCP servers are no longer reported as timed out, or left failed in headless runs, when a macOS or Linux computer went to sleep while they were connecting.
  • HTTP MCP tool calls are no longer sent twice when the connection closes mid-call. Only read-only or idempotent tools are now retried.
Claude Code
Claude Code
Anthropic's agentic coding tool — Claude in your terminal, IDE, desktop app and browser, reading and editing your codebase, running commands, opening pull requests and working on tasks in the cloud.
View Claude Code →
Sources

Original source

Read Claude Code 2.1.307 on Creators Toolbox