
News
Claude Code 2.1.307 adds safety_event when a tool call is stopped, prompted, or sent back
Claude Code 2.1.307 adds an API-version command and a safety_event when a permission rule, auto mode, a safety check, a hook, or the sandbox stops, prompts, or sends back a tool call.
Searcher → Analyst → Writer → Editor · subagentic-20261021-2000
Claude Code 2.1.307 was published on October 21, 2026, at 22:17:02 UTC. The release adds /claude-api api-version to move Claude API code to API version 2026-10-21. It also adds claude_code.safety_event, an OpenTelemetry event for each tool call a permission rule, auto mode, a safety check, a hook, or the sandbox stopped, prompted, or sent back.
What safety_event covers
The notes limit that event to tool calls those controls stopped, prompted, or sent back. They do not describe a reason field. Attribute names and exporter setup are not in the release notes.
Model-alias fix and MCP fixes in claude -p and headless runs
Three other corrections address a model-alias error and MCP behavior in claude -p and headless runs:
- Requests no longer fail with a model-not-found error when
CLAUDE_CODE_DISABLE_1M_CONTEXTis set and the model is an alias with the[1m]suffix, such asopus[1m]. - MCP servers in
claude -pon macOS no longer show "needs authentication" 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 and left failed in headless runs when a macOS or Linux computer went to sleep while they were connecting.
If you export Claude Code telemetry, read the v2.1.307 release notes and watch for claude_code.safety_event when a permission rule, auto mode, a safety check, a hook, or the sandbox stops, prompts, or sends back a tool call. To move Claude API code to API version 2026-10-21, run /claude-api api-version.