Claude Code 2.1.312
Highlights in this release
New 12
Claude Apps Gateway Supports Custom OIDC Claims to Identify Users
When setting up single sign-on for internal tools, enterprise identity systems often adopt different fields. Claude apps gateway added the oidc.user_id_claim setting key, allowing administrators to identify people by a claim other than sub, such as Microsoft Entra ID's oid. ⟦Much like locker pickup where verification previously strictly required the default receipt number, the system now accepts a member ID to identify each user.⟧ This ensures that when working with an identity token (id_token, an authorization credential used to verify identity), you are no longer constrained by the default identifier, and specifying a field such as oid allows you to identify users directly.
Original changelog
Added oidc.user_id_claim to the Claude apps gateway, to identify people by an id_token claim other than sub, such as Microsoft Entra ID's oid
Fullscreen Mode Supports Clicking the Hint to Send Queued Messages Right Away
When opening fullscreen to let Claude Code focus on long tasks, you might often queue up your next question below. In fullscreen mode, a "to send now" hint appears under a queued message, and clicking this hint with your mouse now sends it right away, just as its key does. ⟦Picture drive-thru ordering where cars once had to wait for their turn in sequence, whereas now tapping a pickup window light sends the order into the kitchen instantly.⟧ When browsing the output with one hand on the mouse, you no longer need to move your hand back to the keyboard to hunt for shortcuts, since a single click on the screen lets you continue the conversation.
Original changelog
Added click to send: in fullscreen, clicking the "to send now" hint under a queued message sends it right away, as its key does
Effort Displays Now Reflect Levels in Force with Accurate Warnings for Setting and Cache Re-reads
When adjusting effort or switching models mid-task, indicators on the status line now more faithfully reflect background progress. Previously, when changing effort mid-task, the spinner, OpenTelemetry telemetry data, and transcripts prematurely named a newly picked level before the model applied it; they now consistently show the level in force. The prompt's effort indicator has also been improved, so a change made mid-task now notes that it may wait for your next message, and the note clears automatically when it no longer applies. In addition, the /model and /effort cache warning originally stated that the re-read waits for your next message, but a change made while Claude is working can now trigger it sooner. ⟦Like shifting driving modes in a car, the dashboard no longer falsely claims a mode is active the moment you turn the knob, but waits until the transmission actually switches gears before lighting up the new indicator.⟧
Original changelog
Fixed the spinner, OpenTelemetry effort values and transcripts naming a newly picked effort level during a task before the model applied it; they now show the level in force
Fixed the /model and /effort cache warning saying the re-read waits for your next message; a change made while Claude is working can trigger it sooner
Improved the prompt's effort indicator: a change made mid-task now says it may wait for your next message, and the note clears when it no longer applies
Third-Party Cloud Deployments Use Shorter System Prompts for Custom Models and Support Refusal Fallback
When connecting to Claude Code using Amazon Bedrock, Google Cloud Vertex, Foundry, or Mantle, many enterprises assign custom deployment names to their models. For unrecognized model names, including custom deployment names and inference profile ARNs, Claude Code now adopts the shorter system prompt even when they front Sonnet or Haiku. To keep the full prompt, configure the environment variable:
``` CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 ```
Automatic model switches after a flagged message now also cover these custom model names. To turn off this fallback mechanism, configure the setting:
``` CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 ```
⟦A special envoy traveling under a custom diplomatic title presents a concise credential to avoid clearance delays, while remaining fully covered by emergency contingency protocols.⟧ Custom deployment names are handled in the exact same manner.
Original changelog
Changed Bedrock, Vertex, Foundry and Mantle to use the shorter system prompt for model names Claude Code doesn't recognize, such as custom deployment names and inference profile ARNs, even when they front Sonnet or Haiku; set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 to keep the full prompt
Changed automatic model switches after a flagged message to also cover model names Claude Code doesn't recognize, such as custom deployment names; set CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 to turn them off
Session Hook Concurrency Is Capped While Subagents Can Lower Auto-Compact Windows
When wiring extensive automated check workflows into a project, frequently triggered events can simultaneously consume substantial background computing resources. Now, prompt and agent hooks (small programs triggered by specific events) run at most 24 at a time per session, subagents included, plus at most 12 that have waited longer than their event's timeout. ⟦Theme park turnstiles cap simultaneous entries during peak hours to keep pathways clear, while individual pavilions can shorten their own queue wait times.⟧ A configured timeout under 1 second now counts as 1 second; a subagent's autoCompactWindow can also lower the window set by CLAUDE_CODE_AUTO_COMPACT_WINDOW to compact history earlier, though it still never raises that window.
Original changelog
Changed prompt and agent hooks to run at most 24 at a time per session, sub-agents included, plus at most 12 that have waited longer than their event's timeout; a timeout under 1 second now counts as 1 second
Changed a subagent's autoCompactWindow to lower the window set by CLAUDE_CODE_AUTO_COMPACT_WINDOW, where it had no effect before; it still never raises that window
Telemetry Accurately Names Marketplace External Tools and Removes Redundant Safety Events
Engineering teams monitoring system operational health can now track plugin tool invocations in logs with greater precision. For fixed-URL remote MCP (Model Context Protocol, which connects AI models to external tools) servers declared by plugins from the official marketplace, the mcp_server.name attribute reports their real name instead of custom. ⟦Corporate visitor logs register certified contractors by their actual company names rather than grouping every guest under a generic vendor label.⟧ Meanwhile, Claude Code has stopped sending the claude_code.safety_event telemetry event, eliminating unnecessary noise when operators investigate trace spans.
Original changelog
Changed OpenTelemetry mcp_server.name to report the real name of fixed-URL remote MCP servers declared by plugins from the official Anthropic marketplace, instead of custom
Changed Claude Code to stop sending the claude_code.safety_event OpenTelemetry event
VS Code Extension Refines Organization Settings Loading, Clearly Marking Usage Limit Resets with Clock Times
When using the Claude Code extension inside the VS Code editor, sign-in and authorization status for enterprise accounts is now clearer. Previously, after signing in from the extension, subsequent sessions could miss fetching managed organization settings and company policies; they are now fully synced after signing in. If loading organization settings fails or is refused at startup, the terminal tab no longer abruptly closes on a bare exit code, but instead explicitly states the failure reason and directly offers "Retry" and "Sign in again" buttons. Additionally, when triggering usage limits, the reset notice explicitly says "5-hour limit" and includes a specific clock time such as "Resets at 3:10 PM", making it easier to plan upcoming work. ⟦Imagine an employee signing into an internal approval portal: when authentication stalls, the window explains the exact issue alongside retry options, and the wait time displays as an exact hour and minute.⟧
Original changelog
Fixed managed settings and organization policy not being fetched for the rest of the session after signing in from the VS Code extension
[VSCode] Fixed sessions ending on a bare exit code when your organization's settings couldn't be loaded or were refused at startup; the tab now says why and offers Retry or Sign in again
[VSCode] Changed usage limit resets to show a clock time ("Resets at 3:10 PM") and to say "5-hour limit"
Cloud Routines Support Configuring Effort Levels, Upgrading Setup Script Boxes to Dedicated Editors
When managing scheduled routine tasks running in the cloud, configuration interfaces and editing workflows now operate much more smoothly. When creating or editing a cloud routine, the model picker adds an effort level option, making it convenient to specify the reasoning depth required for the task. In cloud environment settings, the setup script box has been upgraded to a dedicated Bash editor equipped with syntax colors, line numbers, and a Copy button. Regarding interaction flow, clicking Edit from a routine's menu no longer navigates to the page without opening its editing dialog. If creating a cloud environment fails, error messages now appear directly inside the dialog rather than merely floating as a toast notification outside of it. ⟦Consider filing a repair ticket on a web form: validation errors highlight right beside the input box, while the notes area turns into a specialized notebook with numbered lines.⟧
Original changelog
[Cloud sessions] Added an effort level to the model picker when you create or edit a routine that runs in the cloud
[Cloud sessions] Added a Bash editor with colors, line numbers and a Copy button to the setup script box in cloud environment settings
[Cloud sessions] Fixed a failed cloud environment creation showing its error only as a toast outside the open dialog; it now appears inside the dialog
[Cloud sessions] Fixed Edit in a routine's menu on the Routines page going to the routine's page without opening its edit dialog
Cloud Sessions Adopt Server-Assigned Names, Clarifying Connection Limits and Presenting Repositories in Tables
When creating remote cloud tasks and fetching web data via the command line, error messages and execution histories are now presented much more clearly. For cloud sessions started from the terminal CLI, session names and branch names are now uniformly assigned by the server. When Claude adds a project repository to a cloud session, expanding that step displays the result in a well-structured short table instead of dumping messy raw JSON. If an unchanged message was resent after a failed send, an issue where it occasionally ran twice has been resolved. Furthermore, when using web fetching in cloud sessions, if a destination host fails to resolve, the prompt now explicitly explains that the host may fall outside allowed network domains and names the specific host that needs to be allowed. ⟦Just like dispatching work orders to a branch office, document numbers are issued centrally by headquarters, package manifests appear in orderly tables, and blocked deliveries note the exact street name that requires clearance.⟧
Original changelog
Improved WebFetch errors in cloud sessions: a host that does not resolve is now explained as possibly outside the allowed network domains, so Claude names the host to allow
Changed cloud sessions started from the CLI to get their names and branch names from the server
[Cloud sessions] Improved the step shown when Claude adds a repository to a cloud session: opening it now shows a short table of what happened instead of raw JSON
[Cloud sessions] Fixed resending an unchanged message after a failed send in a cloud session sometimes running it twice
Remote Control Sessions Accurately Report Idle Status After Disconnections
If a computer is temporarily put to sleep or switches networks, the operational status in the remote session panel no longer displays inaccurate information. Previously, after a connection dropped, an unarchived Remote Control session would linger and show as "working" until the computer reconnected. This issue has now been resolved, and disconnecting immediately switches the status to "idle", allowing you to confirm at a glance that the connection is paused. ⟦An office on-air lamp demonstrates the difference: previously, hanging up the phone left the indicator stuck on active call, misleading coworkers into thinking someone was still talking; now, dropping the connection immediately lights up a standby bulb with unmistakable clarity.⟧
Original changelog
[Remote Control] Fixed an unarchived Remote Control session showing as working until a computer reconnected; it now shows as idle
Slack Channels Retain Custom Settings When Going Public, Delivering Files Accurately and Detailing Retry Reasons
When teams mention Claude via Claude Tag in Slack, channel-specific configurations and multi-thread responses are now much more reliable. Previously, when an older private channel became public and received a new ID, the channel's on/off switch and agent settings unintentionally fell back to workspace defaults; these settings are now fully retained. Meanwhile, when an environment's network access was set to None, an issue where Claude failed to reply entirely has also been fixed. If interacting across separate threads within the same channel simultaneously, files were occasionally uploaded to the wrong thread in the past, but delivery targets have now been corrected. In addition, retry notices after API failures no longer display generic API errors, instead identifying the specific model in use or stating that rate limits were hit. ⟦Dispatching tasks across team communication groups follows the same principle: opening a channel to the public preserves its specialized permissions without forced resets, and file attachments land squarely under the designated topic thread.⟧
Original changelog
[Claude Tag] Improved Claude Tag's retry notice in Slack to name the model in use, or say rate limits were hit, instead of a generic API error
[Claude Tag] Fixed a Claude Tag channel's on/off switch and agent settings falling back to workspace defaults when an older private Slack channel goes public and gets a new ID
[Claude Tag] Fixed Claude in Slack not replying in channels whose environment has network access set to None
[Claude Tag] Fixed Claude in Slack sometimes posting a file in the wrong thread when it was answering in another thread of the same channel
Code Review Guarantees Checking Latest Commits, Eliminating Missed Inspections Caused by Delayed Events
When development teams submit pull requests to GitHub, platform event notifications can occasionally arrive late. Previously, if GitHub delivered a push event late, Code Review (an automated tool for inspecting code quality) could review an outdated commit or skip the inspection entirely. This issue has now been resolved, and the review tool consistently evaluates the current commit of the pull request. ⟦A teaching assistant grading student assignments illustrates the fix: previously, if submission notices arrived late, the assistant might grade an outdated draft or miss the paper entirely; now, they verify the latest submission in the drawer without reviewing the wrong draft.⟧
Original changelog
[Code Review] Fixed Code Review reviewing an outdated commit, or none at all, when GitHub delivered a push event late; it now reviews the pull request's current commit
Fixed 4
Write Tool Prevents Truncating Large Files and Avoids Overwriting Project Rules or Included Files
If a CLAUDE.md, rules file, or @-included configuration file in the project root or a subdirectory is very long, you might worry about losing subsequent content when the model edits files. Previously, after seeing only the start of a file, Claude occasionally overwrote a very large rules file or included file in a subdirectory. ⟦Think of proofreading a hefty contract where an assistant previously skimmed only the front page before rewriting the entire document, but revision rules now require reading the whole text or making corrections in place.⟧ This issue has now been resolved, and the Write tool (a built-in utility dedicated to creating or replacing files) now asks Claude to read it all or edit in place, preventing unintended full overwrites.
Original changelog
Fixed Claude overwriting a very large CLAUDE.md, rules file or @-included file in a subdirectory after seeing only its start; Write now asks Claude to read it all or edit in place
Terminal Input and Vim Editing Fixes Ensure Accurate Exit and Cursor Actions
Users accustomed to typing commands rapidly in the terminal sometimes run into minor quirks where cursor and editing states fail to update promptly. Several input issues have now been resolved. In agent view, if input text was cleared with Ctrl+C just before exiting, it will no longer be unexpectedly restored on the next launch. Exiting with Ctrl+D from an empty ! input line no longer causes agent view to reopen in shell mode. Additionally, in Vim mode, using d, c, or y with a gj or gk count larger than the lines left previously deleted or copied text by mistake; like standard Vim, they now only move the cursor. ⟦Emptying a typewriter tray ensures torn drafts never reload onto the platen upon restarting, and skipping past empty lines prevents cutting into the sheet.⟧
Original changelog
Fixed agent view restoring input text on the next launch after it was cleared with Ctrl+C just before exiting
Fixed agent view reopening in shell mode after exiting with Ctrl+D from an empty ! input
Fixed vim mode d, c and y with a gj or gk count larger than the lines left deleting or copying text; like Vim, they now only move the cursor
Custom Skills Remain Reachable Deep in Directories Alongside Command Menu and Loading Fixes
When switching between multiple project directories, custom automated skills and command menus now operate more reliably. Previously, running cd in Bash deeper into a Git repository caused per-directory and paths: custom skills not to be found; they are now recognized properly even after navigating deeper. A custom command with an invalid name previously stopped all commands from loading, which could leave claude -p with no output; this loading disruption has been fixed. Furthermore, /verify previously showed a long description meant for Claude in /help and the / command menu instead of a concise summary, but it now provides a short description. ⟦Department store floor directories still locate boutique counters even down in the basement arcade, while a clerical typo for a single shop no longer blacks out the entire electronic directory board.⟧
Original changelog
Fixed per-directory and paths: skills not being found after a Bash cd deeper into a git repository
Fixed a command with an invalid name stopping all commands from loading, which could leave claude -p with no output
Fixed /verify showing a long description meant for Claude in /help and the / command menu instead of a short one
Session Waiting States and Usage Limits Clarified alongside History Resume and Cleanup Fixes
When reopening earlier conversations or continuing tasks, status listings and conversation histories now faithfully reflect actual conditions. Previously, in rare cases after resuming a session (a complete conversation history) in the terminal, the first reply could be missing the next time the session was resumed; this problem has been resolved. Meanwhile, when the Read tool processes PDF pages, running clean-up of old session files at the same time no longer causes image write failures. If the last message only mentions items waiting on you mid-sentence, the session list no longer mistakenly marks the session as waiting on you. In addition, usage limit messages now formally refer to the 5-hour window as the "5-hour limit" instead of the confusing "session limit." ⟦Medical archive controls prevent active consultation files from being purged during routine record disposal, while patient triage boards avoid tagging individuals as pending based on casual remarks.⟧
Original changelog
Fixed a rare case where the first reply after resuming a session in the terminal could be missing the next time the session was resumed
Fixed the Read tool sometimes failing on PDF pages with "pdftoppm failed: Could not write image" when the clean-up of old session files ran at the same time
Fixed some sessions showing as waiting on you when the last message only mentioned items waiting on you mid-sentence
Changed usage limit messages to call the 5-hour window the "5-hour limit" instead of the "session limit"