Skip to content

Claude Code v2.1.328

Released · Anthropic

Changes skills and plugins

Models:Adds Claude Opus 4.6 ·Adds Claude Sonnet 4.6

What the release notes say

What's changed

  • Added auto mode for Claude Opus 4.6 and Sonnet 4.6 on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry and Claude apps gateway; interactive sessions with no permission mode start in it
  • Added "onFailure": "block" for mcp_tool hooks, as for command and HTTP hooks: a hook whose call fails blocks the action
  • Added a warning when a message from a session that skips permission prompts may be held and dropped by a cloud session
  • Added a notice in /status and claude doctor when an OpenTelemetry exporter has no endpoint and its data would likely be lost
  • Added CLAUDE_CODE_DISABLE_DEFERRED_TOOL_RESUME, which lets a host stop claude -p --resume and --continue from running a tool call that a hook deferred
  • Added support for apps that embed Claude Code to switch on the policy plugin's allowManagedModsOnly option; an admin's managed settings still win
  • Added a startup warning to the Claude apps gateway when a policy's maxEffortLevel is not a valid effort level
  • Self-hosted runner: Added --repository-folder to name the folder that sessions use for a repository at --capacity 1, in place of its path under the base folder, which can't be a symbolic link
  • Self-hosted runner: Added a start-up warning when the host's settings.json sets a default permission mode that sessions ignore
  • Self-hosted runner: Added --hook-label to claude self-hosted-runner orchestrator, to hand chosen session labels to the spawn-runner hook
  • Self-hosted runner: Added --metadata key=value to claude --environment, to label a session for the spawn-runner hook
  • Self-hosted runner: Added claude_code_self_hosted_orchestrator_session_queue_wait_by_reason_seconds to the orchestrator's /metrics, so a re-opened session's wait can be told from a new one's
  • Self-hosted runner: Added an orchestrator metric, claude_code_self_hosted_orchestrator_sessions_given_up_total, that counts by cause how often Anthropic gave up starting a runner for a session
  • Fixed Bash commands in zsh stopping with a "not found" error at a word that starts with =, such as echo ==== or [ a == b ]; =cmd no longer expands to a command's path
  • Fixed automatic compaction reusing the session's earlier system prompt instead of rebuilding it the way /compact does
  • Fixed markdown rendering freezing on some very long or malformed input
  • Fixed rare screen freezes
  • Fixed Esc often being lost at a permission prompt or question when you typed straight after it; in terminals that send Alt as Esc and a key, an unused Alt or Option key now declines there
  • Fixed a paste or a terminal's reply being typed into the prompt when a slow connection cut it in two
  • Fixed saving a scheduled task erasing the project's other saved tasks when the scheduled tasks file can't be read, on third-party providers or with telemetry or feature flags turned off
  • Fixed a scheduled task with a typo in the project's scheduled tasks file being deleted the next time that file was saved
  • Fixed a case where a resumed cloud session could lose its compaction summary or recent messages when a message was saved late
  • Fixed the token counts on the spinner and for subagents counting a retried reply twice, missing replies that were not streamed, and standing still while Claude thinks
  • Fixed the error shown when usage credits run out mid-response, which named a rate limit
  • Fixed auto mode failing every turn outside Claude Desktop with CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS set behind a gateway rejecting betas, on Bedrock, Agent Platform, Foundry or Claude apps gateway
  • Fixed CLAUDE_STREAM_IDLE_TIMEOUT_MS not lengthening the 5-minute connection limit on gateways, custom base URLs and cloud providers
  • Fixed some Claude Desktop sessions on third-party providers, other than scheduled tasks, ending for good with "Prompt is too long" after large tool results; the largest are now left out
  • Fixed MCP tools whose input schema starts with anyOf, oneOf or allOf going missing on third-party providers or with telemetry or feature flags turned off
  • Fixed an MCP tool with an invalid input schema failing requests on third-party providers or with telemetry or feature flags turned off; the tool is now left out and Claude is told why
  • Fixed effort being turned off for a subagent's model for the session if Bedrock, Google Cloud's Agent Platform or Foundry refused its progress summary's effort setting (regression in 2.1.327)
  • Fixed Code Mode stopping a script when a permission prompt outside auto or bypass mode, a plan approval or a question stayed open for ten minutes
  • Fixed Code Mode scripts in auto and bypass-permissions modes failing to call an MCP server that had connected while the previous script was running
  • Fixed Code Mode scripts not running in the background in auto or bypass permissions mode in a session chosen in the claude --resume picker
  • Fixed Code Mode losing a loaded skill, hook context or a note typed with a permission approval when resuming a session in which one reply ran several scripts
  • Fixed Claude not being told that a Code Mode script was cut off when the session was resumed from the picker or in a mode that asks for permission
  • Fixed Code Mode silently using undefined for top-level variables that an earlier failed script never set
  • Fixed Code Mode scripts not being told when a failing command's long output was cut
  • Fixed Code Mode refusing valid scripts that start with a { block
  • Fixed Code Mode refusing scripts that use both a top-level await and a top-level return
  • Fixed an @-mentioned small file not being attached in Code Mode after a script had read or written it
  • Fixed Code Mode offering write() and edit() to read-only subagents that can't call them
  • Fixed Claude starting a turn by itself in Code Mode when Esc was followed by a command such as /model