Claude Code 2.1.317
87changes- Add an admin API for reading past Claude apps gateway spend by date range, developer, or IdP group.
- Add a cloud sessions link card to open or decline a link an MCP server asks you to visit.
- Add a check that asks before a web or shell tool call sends your account email address to the network.
- Fix every tool call being refused on some Windows volumes where the native path lookup fails.
- Fix a self-hosted runner bringing a switched-off MCP server back on after moving to a new machine.
New features
10Add gateway admin cost report API
Added a cost report to the Claude apps gateway admin API, GET /v1/organizations/analytics/cost, for reading past spend over a date range in total, per developer, per day or per IdP group
[Cloud sessions] Add MCP link request card
Added a link card to cloud sessions, so you can open or decline a link an MCP server asks you to visit instead of the request going unseen
Confirm before sending email to network
Added a check that asks before a web or shell tool call sends your account email address to the network
More changes (7) Fewer changes
Warn about unwanted schedule connectors
Added a warning to /schedule when a new cloud scheduled task gets connectors you did not ask for, with how to remove them
Add onFailure block for SDK hooks
Added onFailure: "block" for Agent SDK hook callbacks, so a callback that fails blocks the action instead of letting it run
▤ In the docsNotice managed settings load status
Added a notice in Claude Desktop's Code tab when your organization's remote managed settings haven't loaded for the session, and another once they do
Show notice for unanswered auto mode checks
Added a notice when auto mode's check has no answer for a subagent's tool call, which used to leave nothing in the main view
Add plan and seat fields to OTel
Added anthropic.plan, anthropic.seat_type, anthropic.provider and anthropic.custom_base_url to OTel metrics, events and spans
Record daily IdP groups for cost report
Added a daily record of each developer's IdP groups on Claude apps gateways with admin: set, kept for admin.identity_retention_days, which the cost report groups by
Add flag to restore shared session IDs
Added CLAUDE_CODE_DISABLE_NESTED_SESSION_ID: set it to 1 on a self-hosted runner to have claude -p run inside a session use that session's ID and transcript, as in earlier versions
Improvements
14All changes (14) Fewer changes
Clarify Foundry Azure credential errors
Improved the error shown on Microsoft Foundry when Azure credentials can't be loaded: it now says to check or refresh them, and reports as cloud_credential_error
Warn early when design system moved
Improved /design-sync to say up front when your design system has moved to Claude, and stop before building instead of failing at upload
Clarify gateway startup connectivity errors
Improved the startup error when a required Claude apps gateway can't be reached: it points to the network instead of a sign-in, and says when the gateway's TLS certificate can't be verified
Repeat launch flags in resume hint
Improved the "Resume this session with" hint shown at exit to repeat the flags you launched with (for example --chrome --debug) ahead of --resume
Open new connections after runner 5xx errors
Improved how self-hosted runners recover from server errors: after a 5xx other than 501 or 529, a runner's next poll now opens a new connection instead of reusing the one that failed
Open new connections after session 5xx errors
Improved how self-hosted runner sessions recover from server errors: after a 5xx other than 501 or 529, a session now opens new connections instead of reusing the one that failed
Open new connections on silent heartbeats
Improved how self-hosted runner sessions recover when connections stop answering: after a heartbeat gets no answer, a session now opens new connections instead of trying each idle one in turn
Deliver messages sooner to background agents
Changed SendMessage so a message to a running background agent arrives earlier: its running command moves to the background, without being stopped
Use a model's own saved effort level
Changed subagents and teammates on a different model from the main conversation to use that model's saved effort level or its default, instead of the session's effort level
Skip background-work prompt for monitors
Changed exit to skip the "Background work is running" prompt for plugin monitors
Offer to help share a working mod
Changed the built-in plugin-authoring skill to offer once, after a mod you built works, to help share the mod
Improve default fork names
Remote Control: Improved fork names when the app doesn't set one: a long name keeps its "(fork)" ending, and in sessions started with claude remote-control a fork of "Name (fork)" is "Name (fork 2)"
[Cloud sessions] Simplify org environment dialog
Changed the organization environment dialog in admin settings to the personal dialogs' short layout: each section opens from a row, and unsaved input asks before closing
[Claude Tag] Simplify pasted artifact link cards
Changed newly pasted artifact links in Slack to show a simpler card with an Open button that opens the artifact in Claude, instead of Slack's side panel
Bug fixes
62Surface Bedrock's input-too-long error
Fixed the Claude apps gateway hiding Amazon Bedrock's "Input is too long." error, which left sessions failing every turn with "upstream rejected the request" instead of compacting
Fix auto mode stopping on Artifact actions
Fixed auto mode in cloud sessions stopping for approval when the Artifact tool uploaded, wrote to a database or saved a file through the outputs folder
Fix tool calls refused on some volumes
Windows: Fixed every tool call being refused on some volumes where the native path lookup fails; the working-directory check now compares the folder's identity instead
[VSCode] Fix forked conversations dropping messages
Fixed forked conversations dropping messages: only one of the tool calls Claude ran in parallel was kept, and the last messages a compaction kept were lost, which could leave Claude's answer without the question it answered
Stop offering don't ask again for mod calls
Fixed Remote Control and SDK hosts offering "don't ask again" on a mod's tool calls
Fix teammates starting in auto mode
Fixed agent team teammates in tmux or iTerm2 panes starting in auto mode when the lead session was in manual mode
Fix disabled MCP server reactivating
Self-hosted runner: Fixed an MCP server that was switched off coming back on after the session moved to a new machine, when the session service had refused to save the switch
[Cloud sessions] Honor org default environment
Fixed new scheduled tasks ignoring your organization's default environment: the form now starts on the one an admin chose instead of the Anthropic-hosted default
More changes (54) Fewer changes
Fix MCP servers disconnecting after first turn
Fixed project and local MCP servers disconnecting after the first turn in some Claude desktop sessions
Fix auto mode failures on gateway 403/422
Fixed auto mode failing every turn when an LLM gateway set as the base URL answers 403 or 422 to its server-side safety check (a 403 with an apiKeyHelper is unchanged)
Fix auth status exiting before refresh saved
Fixed claude auth status exiting before a slow token refresh was saved, which could sign you out on the next run
Fix effortLevel ignored by pre-started sessions
Fixed a project's effortLevel setting being ignored by sessions that an app starts ahead of time and then opens in the project, such as new sessions in the desktop app's Code tab
Fix claude --from-pr missing older sessions
Fixed claude --from-pr reporting "No conversations found" in projects with many sessions when the linked session was older than the first page
Fix missing path in second permission prompt
Fixed the second of two simultaneous permission prompts showing no file path or command on claude.ai and the mobile apps
Fix session titles lost mid-generation
Fixed session titles being lost in cloud and SDK sessions when a new message or Stop arrived while the title was generating
Fix missed self-paced /loop wakeups
Fixed self-paced /loop wakeups sometimes not being scheduled when Claude left a field out of its request
Fix skills re-downloading when write fails
Fixed skills synced from claude.ai being lost or downloaded again every ten minutes when they can't be written to disk
Fix /schedule missing next run info
Fixed /schedule leaving a cloud scheduled task's next run time and link out of its results after creating or updating it
Stop repeating subagent status in screen readers
Fixed screen readers speaking a running subagent's elapsed time and token count on every change in screen reader mode
Explain region/network blocks at sign-in
Fixed a region or network block (HTTP 403) being shown as a sign-in failure; the error now explains the block
Fix false connector auth errors from plugins
Fixed Claude saying a working claude.ai connector needed authorization or had failed in cloud sessions when a synced plugin included the same server
Exit nonzero on lost transcript writes
Fixed claude -p exiting 0 when a full disk or quota lost its transcript or ~/.claude.json writes; it now prints an error and, in text and json output, exits 1. Full NFS exports may be missed
Fix settings edits ignored just after launch
Fixed edits to settings files made in the first second or so after launch not taking effect until a settings file changed again
Clean up transcripts on cleanup-skipping runs
Fixed old transcripts not being cleaned up on machines where some runs skip cleanup, such as runs using --setting-sources
Fix deleted team inboxes reappearing
Fixed deleted agent team inboxes being re-created by a teammate's late message
Fix re-created teammate removed from team
Fixed a re-created agent teammate being removed from its team by an earlier shutdown approval
Fix stored tasks unmanageable when disabled
Fixed stored scheduled tasks being impossible to list or delete after scheduled tasks were turned off
Fix wrong guide deleted without a name
Fixed Claude deleting your most recently updated /team-onboarding guide when asked to delete one without naming which
Fix wrong deleted message on refused delete
Fixed Claude saying a /team-onboarding guide was deleted when the server refused the delete
Fix lost turns on restart during approval
Fixed self-hosted runner sessions losing recent turns or the whole conversation when restarted while a plan waited for approval
Fix prompt-too-long after large CLAUDE.md change
Fixed "Prompt is too long" after automatic compaction in sessions whose very large CLAUDE.md changed since it was last sent
Speed up headless startup with many plugins
Fixed high memory use and slow startup in headless sessions with many plugins that register commands
Stop clearing AWS Bedrock token to servers
Fixed stdio MCP servers receiving an empty AWS_BEARER_TOKEN_BEDROCK when their env config sets it to empty; the variable is now unset, so the server can use the machine's own AWS credentials
Fix TLS cert errors after proxy renewal
Fixed API requests failing with "unable to get local issuer certificate" behind some TLS-inspecting proxies after a root certificate renewal
Preserve summary when compaction shrinks itself
Fixed very long conversations losing their earlier summary when compaction had to shorten its own request
Fix PDF metadata skewing page counts
Fixed a PDF's own metadata being able to make Read and @-mentions under-count its pages
Fix prompt caching flags on [1m] models
Fixed DISABLE_PROMPT_CACHING_OPUS and DISABLE_PROMPT_CACHING_SONNET having no effect on [1m], other-region and undated spellings of the default model
Fix hidden shared artifacts past 200 own
Fixed /artifacts and the Artifact tool's shared list showing no shared artifacts when you have 200 or more of your own
Flag timed-out Grep/Glob as incomplete
Fixed Claude treating partial Grep and Glob results as complete when a search hit its time limit
Fix stalled concurrent OTel HTTPS exports
Fixed OpenTelemetry exports to an https:// endpoint through a proxy never being sent when they started while another export was still in progress
Stop retry flood on blocked OTel proxy
Fixed a flood of connection attempts to a proxy that blocks (HTTP 403) OpenTelemetry exports to an http:// endpoint
Add timeout for hanging OTel exports
Fixed OpenTelemetry exports hanging indefinitely behind a proxy that never answers; they now time out after 10 seconds, or OTEL_EXPORTER_OTLP_TIMEOUT up to 30 seconds
Stop repeating known file changes on resume
Fixed resumed sessions telling Claude again about a file change it already knew about
Fix skipped tool after switch-off recovers
Fixed Claude sometimes not using a built-in tool in a resumed session after an earlier call failed because the tool was switched off
Explain disabled Remote Control command
Fixed /remote-control answering "Unknown command" instead of saying that Remote Control is turned off by the disableRemoteControl setting
Preserve permission mode across session changes
Fixed a background session sometimes losing a just-made change of permission mode when it was upgraded or retired
Stop Ctrl+C from killing background agents
Fixed Ctrl+C stopping all running background agents when pressed to clear typed text at the prompt
Fix /feedback showing stale confirm hint
Fixed /feedback showing "Enter to confirm" while a report is being sent
Fix duplicate SIGTERM to child processes
Fixed child processes of a stopped shell command sometimes being sent SIGTERM twice, which could make some programs skip their cleanup
Isolate claude -p's session ID by default
Fixed claude -p run inside a cloud or self-hosted runner session sharing that session's ID: it wrote into the session's transcript, and a restart could resume the wrong conversation
Stop claude -p overwriting session titles
Fixed claude -p run inside a cloud or self-hosted runner session generating a title of its own and sending it to that session
Fix growing temp paths outside Desktop
Windows: Fixed the session scratchpad and other temporary paths growing with your project's path length in sessions not started by Claude Desktop, which made repositories cloned into them hit the 260-character path limit
Fix 100% spend shown after pooled budget
Gateway: Fixed the status line and /usage showing a developer's own spend limit as 100% used after their group's pooled budget ran out
Recover interrupted tool calls on runner move
Self-hosted runner: Fixed Claude not seeing the interrupted tool call when a session moves to a new runner and the turn is older than CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS
[VSCode] Retry Claude start before error
Fixed a message being lost when Claude did not finish starting in time: the extension now starts Claude once more before showing the error
[VSCode] Fix sign-in shown for blocked requests
Fixed the sign-in screen opening when a request is blocked for its region or network
[VSCode] Fix lower-cased plan name
Fixed the Account panel showing the plan name with a lower-cased second word
[VSCode] Open file links in another group
Fixed file links in a Claude tab opening on top of the chat instead of in another editor group
[VSCode] Scale panel UI with chat.fontSize
Fixed attachment chips, menus, banners and dialogs in the Claude panel staying small when chat.fontSize is raised
[VSCode] Fix ultrathink effort with telemetry off
Fixed ultrathink not raising effort for its turn or showing its rainbow when telemetry is off
[Cloud sessions] Refuse silent secret overwrite
Fixed adding a network secret for a host that already has one silently replacing it; the Add secret form now refuses and points you to the existing secret
[Remote Control] Fix unanswered idle messages
Fixed the next message to an idle session going unanswered after you restart claude remote-control, when you sent it within a minute of your previous message