Claude Code v2.1.307: /claude-api Version Control, Safety Event Telemetry, and MCP Reliability Fixes
Claude Code v2.1.307 ships two developer-facing additions — API version pinning for Claude API code and per-tool-call safety telemetry — alongside a long list of MCP, runner, and session-state fixes.
New: API version pinning and safety event telemetry
/claude-api api-versionmoves Claude API code to API version2026-10-21. Useful when you need generated API calls to target a specific dated version rather than whatever the model defaults to.- A new OpenTelemetry event,
claude_code.safety_event, fires for each tool call that a permission rule, auto mode, a safety check, a hook, or the sandbox stopped, prompted, or sent back. That gives you a structured trail of every intervention in your agent loops instead of inferring it from transcripts.
Notable fixes
- 1M context aliases: requests no longer fail with model-not-found when
CLAUDE_CODE_DISABLE_1M_CONTEXTis set and the model is an alias with the[1m]suffix, e.g.opus[1m]. - Prompt caching: the
prompt-caching-scopebeta header is no longer sent behind customANTHROPIC_BASE_URLgateways or on Foundry, where it had no effect. - MCP auth on macOS:
claude -pno longer reports "needs authentication" when the login keychain is locked — it says why, and the next run after unlock connects without a new sign-in. - MCP sleep/timeout: servers that were mid-connect while a macOS or Linux machine slept are no longer reported as timed out and stuck failed in headless runs.
- HTTP MCP double calls: tool calls are no longer sent twice when the connection closes mid-call; only read-only or idempotent tools are retried.
- SDK MCP tools: a turn no longer starts without an SDK MCP server's latest tools when a background task was running.
- Autocompact: reduced "Autocompact is thrashing" errors in turns that read many PDF pages, images, or large tool results;
/autocompactin cloud sessions also keeps its window across restarts. - /clear persistence: a conversation cleared with
/clearno longer reappears after a cloud or self-hosted runner session restarts. - Agent SDK
setModel(): model switches are no longer refused when the API takes more than 5 seconds to confirm — Claude Code now waits up to 15 seconds. - Permissions UI:
/permissions > Recently deniednow shows the denied shell command, and approving a row names the command rather than its description; auto mode's local classifier now honors that approval on a retried command. - GitHub MCP write tools: fixed a form that closed without creating anything in the desktop app's Code tab when the server is configured directly.
Other improvements
- Unparseable tool calls are retried up to twice before the turn ends with an error.
- Fork subagents launched together are each told which launch is their own, reducing cross-started work.
- Browser sign-in shows the success page as soon as sign-in completes, without waiting on the account profile.
- Web search 403 errors in cloud and self-hosted runner sessions now surface the server's reason instead of a generic "Authentication error".
- Remote Control connect time improved for sessions with large pasted images or PDF reads.
- The WebSearch budget-exhausted notice now also tells Claude not to query search engines via a browser or computer use.
Self-hosted runner users get two specific fixes: --use-anthropic-git-proxy sessions no longer commit a .claude/settings.local.json left in the clone by an earlier session, and archiving or requeueing a session during its checkout hook no longer leaves hook processes running and the runner's slot held.
📖 Read the full source: GitHub Claude-Code
👀 See Also

Claude Corps: Anthropic's $150M National Fellowship for Nonprofit AI
Anthropic launches Claude Corps, a 12-month paid fellowship placing 1,000 early-career fellows at nonprofits to build AI tools using Claude. $150M budget, $85k salary, expert mentorship.
Man Attempts Prompt Injection in Court Filings, Judge Finds It 'Dangerous'
A Connecticut judge sanctioned a man for hiding prompt injection text in court filings, marking the first known case of the tactic in a US court.

Fine-tuned Qwen2.5-7B to 96% of Claude Haiku with $3 and Zero Human Labelers
A developer fine-tuned Qwen2.5-7B to 96% of Claude Haiku's performance on a domain-specific decision-reasoning task using only $3 in API calls and zero human labelers, using a novel DV-DPO method.

ThinkPad's 34-Year Run: From IBM 700C to Lenovo AI Workstations
ThinkPad has shipped continuously since 1992 under IBM and Lenovo, with visual continuity from the 700C to the 2026 P14s Gen 6 AMD that runs 70B LLM workloads locally.