Claude Code 2.1.307 adds API-version migration and MCP reliability fixes
The short version
Anthropic released Claude Code 2.1.307 with an API-version migration command, tool-call safety telemetry, and fixes for duplicate HTTP MCP calls and resumed MCP connections.
What changed
The release adds /claude-api api-version and claude_code.safety_event telemetry, limits HTTP MCP reconnect retries to read-only or idempotent tools, and fixes MCP connections after system sleep.
What it means for you
Teams that maintain Claude API versions, audit tool calls, or run headless MCP workflows can reduce duplicate side effects and diagnose connection failures more clearly.
Anthropic released Claude Code 2.1.307. For teams maintaining API integrations, /claude-api api-version moves Claude API code to the 2026-10-21 version. The release also adds the claude_code.safety_event OpenTelemetry event for decisions by permission rules, auto mode, safety checks, hooks, or the sandbox that stop, prompt, or return a tool call.
The MCP reliability changes matter more directly to automated workflows. If an HTTP MCP connection closes during a call, Claude Code now retries only read-only or idempotent tools, avoiding a duplicate send of a potentially side-effecting request. It also fixes MCP servers being reported as timed out and remaining failed after a sleeping macOS or Linux computer resumes while they connect.
Upgrade in a non-production environment first, then check telemetry ingestion, MCP idempotency markings, and resumed connections. These changes reduce duplicate-call and diagnostic risk, but do not replace tool permissions, approvals, or operational audit trails.
Fact check
- VerifiedClaude Code 2.1.307 adds /claude-api api-version for moving Claude API code to API version 2026-10-21 and emits claude_code.safety_event for tool-call safety decisions.Evidence
- VerifiedThe release prevents non-idempotent HTTP MCP tool calls from being retried after a mid-call connection close and fixes MCP connection state after a sleeping Mac or Linux computer resumes.Evidence
Coverage timeline
- Primary sourceAnthropicClaude Code v2.1.307 release notes