Skip to content

Claude Code v2.1.331

Released · Anthropic

Changes context and compaction settings, hooks, settings files, skills and plugins, subagent definitions

What the release notes say

What's changed

  • Added Code Mode support in terminal sessions on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry and Claude Platform on AWS

  • Added oidc.groups_jsonpath to the Claude apps gateway, to read groups from the matching entries of a list of objects with a small subset of JSONPath (RFC 9535)

  • Added an API connectivity section to claude doctor that reports whether the API can be reached, with the HTTP status or the error, or says why it wasn't tested

  • Added a notice when tap-mode voice dictation stops by itself, after 15 seconds without recognized speech or at its 2-minute limit

  • Added CLAUDE_CODE_DISABLE_RESPONSE_COMPRESSION to ask for uncompressed model responses behind a proxy that cuts compressed ones off; not advised yet for self-hosted runners or Remote Control

  • Added CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME=1 for Claude apps gateways: with oidc.use_proxy: true, sign-in requests hand the proxy an https IdP's hostname even with NO_PROXY set

  • Added gen_ai.usage.*, gen_ai.response.model and gen_ai.operation.name to claude_code.llm_request trace spans; gen_ai.usage.input_tokens includes prompt cache tokens

  • Added optionalDependencies to plugin manifests: plugins that install with the plugin listing them and can be disabled or uninstalled on their own

  • Fixed MCP tool calls hanging for up to 30 minutes on some malformed replies from a local or WebSocket server

  • Fixed PushNotification telling a headless run, such as a scheduled one, that the terminal was active in its first minute, instead of saying whether a mobile push was requested

  • Fixed /install-github-app skipping the repository step after setup warnings when no repository was found, and Esc not going back from its workflow list and sign-in steps

  • Fixed one-line tool results cut with no ellipsis in narrow windows, Markdown stars in the Auto mode tab of /permissions, and a hook's reason to stop a forked skill showing twice

  • Fixed /diff hiding its key hints and not selecting files in windows of 24 to 26 rows, and leaving out files added with git add -N in a repository with no commits

  • Fixed the first-run theme list showing too few themes in short windows, and /usage and other tall screens coming out garbled there

  • Fixed /bug in fullscreen hiding its Yes and No answers behind a long report, and Yes staying out of view in very short windows

  • Fixed /compact and auto-compact sometimes losing part of the conversation summary when the summary quoted certain XML tags

  • Fixed Claude not being told when permission rules on the Agent tool dropped its queued message to a subagent that had already ended

  • Fixed a Remote Control message sometimes showing above the reply that was finishing when it was sent

  • Fixed Stop hooks that read the transcript missing the last reply in Claude Desktop; SubagentStop hooks now wait for it too

  • Fixed turns and subagents failing in cloud sessions, or timing out on long replies elsewhere, when a reply went silent while Claude was still thinking; Claude Code now tries the request once more

  • Fixed Esc and Stop waiting about a minute or more when the contents of a cloud or network file that Claude is reading stall

  • Fixed Code Mode sessions resumed with --resume or --continue in another permission mode losing thinking and the prompt cache; one begun in a mode that asks keeps that mode's limits on scripts

  • Fixed Code Mode sending a request about every second when a ! or slash command was typed while a script was running

  • Fixed an interrupted or failed plugin update leaving a partial plugin folder that later loaded with skills or other components missing (anthropics/claude-code#102186)

  • Windows: Fixed file writes on FAT32 and exFAT drives asking for permission every time in some plugin sessions

  • Fixed Claude failing to read a notebook that has a null output or an error output with no traceback

  • Fixed a rewind deleting files after a restore had failed

  • Fixed auto mode sometimes refusing Claude's call to stop a /loop, which left the next wake-up to fire

  • Fixed a Workflow agent's background shells and MCP servers sometimes being left running after it handed back its report

  • Windows: Fixed /desktop downloading the older Claude Desktop installer, and asking for an update when an older install's folder was left behind

  • Fixed claude plugin install, marketplace add and similar commands hanging with no output when managed settings needed an approval that could not be asked for

  • Fixed a permission rule on a subagent's model, such as Agent(model:*), blocking Claude's follow-up message to a subagent started on this version with no model named

  • Fixed PermissionRequest hooks not saving Skill(name:*) allow rules outside local settings

  • Fixed "Ask your admin" asking to raise your own limit when your team's pooled group budget blocked you, and saying "Request sent" when an admin had approved your request in the last few minutes

  • Fixed Code Mode losing the middle of a long script output; Claude now gets a path to the uncut text (anthropics/claude-code#111373)

  • Fixed hold-to-talk dictation stopping early and losing words when Claude Code was busy

  • Fixed Code Mode with --bare not telling Claude what its scripts can call

  • Fixed a crash when a custom API endpoint returned a tool call with no tool name; the call now fails with an error and the session continues

  • Windows: Fixed a possible crash when the machine is almost out of memory

  • Fixed the CLI freezing on some replies, and quoted text sometimes going missing or showing twice

  • Windows: Fixed Claude Code refusing to start when managed settings in the registry contain non-ASCII characters such as Japanese (anthropics/claude-code#93280)

  • Windows: Fixed Remote Control clients showing no steps for a new subagent

  • Fixed @-mentions written as @file#10-12 attaching the whole file instead of those lines