Claude Code 2.1.312: Custom Bedrock and Vertex Model Names Get the Shorter Prompt and Auto-Switching, safety_event Telemetry Dropped

Claude Code logo(opens in new tab)Claude Code(opens in new tab)ImportantOctober 31, 2026Coding Tools
What happened
Claude Code 2.1.312 (27 October 2026) gives unrecognized model names on Bedrock, Vertex, Foundry and Mantle the shorter system prompt and automatic model switches after a flagged message, and stops sending claude_code.safety_event.
Why it matters
Deployments that front Sonnet or Haiku with a custom name change behaviour on upgrade, can switch models without approval, and safety_event alerts go silent.
What to do
Set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 and CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 to keep the old behaviour, and rework any safety_event alerting.

Our take: if you run Claude Code on a cloud provider behind a custom deployment name or an inference profile ARN, treat 2.1.312 as a breaking upgrade. It changes the system prompt and the model routing your users get, with no config change on your side. Two environment variables restore the old behaviour, and any alerting built on claude_code.safety_event needs rework. Claude Code keeps its Conditional verdict in our directory: this release is another case of defaults shifting under enterprise deployments, which is exactly the condition. We have not tested 2.1.312 ourselves; everything below comes from Anthropic's changelog.

What happened

Anthropic shipped Claude Code 2.1.312 on 27 October 2026. Four changes matter for teams on Bedrock, Vertex, Foundry or Mantle:

  • Shorter system prompt for unrecognized names. The 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."
  • Automatic model switches after a flagged message. "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."
  • safety_event telemetry removed. "Changed Claude Code to stop sending the claude_code.safety_event OpenTelemetry event." The changelog names no replacement event.
  • Hook concurrency cap. "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."

Smaller items in the same release:

  • oidc.user_id_claim was added to the Claude apps gateway, to identify people by an id_token claim other than sub, such as Microsoft Entra ID's oid.
  • Usage limit messages now call the 5-hour window the "5-hour limit" instead of the "session limit". This is a wording change, not a limit change.
  • A fix for "managed settings and organization policy not being fetched for the rest of the session after signing in from the VS Code extension".

Why it matters

The prompt and routing changes apply only to names Claude Code does not recognize. Teams that call a recognized model id see no difference. Teams that put a custom name in front of Sonnet or Haiku do, so the same underlying model can now behave differently depending on whether it is called by its standard id or by your deployment name.

The model switch is the bigger risk. A session on a custom deployment can now move to a different model after a flagged message. If your deployment is pinned to one model for cost, data handling or compliance reasons, that is a change you did not approve.

The telemetry removal fails silently. Any dashboard, alert or audit job keyed on claude_code.safety_event will simply go quiet after the upgrade, which looks the same as "no safety events".

The VS Code fix cuts the other way: before 2.1.312, users who signed in from the VS Code extension could run the rest of the session without your managed settings and organization policy applied. If you enforce policy that way, upgrade for this fix alone.

What changes for you

  • Custom deployment names or inference profile ARNs: set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 to keep the full system prompt.
  • Deployments pinned to one model: set CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 to turn off automatic model switches.
  • Observability: find every alert or audit job that depends on claude_code.safety_event and decide what replaces it, since the event is no longer sent.
  • Heavy hook setups: check for queueing under the new limit of 24 prompt or agent hooks at a time per session, and raise any timeout set under 1 second deliberately.
  • Managed settings via VS Code sign-in: prioritise this upgrade so policy is fetched for the whole session.

What to do

  1. 1 If you use custom deployment names or inference profile ARNs on Bedrock, Vertex, Foundry or Mantle, set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 to keep the full system prompt.
  2. 2 If your deployment must stay on one model, set CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 to turn off automatic model switches.
  3. 3 Find any alert or audit job that depends on the claude_code.safety_event OpenTelemetry event; it is no longer sent.
  4. 4 If you run many prompt or agent hooks per session, check for queueing under the new limit of 24 at a time.
  5. 5 If you enforce managed settings and users sign in from the VS Code extension, upgrade to get the policy fetch fix.

Affected tools & models

Never need to catch up again

The weekly delta: only verdict changes and act-now items. No digest filler.

By subscribing you agree to our Privacy Policy. Unsubscribe anytime.