↓ Skip to main content
  1. Articles/

Claude Code v2.1.312: Custom Deployment Names Get the Short Prompt, and a Safety Event Disappears

·871 words·5 mins·
Florent Clairambault
Author
Florent Clairambault
CTO & software engineer — writing daily about spec-driven development and agentic coding

Two days after v2.1.311’s signed model catalog, v2.1.312 (October 27) lands with 4 additions, 9 changes, 4 improvements and 22 bug fixes. Everything here comes from the official changelog. I have not run this version, so the behavior claims are the changelog’s, not mine.

The change that bites: unrecognized model names get the short prompt
#

The line: Bedrock, Vertex, Foundry and Mantle now 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.” The escape hatch is CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0, which keeps the full prompt.

Enterprise setups love aliasing. An inference profile ARN or an internal deployment name is how many platform teams enforce routing and quotas. Claude Code can’t tell what sits behind those names, so it now assumes a less capable model and trims the prompt. That is a defensible default, since a long prompt tuned for a frontier model can hurt a small one. But it means a team whose “prod-coding” alias fronts a strong model may see behavior shift after upgrading, with no error to point at.

What to do:

  • Check how your aliases are named. If Claude Code resolves them via the catalog, you may be unaffected; the changelog doesn’t say, so test.
  • If you notice thinner behavior on an aliased deployment, try CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 before blaming the model.
  • A related change: automatic model switches after a flagged message now also cover unrecognized model names. CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 turns them off. If you pin a model for reproducibility, set it.

Hook concurrency gets a hard ceiling
#

Prompt and agent hooks now run at most 24 at a time per session, subagents included, plus at most 12 that have waited longer than their event’s timeout. A timeout under 1 second now counts as 1 second.

This follows the 12-hook cap from v2.1.301-302 and is the same story: fan-out agents multiply hook invocations, and an LLM-backed hook is expensive and slow. If you run a policy hook that calls a model on every tool use, a 20-subagent run can now queue instead of stampede. Good for your bill and your rate limits; worth knowing if a hook that used to finish in time now waits. Sub-second timeouts rounding up to 1 second is a quiet gift to anyone who wrote timeout: 0.2 and got surprising behavior.

Also fixed: a subagent’s autoCompactWindow now lowers the window set by CLAUDE_CODE_AUTO_COMPACT_WINDOW, where it previously had no effect. It still never raises it. If you configured the subagent knob from the cost-controls piece and saw nothing happen, this was why.

Observability: one event gone, one label fixed
#

Two OpenTelemetry changes matter if you ship telemetry to a SIEM:

  • Claude Code stops sending claude_code.safety_event. That event was introduced in v2.1.307 as a signal for safety-related events. The changelog gives no reason. If you built an alert or dashboard on it, it will go silent, and silence looks like safety. Audit your rules.
  • mcp_server.name now reports the real name of fixed-URL remote MCP servers declared by plugins from the official Anthropic marketplace, instead of custom. That makes MCP usage attribution actually useful.

Smaller: the spinner, OTel effort values and transcripts used to name a newly picked effort level before the model applied it; they now show the level in force. Telemetry that records what you asked for rather than what ran is a quiet source of bad cost analysis, so this is welcome.

Fixes worth a look
#

Of the 22 fixes, these affect autonomous work most:

  • Large-file overwrite. Claude could overwrite 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. If your spec files are big, this is the one that could have eaten your work.
  • Skill discovery. Per-directory and paths: skills weren’t found after a Bash cd deeper into a git repo.
  • Command loading. One command with an invalid name stopped all commands loading, which could leave claude -p with no output. A headless-pipeline killer.
  • Managed settings. Managed settings and org policy were not fetched for the rest of a session after signing in from the VS Code extension. That is a policy-enforcement gap, not a cosmetic bug.
  • Code Review. It could review an outdated commit, or none, when GitHub delivered a push event late. It now reviews the PR’s current commit.

Smaller additions
#

oidc.user_id_claim on the Claude apps gateway lets you identify people by a claim other than sub, such as Entra ID’s oid. Cloud routines get an effort picker in the model picker. Usage messages now say “5-hour limit” instead of “session limit”. Click-to-send for queued messages in fullscreen is cosmetic.

The takeaway
#

Version 2.1.312 is another release where the interesting work is policy plumbing: what prompt a model gets, how many hooks run, which events you can trust. The pattern is consistent. Claude Code is being tuned for fleets of unattended agents, and the cost of that is that defaults shift under you. Pin your versions in CI, read the changelog like an advisory feed, and diff your telemetry after every upgrade.

Sources
#

AI Tools

Claude Code v2.1.311: A Signed Model Catalog, Ultrathink at xhigh, and 56 Fixes

Claude Code v2.1.311 (Oct 26) makes cloud-provider installs load model settings from a signed file on downloads.claude.ai, ties ultrathink to xhigh effort, and lands 56 bug fixes including a subagent worktree deleted under a running background agent. Changelog-only analysis; not run.

Oct 27, 2026 · 6 min read

AI Tools

Claude Code's June Sprint: Four Releases, the Ultracode Rename, and Enterprise Version Locks

Between June 2 and June 4, Anthropic shipped four Claude Code releases — v2.1.160 through 2.1.163. The headline change: the dynamic-workflow trigger keyword is now ‘ultracode’, not ‘workflow’. Enterprise admins get version range enforcement. Hooks can now talk back. Here’s what actually matters.

Jun 5, 2026 · 6 min read

AI Tools

Claude Code v2.1.129: Bedrock Tiers, Smarter MCP, and a Gateway Reversal

Claude Code v2.1.129 shipped quietly on May 6. For most users it’s invisible. For Bedrock enterprise shops, MCP server operators, and anyone using third-party model gateways, it changes real behavior — and one change is a deliberate reversal of v2.1.126.

May 15, 2026 · 6 min read

AI Tools

Claude Code v2.1.310: The Day-After Patch Fixes Gateways, Symlink Prompts and a Windows Hook Hole

Claude Code v2.1.310 follows the v2.1.309 hardening release one day later with gateway retry fixes, symlink targets in read prompts, a Windows hook fail-open fix, and custom Enterprise roles for cloud sessions. Changelog-only analysis; not run.

Oct 24, 2026 · 5 min read

AI Tools

Claude Code v2.1.307: A Safety Event for Every Blocked Tool Call, and a One-Command API Migration

Claude Code v2.1.307 adds a claude_code.safety_event OpenTelemetry event for tool calls stopped, prompted or sent back by permission rules, auto mode, hooks or the sandbox, plus /claude-api api-version to move code to API version 2026-10-21. It also fixes HTTP MCP tool calls being sent twice. Changelog-only analysis; not run.

Oct 22, 2026 · 5 min read