█

AI/TLDR

Anthropic · 2026-10-27 · notable

Claude Code 2.1.312 — OIDC claim choice for the gateway and hook limits

Claude Code 2.1.312 lets the Claude apps gateway identify users by an OIDC claim other than sub, caps prompt and agent hooks at 24 running per session, and stops overwriting large CLAUDE.md files it has only partly read.

Claude Code repository card on GitHub

Claude Code 2.1.312 adds a gateway identity option, limits runaway hooks and fixes a risky overwrite of big files.

What is it?

A new oidc.user_id_claim setting in Claude Code 2.1.312 lets the Claude apps gateway identify people by an id_token claim other than sub, such as Microsoft Entra ID's oid. In fullscreen, clicking the hint under a queued message now sends it right away.

How does it work?

Prompt and agent hooks now run at most 24 at a time per session, subagents included, and a timeout under 1 second counts as 1 second. On Bedrock, Vertex, Foundry and Mantle, model names the tool does not recognize, such as custom deployment names, get the shorter system prompt; CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 keeps the full one.

Why does it matter?

One fix matters for anyone with long instruction files: Claude no longer overwrites a very large CLAUDE.md, rules file or included file after reading only its start. The release also stops sending the claude_code.safety_event OpenTelemetry event and fixes Code Review checking an outdated commit when GitHub sends a push event late.

Who is it for?

teams running Claude Code behind a company gateway or on cloud providers

Try it

npm i -g @anthropic-ai/claude-code@2.1.312

Sources

Tags

  • claude-code
  • anthropic
  • coding-agent
  • cli
  • oidc
  • hooks
  • opentelemetry
  • bedrock
  • vertex
  • cloud-sessions
  • developer-tools
  • release

← All releases · Learn AI