Claude Code 2.1.307 and 2.1.308: safety-event telemetry and a double-sent MCP call fix
Claude Code 2.1.307 stops HTTP MCP tool calls being sent twice. Its new claude_code.safety_event telemetry was withdrawn again in 2.1.312.
Claude Code 2.1.307 landed on 21 October 2026 at 22:16 UTC and 2.1.308 followed on 22 October at 04:34 UTC. Upgrade for 2.1.307 because it fixes HTTP MCP tool calls being sent twice when a connection closed mid-call; it also added a claude_code.safety_event OpenTelemetry event, which 2.1.312 then stopped Claude Code sending on 27 October. 2.1.308 carries a single changelog line, "Bug fixes and reliability improvements", so there is nothing specific in it to check.
#What is new in Claude Code 2.1.307?
Four additions and a long list of fixes. Two of the additions are to the CLI itself, in the changelog's own words:
- "Added the
claude_code.safety_eventOpenTelemetry event for each tool call a permission rule, auto mode, a safety check, a hook or the sandbox stopped, prompted or sent back" - "Added
/claude-api api-versionto move Claude API code to API version2026-10-21"
The other two are @claude review stop for Code Review, in the table below, and a notice in the VS Code extension on the microphone button when voice dictation stops by itself, saying why and that the text so far is kept.
The changes worth knowing about, grouped by who they affect:
| Area | What the changelog says | Who should care |
|---|---|---|
| HTTP MCP | "Fixed HTTP MCP tool calls being sent twice when the connection closed mid-call; only read-only or idempotent tools are now retried" | Anyone running an HTTP MCP server with tools that write |
| MCP on macOS | Servers showed "needs authentication" in claude -p while the login keychain was locked; "they now say why, and the next run after an unlock connects without a new sign-in" | Headless and scripted runs on macOS |
| MCP and sleep | Servers were "reported as timed out, and staying failed in headless runs, when a macOS or Linux computer went to sleep while they were connecting" | Long-running local sessions |
| Self-hosted runner | Checkout hooks are "stopped after 30 minutes by default, failing the session's setup" | Anyone with a slow checkout hook |
| 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" | Teams using automatic PR review |
| Tool-call recovery | "Claude Code now retries the call up to twice before ending the turn with an error" on unparseable tool calls | Everyone |
#What happened to the safety_event telemetry?
The changelog describes a single event emitted "for each tool call a permission rule, auto mode, a safety check, a hook or the sandbox stopped, prompted or sent back". That is five different sources of intervention collapsed into one stream, which was the appeal: a reviewer piecing together why a call did not run had to join several event types together.
It did not last. The changelog entry for 2.1.312, which the dated feed puts at 27 October 2026 at 20:23 UTC, reads: "Changed Claude Code to stop sending the claude_code.safety_event OpenTelemetry event". The OpenTelemetry events reference now carries the event and its withdrawal together, and it is specific about which sessions still emit it. On v2.1.312 and later the event is not sent and "no setting turns it on". On v2.1.307 through v2.1.311, "a session stops sending the event at its next feature-flag refresh", and a session that does not fetch feature flags, which the reference gives as Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry, "can keep sending it".
Where it does still arrive, the reference documents its shape in full, which is worth knowing if you are reading events you already collected. category is "The check or outcome"; decision is "accept", "reject", or "sent_back" "when a hook blocked a result or turn end"; decision_source is "Who or what decided", taking a tool_decision source value or other; and reason_code and reason_type name the check's reason and its type, with values such as rule:policySettings, mode:dontAsk, hook:PreToolUse and classifier:auto-mode. The event's own attributes carry no command text, file paths, host names or MCP server and tool names, so the reference tells you to set OTEL_LOG_TOOL_DETAILS=1 and read tool_parameters on the matching tool_decision event to see what a call actually was.
For an audit pipeline you intend to keep, build on claude_code.tool_decision, which the reference describes as "Logged when a tool permission decision is made (accept/reject)", with a decision attribute that is "Either accept or reject" and a source attribute naming where the decision came from. The reference now sends readers there itself: "To see refused tool calls, query tool_decision events, which show that a call was refused but not always which check refused it." That caveat is the gap the safety event was going to close, and for the moment it is still open.
Want step-by-step guides for this and more?
ClawDocx Pro includes 500+ curated prompts, setup guides, SKILL.md files, and templates — everything to make your AI agent unstoppable.
See plans & pricing#Which fix should you check before you upgrade?
The duplicate HTTP MCP tool call, and it is worth being blunt about why. The changelog entry reads: "Fixed HTTP MCP tool calls being sent twice when the connection closed mid-call; only read-only or idempotent tools are now retried."
A duplicate here was not a duplicated log line. It was a second call to the server, which for a tool that writes a row, sends a message or charges something means the action happened twice. The fix narrows the retry to read-only or idempotent tools, so the risk goes away on upgrade, but if you run an HTTP MCP server with write tools it is worth looking back through its own logs for pairs of identical calls rather than assuming nothing landed twice. Your server's logs are the record here, not Claude Code's.
Two other MCP fixes in the same release are about servers that failed because of the state of the computer rather than the server: the macOS keychain case, where a locked login keychain made servers report "needs authentication", and the sleep case, where servers connecting while a machine slept were reported as timed out and stayed failed in headless runs. If you have been restarting MCP servers that failed for no visible reason, those are the entries to read. For how MCP sits beside Claude Code's other extension points, see our guide to skills, subagents, plugins and MCP.
#What changes if you run a self-hosted runner?
A default that can fail a session that used to work. The changelog says checkout hooks are now "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".
Check your hook's real duration before upgrading rather than finding out from a failed session. Two further runner fixes landed with it: a session using --use-anthropic-git-proxy committing a .claude/settings.local.json left in the clone by an earlier session, and archiving, requeueing or stopping a runner during its checkout hook leaving the hook's processes running and the runner's slot held.
It is not the only change in this release that can break a setup that worked. The certificate file built for Anthropic-managed git now filters "its trusted certificates as the CLI does; a [runner:warn] line gives the number left out", so a runner that relied on a certificate the CLI drops loses it, and that warning line is where the count appears.
Accessibility settings moved too, and the changelog dates that change to 2.1.305, two releases before this one: the axScreenReader setting and CLAUDE_AX_SCREEN_READER in a settings env block now "apply only from user, managed or --settings settings (since 2.1.305)". A project-level setting that used to turn screen reader mode on no longer does.
#What should you do today?
- If you run an HTTP MCP server with write tools: upgrade, then check that server's own logs for duplicate calls from before the fix.
- If you collect Claude Code telemetry: do not build alerts on
claude_code.safety_event. 2.1.312 stopped Claude Code sending it, and the events reference documents the withdrawal beside the event; queryclaude_code.tool_decisioninstead. - If you run a self-hosted runner: measure your checkout hook against the new 30-minute default first, and raise
--checkout-hook-timeout-minor set it to0if it needs longer. - If you use
@claude review alwayson pull requests:@claude review stopnow ends the subscription without starting another review. - If none of those apply: 2.1.308 is bug fixes only, so there is no urgency, and nothing in either release asks you to change a configuration file.
For the previous release in this series, see our write-up of Claude Code 2.1.304. For permission rules, hooks and the sandbox that the new event reports on, start with our security hardening guide. For what Claude Code is and what it runs on, start at our Claude Code hub. Everything above was checked against the Claude Code changelog, its dated feed and the OpenTelemetry events reference, most recently on 14 November 2026.
Frequently asked questions
- What is the claude_code.safety_event telemetry event?
- Claude Code 2.1.307 added it for each tool call that a permission rule, auto mode, a safety check, a hook or the sandbox stopped, prompted or sent back. It is being withdrawn: the changelog for 2.1.312 records that Claude Code was changed to stop sending it, and the OpenTelemetry events reference now documents the event and its withdrawal together. Where it does still arrive, the reference gives its shape, and the attributes an audit query would read are category, decision, decision_source, reason_code and reason_type.
- Were MCP tool calls really being run twice?
- The changelog for 2.1.307 says HTTP MCP tool calls were being sent twice when the connection closed mid-call, and that only read-only or idempotent tools are retried now. If you run an HTTP MCP server with tools that write, send or charge, that is the entry to read first, because the duplicate was a second real call rather than a duplicated log line.
- What changed for self-hosted runners in Claude Code 2.1.307?
- Checkout hooks are now stopped after 30 minutes by default, and a hook that hits the limit fails the session's setup. The changelog says to raise --checkout-hook-timeout-min or set it to 0 if yours needs longer. Two related fixes also landed: a leftover .claude/settings.local.json being committed, and archiving or requeueing a session, or stopping the runner, during a checkout hook leaving the hook's processes running and the runner's slot held.
- What is in Claude Code 2.1.308?
- One line: "Bug fixes and reliability improvements". The release carries no itemised entries in the changelog, so there is nothing specific to check before taking it. It was published on 22 October 2026 at 04:34 UTC, about six hours after 2.1.307.
- Do I have to upgrade right away?
- Only if one of the fixes affects you. The duplicate HTTP MCP tool call is the strongest reason, followed by the macOS keychain and sleep fixes if your MCP servers fail in headless runs. If you run a self-hosted runner with a long checkout hook, read the new 30-minute default before you upgrade rather than after.