Source · release
Claude Code release 2.1.317
Summary
Claude Code 2.1.317 was released on 2026-11-03. Most of its entries are fixes. The new
features are a hook failure mode for the Agent SDK, a privacy check before tool calls
send the account email address, a warning about unrequested connectors in /schedule,
and a cost report API for the Claude apps gateway. It also changes how subagents on a
different model pick their effort level.
Key points
- Fail-closed SDK hooks: Agent SDK hook callbacks accept
onFailure: "block". A callback that fails then blocks the action instead of letting it run. Use it for policy hooks that must not be skipped (Python:on_failure="block"onHookMatcherin SDK 0.2.177). Hooks in Claude Code's own settings have had this since 2.1.295; this release brings it to SDK callbacks. - Email leak check: before a web or shell tool call sends your account email address to the network, Claude Code now asks first.
/scheduleconnector warning: when a new cloud scheduled task gets connectors you did not ask for,/schedulewarns you and explains how to remove them.- Subagent effort: subagents and teammates on a different model from the main
conversation now use that model's saved effort level or its default, not the
session's. Together with
CLAUDE_CODE_SUBAGENT_EFFORT(2.1.316), this keeps a cheap subagent model from inheritingxhigh. - Gateway cost report:
GET /v1/organizations/analytics/costreturns past spend over a date range, in total or per developer, day, or IdP group. Gateways withadmin:set now keep a daily record of each developer's IdP groups for this. - SendMessage to a running background agent now arrives sooner, because the agent's running command moves to the background without being stopped.
- Read tool: the "file unchanged since your last Read" stub is gone; reading an unchanged file again returns its content.
- OTel: metrics, events, and spans gain
anthropic.plan,anthropic.seat_type,anthropic.provider, andanthropic.custom_base_url. - Self-hosted runners: set
CLAUDE_CODE_DISABLE_NESTED_SESSION_ID=1to restore the old behaviour, whereclaude -prun inside a session shares that session's ID. - Fixes worth knowing: project and local MCP servers no longer disconnect after the
first turn in some desktop sessions; Grep and Glob results cut off by a time limit
are no longer treated as complete;
claude -pnow exits 1 when a full disk loses its transcript; Ctrl+C at the prompt no longer stops all background agents.
Why it matters
onFailure: "block" makes SDK hooks usable as real guardrails: before this, a crashing
policy hook silently let the action through.