Skip to content
← Back to release · 2.1.319
Improvements / v2.1.319

Auto mode fails closed without server check

CHANGELOG · original

Changed auto mode with telemetry or feature flags off, including behind LLM gateways: calls the server can't check are asked about or denied, with no fallback to the built-in classifier; set CLAUDE_CODE_AUTO_MODE_SERVER=0 to keep using it (Bedrock, Vertex and Foundry are unchanged)
Open official changelog ↗

Documentation

Documentation excerpt

Make the session eligible

If a gateway keeps auto mode's server-side checks from reaching your sessions and you don't run it, send the requirements below to your company's admin or your gateway provider. Where the upstream accepts the format that the gateway receives, Claude Code expects the gateway to pass requests and responses through unchanged, as the gateway compatibility guide describes:

  • Requests: to let the checks through, the gateway forwards both the anthropic-beta header and the safeguards body field unchanged, because the two travel as a pair. On the Amazon Bedrock InvokeModel format, it forwards the anthropic_beta body field in place of the header.
  • Responses: the gateway returns responses and streaming events without dropping fields or rewriting tool-use IDs. To let the checks' results through, it keeps the safeguard_results field.

Once your gateway does this, new sessions use the server's checks again.

If you already know that your gateway can't provide the server's checks, tell Claude Code not to ask for them there by setting CLAUDE_CODE_AUTO_MODE_SERVER to 0 before you start the session, in your shell or in the env settings key:

export CLAUDE_CODE_AUTO_MODE_SERVER=0

Classifier requests are then always Claude Code's own, billed the same way, and the notice doesn't appear. On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 while CLAUDE_CODE_AUTO_MODE_SERVER is unset turns the server's checks off as well, except as Disable pre-release capabilities describes.

CLAUDE_CODE_AUTO_MODE_SERVER is a temporary setting and may be removed in a later release.

Documentation snapshot · 2026-11-20

Change details