Skip to content
Beta
All articles

Claude Code 2.1.319: auto mode behind an LLM gateway now asks or denies

With telemetry or feature flags off, including behind many gateways, auto mode no longer falls back to its local classifier. What changed and what to check.

By The SpanDock team

5 min read

A diagram of Claude Code auto mode behind an LLM gateway: if the gateway forwards the safeguards fields the server checks each action; if not, from 2.1.319 a session with telemetry or feature flags off asks or denies, unless the local classifier is chosen deliberately

Claude Code's auto mode lets the agent run actions such as shell commands and network requests after a classifier checks them, instead of asking a person each time. Where that check runs, and what happens when it can't, has quietly become a gateway question. Claude Code 2.1.319, released on 6 November 2026, changes the answer for sessions with telemetry or feature flags turned off, "including behind LLM gateways": calls the server can't check are now asked about or denied, with no fallback to the built-in classifier.

For teams that route Claude Code through their own gateway, this can turn a session that used to run unattended into one that stops to ask, or into a headless job that now fails. This article explains the change, the related settings in the same release, and what platform teams should check.

Two places the check can run

The classifier billing page describes the two modes. Where server-side checks are on, the server performs the checks as part of the session's own model requests, at no charge. When the server's checks don't reach the session, Claude Code makes its own classifier requests instead, and those count toward the account's token usage.

For the server-side check to work through a gateway, the gateway has to pass specific fields untouched. The same page lists them: forward both the anthropic-beta header and the safeguards body field, because the two travel as a pair, and return responses without dropping the safeguard_results field or rewriting tool-use IDs. The gateway compatibility guide adds the general rule behind it: treat anthropic-* headers and body fields as open lists and forward them unchanged, because a gateway that allowlists today's fields will strip the next feature's.

A gateway that strips unknown headers, drops body fields it doesn't recognise or rewrites responses therefore breaks the server-side check, often without anyone noticing.

What 2.1.319 changed

The changelog entry is short. With telemetry or feature flags off, including behind LLM gateways, auto mode now asks about or denies calls the server can't check, and no longer falls back to the built-in classifier. Setting CLAUDE_CODE_AUTO_MODE_SERVER=0 keeps the old behaviour of using the local classifier. Amazon Bedrock, Google's Vertex platform and Microsoft Foundry are listed as unchanged.

Related entries in the same release:

  • CLAUDE_CODE_AUTO_MODE_SERVER=1 now turns on the server-side check behind an LLM gateway even when CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS is set. If managed settings set the latter, they must set the 1 too.
  • Project files can't switch it back on. Once you switch the server-side check off outside the project, a project's settings files or a plugin can no longer turn it back on.
  • claude -p now fails visibly. It used to exit 0 in auto mode when its actions were refused because no safety check was available. Text and JSON output now exit 1.
  • /status tells the truth. It no longer shows "Auto mode server: Enabled" when the server-side review isn't reaching the session, for example behind a gateway that drops it.
  • permissions.denyInsteadOfPrompting is a new setting: a tool call that would wait on a permission prompt is denied and the turn continues, in terminal sessions, subagents and teammates.
  • CLAUDE_CODE_DISABLE_FEATURE_FLAGS is a new variable that stops feature-flag fetching without turning off telemetry; every flag then uses its built-in default.

A note on the documentation

The billing page, read on 9 November 2026, still describes the fallback: when the server's checks aren't reaching a session, Claude Code makes its own classifier requests and auto mode keeps working. The changelog says that, for sessions with telemetry or feature flags off, that fallback is gone unless you set CLAUDE_CODE_AUTO_MODE_SERVER=0. The two may describe different cases (a gateway that strips the fields while telemetry is on, versus a session with telemetry or flags off), but the release notes don't spell out which gateway sessions fall into which case. Test your own set-up rather than relying on either page alone.

Why the change is defensible

A silent fallback has two costs. It moves classifier spend onto the account without anyone deciding that, and it hides the fact that the gateway is breaking a safety feature. The new behaviour makes the failure visible: a person is asked, or the call is denied, and headless runs now return a non-zero exit code instead of reporting success while doing nothing.

It also closes a governance gap. If an administrator switches the server-side check off for a reason, a repository's settings file or a plugin should not be able to switch it back on. Configuration that arrives with a repository is input, not policy, and 2.1.319 treats it that way here.

The trade-off is disruption. A team that had auto mode working through a gateway, perhaps without realising it relied on the local classifier, may see prompts reappear after the update, and CI jobs using claude -p may start failing.

What it means for platform and security teams

The release turns an implicit dependency into an explicit decision. For each place Claude Code runs through your gateway, someone now has to choose between three positions:

  1. Make the gateway pass the server-side check through. Forward anthropic-beta and safeguards unchanged and return safeguard_results. This keeps the check on the server, at no classifier charge.
  2. Choose the local classifier deliberately. Set CLAUDE_CODE_AUTO_MODE_SERVER=0, accept that classifier requests are billed as token usage, and record why.
  3. Accept prompts or denials. In unattended runs, permissions.denyInsteadOfPrompting makes that explicit: the call is refused and the turn carries on, rather than waiting for a person who isn't there.

Whichever you choose, set it in managed settings rather than leaving it to each developer, and remember the interaction with CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS if your gateway needs that variable.

Practical takeaways

  • Run /status in a Claude Code session that goes through your gateway, on 2.1.319 or later, and check the Auto mode server row.
  • Check whether your gateway forwards anthropic-* headers and body fields as open lists or strips unknown ones. If it allowlists, expect this and future features to break.
  • Search CI for claude -p jobs in auto mode. After the update they exit 1 when actions are refused for lack of a safety check; decide whether that should fail the pipeline.
  • For unattended jobs, consider permissions.denyInsteadOfPrompting so a blocked call is denied cleanly instead of waiting on a prompt.
  • If you set CLAUDE_CODE_AUTO_MODE_SERVER=0, account for the classifier spend it brings back, and note that the docs call the variable temporary.
  • Put the chosen setting in managed settings, so a project file can't change the outcome on its own.

For related gateway changes from Anthropic, see our article on the Claude apps gateway's pooled budgets. For how the same tool reports permission decisions in telemetry, see coding-agent telemetry that shows what was stopped.

Sources

  1. Claude Code changelog (2.1.319, 6 November 2026)
  2. Claude Code release v2.1.319 on GitHub
  3. Claude Code docs: Auto mode classifier request charges
  4. Claude Code docs: Gateway compatibility guide
Cookie categories

Details: Cookie Policy.