Claude Code 2.1.317 lets SDK hook failures block, and asks before sending your email
Claude Code 2.1.317 adds a fail-closed option for Agent SDK hook callbacks and a prompt before tool calls send an account email to the network. Teams running hooks or runners should check.
what changed
Claude Code 2.1.317 was listed on 3 November 2026. These are the changes that matter most for teams:
- Agent SDK hook callbacks accept
onFailure: "block". A callback that fails now blocks the action instead of letting it run. - Claude Code asks before a web or shell tool call sends your account email address to the network.
- OpenTelemetry metrics, events and spans gained
anthropic.plan,anthropic.seat_type,anthropic.providerandanthropic.custom_base_url. - A
claude -prun inside a cloud or self-hosted runner session no longer shares that session’s ID or writes into its transcript. SettingCLAUDE_CODE_DISABLE_NESTED_SESSION_ID=1on a self-hosted runner brings back the earlier behaviour. - The Read tool no longer returns a “file unchanged since your last Read” stub. Reading an unchanged file again returns its content.
why it matters
Until now, a hook callback that crashed let the action go ahead. For a hook that enforces policy, such as a check before a shell command, that is a quiet hole. The new option closes it, but only where you set it.
The email prompt matters for teams that run Claude Code with network access. It shows when a tool call is about to send an identity out.
Teams that call claude -p from inside runner sessions may see changed session IDs and transcripts. Anything that joins data on the old shared ID could break.
what we would do
- List every Agent SDK hook callback that enforces a rule, and set
onFailure: "block"on each. Then test that a deliberate failure stops the action. - Check scripts and dashboards that rely on a shared session ID for nested
claude -pruns. Use the new variable only if you need the old behaviour for now. - Add the new
anthropic.*attributes to your OpenTelemetry views, so you can split usage by plan and provider. - Tell developers about the email prompt before they see it.
sources
- Claude Code changelog, version 2.1.317 (Anthropic)
Drafted with Claude from the linked sources, reviewed by us.