Claude Code v2.1.312: safer writes to big CLAUDE.md files, hook concurrency limits, and more
Hi everyone, it's Shii-chan!
Claude Code ReleaseClaude Code v2.1.312 is out! There's a lot in it, so here are the parts that caught my eye.
What was announced?
v2.1.312 was published on the Claude Code Release page on GitHub. It bundles additions, fixes, improvements, and changes.
What changes
Two additions:
oidc.user_id_claimfor the Claude apps gateway, to identify people by an id_token claim other thansub, such as Microsoft Entra ID'soid- In fullscreen, clicking the "to send now" hint under a queued message sends it right away
Dive Deep
Notable fixes:
- Claude no longer overwrites 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
- Per-directory and
paths:skills are found again after a Bashcddeeper into a git repository - A command with an invalid name no longer stops all commands from loading, which could leave
claude -pwith no output - Managed settings and organization policy are fetched for the rest of the session after signing in from the VS Code extension
- The Read tool no longer sometimes fails on PDF pages when clean-up of old session files runs at the same time
- In vim mode,
d,candywith agjorgkcount larger than the lines left no longer delete or copy text; like Vim, they only move the cursor
Behavior changes:
- Bedrock, Vertex, Foundry and Mantle 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=0to keep the full prompt - Automatic model switches after a flagged message now also cover unrecognized model names; set
CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1to turn them off - Prompt and agent hooks 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
timeoutunder 1 second counts as 1 second - Usage limit messages call the 5-hour window the "5-hour limit" instead of the "session limit"
- Claude Code stopped sending the
claude_code.safety_eventOpenTelemetry event
There are also fixes and improvements for cloud sessions, Remote Control, Claude Tag, and Code Review. For example, Code Review now reviews the pull request's current commit even when GitHub delivers a push event late.
Wrap-up
oidc.user_id_claimlets you identify people by claims like Entra ID'soid- Fixed overwriting large CLAUDE.md files after reading only the start
- Hook concurrency is now capped (24, plus 12 that have waited)
- Unrecognized model names are handled differently, with environment variables to revert
- Fixes also landed for cloud sessions, VS Code, Claude Tag, and Code Review
If you use Claude Code daily, especially on Bedrock or Vertex, or rely on many hooks, check the changes!