Skip to content

Claude Code v2.1.318

Released · Anthropic

Security fixChanges MCP server config, skills and plugins, permission rules

What the release notes say

What's changed

  • Added a record of your answer when Claude Code asks to turn on the mods it writes in a session

  • Added assume_role on mantle upstreams of the Claude apps gateway, for a role in another AWS account and for per-developer AWS cost attribution

  • Added an effort option to a mod's $.model.fork, so a quick side job can run at low whatever effort the session uses; the result reports the effort sent

  • Added the date a stored claude.ai sign-in ends to claude auth status (loginExpiresAt) and to claude -p JSON results (credential_expires_at)

  • Added a one-line stderr warning to claude -p text output, starting 10 days before a stored claude.ai sign-in ends

  • Fixed --continue sometimes losing the earlier conversation after a malformed tool call's retries ran out (regression in 2.1.314)

  • Fixed macOS sessions with many running Bash commands stalling while memory grew

  • Fixed permission prompts being answered by keys typed just after sending a message, or before a slow prompt appeared

  • Fixed /logout, claude auth logout and claude mcp remove reporting success, and changes to trust, consent or MCP settings being dropped with no word, when the config file could not be updated on a shared network home directory

  • Fixed jobs exiting with Not logged in when another terminal or host signs in again to the same account and organization on the same home

  • Fixed claude mcp add and remove writing the config without its lock: they now wait for it or exit 1, though another job's save can still replace a saved server

  • Fixed claude plugin commands exiting before a slow token refresh was saved, which could sign you out on the next run

  • Fixed claude plugin validate passing a custom-named marketplace file that claude plugin marketplace add rejects

  • Fixed stdio MCP servers that exit on the version probe being re-probed on every start; a server that dies in under 3s for its own reason is also pinned to the legacy handshake for 7 days

  • Fixed sessions being refused at startup by an allowedProviders list that another login on the same machine had stored

  • Fixed idle compaction replacing a conversation with a reply that was not a summary

  • Fixed the "Now using usage credits" notice reappearing about every 30 seconds while a background subagent is running

  • Fixed custom slash commands that fail, or that only Claude can invoke, printing nothing in claude -p and SDK sessions

  • Fixed claude -p and Agent SDK sessions reporting success when an API error cut off a reply while a mod hooked turn.step

  • Fixed a message sent right after a model change still running after Stop in headless sessions: Stop now cancels or stops it as it would a queued message

  • Fixed a deleted session transcript being re-created with its last prompt when an idle non-interactive session exited

  • Fixed claude remote-control hosts, the background daemon and self-hosted runners failing to start new sessions (spawn ENOENT) after an update or version cleanup removed the binary of a still-running process

  • Fixed a running Claude Code process owned by another user (for example one left by sudo claude) being treated as dead by version cleanup, which could delete its binary

  • Fixed /remote-control showing a session as available after a failed connection

  • Fixed /design revoke reporting success when the request failed with a 404

  • Fixed a shell command approved after a self-hosted runner or cloud session restart running in the session's start folder, not the folder it was asked in; if that folder can't be entered, it is not run

  • Fixed Claude not being told when an approved connector tool was unavailable after a cloud session restart

  • Fixed cloud sessions being stopped in the middle of a turn when the service refuses uploads for several minutes

  • Fixed variables a Setup hook writes to CLAUDE_ENV_FILE not reaching the Bash tool in some cloud sessions

  • Fixed the iPhone app showing a cloud session's turn as finished while it kept running, after a response was cut off at a tool call or a refused image or document was removed

  • Fixed a restarted session re-sending a message that failed with an API error, ahead of the newer message waiting behind it

  • Fixed a restarted session dropping its interrupted turn when the restart came right after Claude read a large image or retried a tool call

  • Fixed every connection failing when the NODE_EXTRA_CA_CERTS file is empty, not PEM, or starts with a damaged certificate: readable certificates are now used, with a warning on stderr

  • Fixed workflows re-running finished agents when resumed after a usage limit

  • Fixed /mcp in cloud sessions counting tools the model can't use; a server's row now shows how many of its tools are available

  • Fixed a duplicate notification when Claude left the status field out of a PushNotification call

  • Fixed the error for a too-large image in a request with more than 20 images always saying the limit was 2000px; it now shows the API's limit

  • Fixed the runtime in background shell details not updating while the dialog is open

  • Fixed a mod's turn.step hook making a stopped reply finish as a success in headless runs

  • Fixed retention cleanup leaving a home that only runs claude -p with no ~/.claude.json backup: it now takes a fresh backup before deleting the last good one

  • Fixed the stored login being replaced by an empty file when a network home directory has no room left for data but still takes new files

  • Fixed tokens from setup-token being refused at start on machines with forceLoginOrgUUID, when the token belongs to a permitted organization

  • Fixed non-interactive launches replacing a ~/.claude.json that isn't valid JSON with defaults; the start now fails, says how to restore the file, and leaves it as is (anthropics/claude-code#87551)

  • Fixed an empty ~/.claude.json with no backup being reported as corrupted; Claude Code now starts as it does when the file is missing