Claude Code 2.1.296 adds a code key to Claude apps gateway policies (also applied in Claude Desktop's Code tab), autoCompactWindow for subagents, and new environment variables for workflow subagent models and overloaded-retry delays
Hooks now have an onFailure: "block" option so a crashing, missing, or timed-out policy hook blocks the action instead of letting it through, and the hooks reference documents exit codes and stdout combinations in detail
The Managed Agents API reference gains a new multiagent_20261001 configuration (separately enabled advisor, subagents, and workflows) and full workflow run event types
The Agent SDK exposes a structured usage_report (SDKUsageReport) for /usage, and mods can call models directly with $.model.complete / $.model.fork, including prompt caching
New guidance on the output-token cost of drop_block in preserved thinking (up to +67% at max effort), and a Compliance API addition for downloading Claude Docs documents
Added a code key to the Claude apps gateway's managed.policies[]: same settings as cli, also applied in Claude Desktop's Code tab
Added autoCompactWindow to subagent frontmatter and --agents definitions
Added CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL to run every workflow agent on one model
Added CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS to set a longer maximum backoff for overloaded (529) retries
Added an allow_large option to the Read tool for reading a whole large text file in one call
Added a /plugin note when a plugin's hooks are left out because another enabled plugin has the same name
[Cloud sessions] Added a status filter to the Sessions and Runners lists on a self-hosted environment's Activity tab
[Claude Tag] Added creating, editing and deleting workspace and channel memory files on the Activity page's Memory tab
Existing feature improvements
Fullscreen mode underlines the link under the mouse pointer
Faster transcript toggle (ctrl+o) in code-heavy conversations via cached syntax highlighting
--debug now names unrecognized frontmatter fields in custom agent files and logs command hook command, plugin, outcome and duration
Auto mode shows a dim "Not run" row instead of a red error when its check had no usable answer
Clearer errors for refused cloud sessions and in Code Review admin settings
Sonnet 5.5 cache reads now priced at $0.10 per million tokens (was $0.20) in /cost, status line, --max-budget-usd and SDK cost figures
Default limit on MCP tool descriptions and server instructions raised from 2,048 to 4,096 characters
← now stops a turn or ! command started while the session moves to the background
[VSCode] Claude in Chrome now asks before browser actions in every session, including @browser
Major bug fixes
Fixed managed-settings PreToolUse hooks denying with "continue": false and managed prompt hooks not ending the turn, and PostToolUse hooks not applying updatedMCPToolOutput
Fixed Bash permission checks auto-approving some commands that use BASH_ARGV0
Fixed Edit and NotebookEdit corrupting non-UTF-8 files (Windows-1252, Shift-JIS, GBK); such edits are now refused
Fixed a saved Claude apps gateway sign-in being ignored when forceLoginMethod is gateway with no forceLoginGatewayUrl (regression in 2.1.295)
Fixed headless sessions starting MCP servers that were switched off for the folder
Fixed Esc/interrupt during UserPromptSubmit hooks ending headless sessions or letting the unchecked prompt through
Fixed /code-review ending on a raw JSON array in cloud sessions, the Agent SDK and IDE integrations
Fixed $.agent.register succeeding from a stale mod hook after reload or removal
Fixed secret redaction missing some values in shared transcripts and debug logs
Windows: Fixed long PowerShell commands always prompting, stdio MCP servers being force-killed at shutdown, and plugin install failing for GitHub sources without an SSH key
Added usage_report on SDKAssistantMessage and a new SDKUsageReport type: a structured copy of the /usage report (session cost totals, rate-limit meters, extra usage), experimental, requires Agent SDK v0.3.273+. [line 1435] [lines 2060-2130] [Source]
Documented size limits for pasted_content (1,000 entries) and inline_pastes (first 100 non-blank). [lines 1470-1474] [Source]
Interrupted-turn wording changed from "re-run" to "continues" for CLAUDE_CODE_RESUME_INTERRUPTED_TURN and resume_reason. [line 1691] [Source]
Added reason: "worker_restart" to SDKTaskNotificationMessage. [line 5188] [Source]
Workflow scriptPath is rejected when the session's tools don't include Read. [line 3240] [Source]
New troubleshooting: project settings can't turn on Chrome via CLAUDE_CODE_ENABLE_CFC, extension signed in to a different organization, and /chrome "Reconnect extension". [lines 260-290] [Source]
New code policy key (recommended) versus legacy cli; requires v2.1.296+ gateway and can't be mixed with cli/settings in one file. [lines 891-920] [Source]
New section on applying code settings in Claude Desktop's Code tab (requirements: desktop key, Desktop 2.9939.2+, client-side managed settings, HTTPS on a private network). [lines 1047-1070] [Source]
Telemetry: user identity attributes stamped from the gateway JWT, and handling user.groups changes during an open session. [line 1180] [lines 1286-1303] [Source]
Installation errors section moved to troubleshoot-install; index links updated. [line 184] [Source]
New entries: "Claude Code couldn't restart", invalid marketplace name, settings file that "does not load", "Plugin directory does not exist", and a /loop wakeup missed after restart. [line 3610] [Source]
New onFailure field ("continue" or "block") for command and HTTP hooks, v2.1.295+, with a new section "Block the action when a hook fails". [line 443] [lines 850-899] [Source]
Rewrote exit code output: success, blocking, and non-blocking outcomes, with a table by stdout type and exit code plus per-event exceptions. [lines 754-776] [Source]
Exit 2 blocks even when JSON is printed; "allow" cannot override it. [lines 796-803] [Source]
A timed-out command, http, or mcp_tool hook doesn't block the tool call. [line 847] [Source]
HTTP hooks: a non-2xx status is a non-blocking error; block via a 2xx response body. [line 953] [Source]
PermissionRequest hook exiting 2 without a decision leaves the flow unchanged; TaskCreated can block via exit 2 or JSON. [line 2010] [line 2518] [Source]
New docs for mods calling models: $.model.complete versus $.model.fork, request contents comparison, sending one prompt, and prompt caching with cache: true blocks (v2.1.292+). [lines 68-166] [Source]
New sections: invalid marketplace name, "does not load, so Claude Code ignores the whole file", and "Plugin directory does not exist". [line 230] [line 786] [line 898] [Source]
New section "Authorize a connector again from your shell" using claude mcp login "<connector>" --no-browser and /mcp reconnect. [lines 347-375] [Source]
Explained recurring-task jitter: a fixed per-task delay up to 30 minutes (table by frequency), and one-shot tasks at :00/:30 running up to 90 seconds early. [lines 164-182] [Source]
New wrapper environment variables: CCR_SESSION_ACCOUNT_EMAIL, CLAUDE_RUNNER_CLIENT_PLATFORM, CLAUDE_CODE_REMOTE_SLACK_THREAD_URL/_TS, with guidance on defaults and quoting. [line 26] [Source]
Warning that backgrounding the child with a bare & severs stdin and breaks the session after ~30 minutes; fd 3 and stderr handling. [lines 55-69] [Source]
Checkout hook: CLAUDE_RUNNER_REPO_REF, .git verification, getting git credentials, and failure behavior by repository type. [lines 109-140] [Source]
Session-end hook statuses completed and interrupted detailed. [lines 163-174] [Source]
New multiagent_20261001 configuration with independently enabled advisor, subagents (predefined_agents), and workflows members, merged level by level on update. The same change appears in the Go, Python, TypeScript, Ruby, Java, C#, CLI and PHP SDK references. [lines 29-140] [Source]
The existing coordinator topology is now documented as BetaManagedAgentsMultiagentCoordinatorParams.
Large regeneration of the Managed Agents sessions, events, threads and thread events references (all SDK languages and CLI), adding workflow run events (created, phase started/ended, status running/idle/ended, errors and results), inline agent and session thread types, and session refusal and retries-exhausted stop details.
New section "Output-token cost of drop_block": output tokens rose 2.5%-20.1% when dropping once per session and 4.6%-67.1% when dropping on every turn (low to max effort). Recommends running your own evals and fixing the prefix edit. [lines 99-131] [Source]
Claude Docs documents are listed via List code artifacts with artifact_typeclaude_docs, and downloaded as a ZIP using multi_file_format=zip. [line 209] [Source]
Custom roles: read the name from display_name; the name field is deprecated and equal to it. Store the role id for lasting references. [line 435] [Source]
A user.interrupt can pause open workflow runs, and a run paused by an interrupt does not resume when the budget changes; send a user.message asking the agent to continue its runs. The same clarification is in events-and-streaming, multiagent-orchestration and workflow-runs. [lines 188-196] [Source]
Checklist now says responses can start with thinking blocks (select content by type), and notes thinking tokens bill as output tokens. [lines 1582-1588] [Source]