Claude Code 2.1.312 changes prompts for custom cloud model names and stops a safety event

Claude Code 2.1.312 shortens the system prompt for custom model names on cloud providers and drops an OpenTelemetry event. Teams on Bedrock, Vertex or Foundry should check both.

what changed

Claude Code 2.1.312 was listed on 27 October 2026. These are the changes that matter most for teams:

  • On Bedrock, Vertex, Foundry and Mantle, Claude Code now uses the shorter system prompt for model names it does not recognize. That includes custom deployment names and inference profile ARNs, even when they front Sonnet or Haiku. Setting CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 keeps the full prompt.
  • Automatic model switches after a flagged message now also cover unrecognized model names. Setting CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 turns them off.
  • Claude Code no longer sends the claude_code.safety_event OpenTelemetry event.
  • Prompt and agent hooks now run at most 24 at a time per session, sub-agents included. A hook timeout under 1 second now counts as 1 second.
  • The Claude apps gateway gained oidc.user_id_claim, so people can be identified by an id_token claim other than sub, such as Microsoft Entra ID’s oid.

why it matters

Many teams on a cloud provider put a custom name or an inference profile ARN in front of the model. Those teams now get the shorter system prompt by default. Behaviour, cost and output on those setups may shift, and the change is easy to miss because the model name did not change.

The same group may see a model switch after a flagged message that did not happen before. If you have written down which model serves a given workflow, that switch matters.

If a dashboard or alert reads claude_code.safety_event, it will go quiet. That is not a sign that nothing is happening.

Teams with many prompt or agent hooks may now hit the cap of 24.

what we would do

  • List every custom deployment name and ARN your developers and CI use, and test a typical task on 2.1.312 before you roll it out.
  • Decide on purpose whether to keep the full prompt with CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 or accept the short one.
  • Search your telemetry dashboards and alerts for claude_code.safety_event, and replace any that depend on it.
  • Count your prompt and agent hooks, and check that none relies on a sub-second timeout. Our enable service covers rollout like this.

sources

Drafted with Claude from the linked sources, reviewed by us.

Related service

This is part of our Enable work — make the team able to operate it.