Source · release

Claude Code release 2.1.312

Author
Anthropic
Published
27 October 2026
Added
28 October 2026
Original
https://github.com/anthropics/claude-code/releases/tag/v2.1.312

Summary

Claude Code 2.1.312 was released on 2026-10-27. It is mainly fixes, with a few changes that affect daily use: the Write tool no longer overwrites a large CLAUDE.md or rules file it has only partly read, path-scoped skills are found after a cd, and prompt and agent hooks now run with a concurrency cap. It also adds an OIDC claim option to the Claude apps gateway and effort levels for cloud routines.

Key points

  • Safer memory files: 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 it to read the whole file or edit in place.
  • Skills: per-directory and paths: skills are now found after a Bash cd deeper into a git repository.
  • Hooks: prompt and agent hooks run at most 24 at a time per session (subagents included), plus at most 12 that have waited past their event's timeout. A timeout under 1 second counts as 1 second.
  • Subagent compaction: a subagent's autoCompactWindow can now lower the window set by CLAUDE_CODE_AUTO_COMPACT_WINDOW (it never raises it).
  • Click to send: in fullscreen, clicking the "to send now" hint under a queued message sends it straight away.
  • Cloud providers: on Bedrock, Vertex, Foundry, and Mantle, model names Claude Code does not recognise (custom deployment names, inference profile ARNs) now get the shorter system prompt. Set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 to keep the full one. Automatic model switches after a flagged message also cover these names; turn them off with CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1.
  • Gateway: oidc.user_id_claim identifies people by an id_token claim other than sub, such as Entra ID's oid.
  • Cloud routines: the model picker for a routine now has an effort level, and the environment setup script box has a proper Bash editor.
  • Wording: usage messages now say "5-hour limit" instead of "session limit".
  • Plugins: the same day, the official plugin marketplace synced the newer code-review command (reviews print to the terminal unless --comment is passed) and gave ten plugins explicit versions, so updates reach installs only on a version bump.

Why it matters

The CLAUDE.md fix removes a way to lose a large memory or rules file silently. The hook cap matters if you run many prompt or agent hooks: beyond 24 they now queue.