Back to Blog
Hamza Farooq/November 17, 2026/6 min read

Claude Code auto mode behind a gateway: what does 2.1.319 change and what is denyInsteadOfPrompting?

Claude Code auto mode behind a gateway: what does 2.1.319 change and what is denyInsteadOfPrompting?

Claude Code 2.1.319, dated November 6, 2026 in the Claude Code changelog, changed auto mode for sessions that run with telemetry or feature flags off, including sessions behind LLM gateways. Calls the server cannot check are now asked about or denied, with no fallback to the built-in classifier. Setting CLAUDE_CODE_AUTO_MODE_SERVER=0 keeps the built-in classifier. The same release added permissions.denyInsteadOfPrompting, a setting for runs where nobody is available to answer a prompt.

TL;DR: According to the changelog, Claude Code 2.1.319 stops using the built-in classifier as a fallback for auto mode when telemetry or feature flags are off, including behind LLM gateways. Unchecked calls are asked about or denied instead, and CLAUDE_CODE_AUTO_MODE_SERVER=0 keeps the classifier. The same release added permissions.denyInsteadOfPrompting, which denies a call that would wait on a prompt. The auto mode page describes a classifier fallback when a gateway drops the review.

Key Takeaways

  • The change: the 2.1.319 entry says calls the server can't check are asked about or denied.
  • The variable: the same entry says to set CLAUDE_CODE_AUTO_MODE_SERVER=0 to keep the built-in classifier.
  • Unchanged platforms: the entry lists Bedrock, Vertex and Foundry as unchanged.
  • The new setting: permissions.denyInsteadOfPrompting denies a call that would wait on a prompt, and the turn continues. The settings reference lists -p runs among where it applies.
  • Exit codes: the changelog says claude -p now exits 1, not 0, when auto mode refused actions because no safety check was available.

What did Claude Code 2.1.319 change about auto mode?

The 2.1.319 changelog entry says that with telemetry or feature flags off, calls the server cannot check are asked about or denied, with no fallback to the built-in classifier. It names LLM gateways as one case, and says Bedrock, Vertex and Foundry are unchanged.

Two related lines sit in the same release. One says CLAUDE_CODE_AUTO_MODE_SERVER=1 turns on the server-side check behind a gateway even when CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS is set, and that managed settings which set the latter must set the 1 too. The other says a project's settings files or a plugin can no longer switch the server-side check back on once you have switched it off outside the project.

The auto mode documentation says that where the server gives no verdict, Claude Code denies the action.

Which sessions does the change reach?

The changelog names sessions with telemetry or feature flags off, including those behind LLM gateways. The environment variable reference shows how a session ends up without flags: CLAUDE_CODE_DISABLE_FEATURE_FLAGS=1, added in 2.1.319, turns off feature-flag fetching, and telemetry event logging stays on unless DISABLE_TELEMETRY is also set.

The auto mode documentation says that, from v2.1.282, a session that does not fetch feature flags asks the server by default. It also says a gateway that drops the review request is a common reason the server does not review a session, and that Claude Code then falls back to its own classifier requests. The 2.1.319 changelog line describes no fallback in the telemetry and flags-off case. I could not reconcile those two statements from the pages I read.

The changelog also says /status used to show "Auto mode server: Enabled" when the server-side review was not reaching the session. That display is fixed in 2.1.319.

What does permissions.denyInsteadOfPrompting do?

permissions.denyInsteadOfPrompting denies a tool call that would wait on a permission prompt, and the turn continues. The changelog says this applies in terminal sessions, subagents and teammates. The settings reference describes it as a way to deny calls that would wait on a prompt so a session nobody is watching keeps working, and lists its scope as user or managed. It says the key applies in -p runs, interactive terminal sessions, the VS Code extension, local Desktop app sessions, subagents and agent teams, and that a session can still wait on the workspace trust dialog and on project MCP server approval.

The settings page adds that a true value from ~/.claude/settings.json or --settings is honored even when a managed source sets false, and that the setting requires Claude Code v2.1.319 or later.

An older option exists too. The auto mode documentation says dontAsk mode auto-denies tool calls that would otherwise prompt, and says to use it for CI pipelines or restricted environments where you pre-define what Claude may do.

How do the options compare?

OptionWhat the page saysSource
permissions.denyInsteadOfPromptingA tool call that would wait on a permission prompt is denied and the turn continues; requires v2.1.319Changelog
CLAUDE_CODE_AUTO_MODE_SERVER=0Keeps using the built-in classifier when telemetry or flags are offChangelog
CLAUDE_CODE_AUTO_MODE_SERVER=1Turns on the server-side check behind a gateway even with CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS setChangelog
CLAUDE_CODE_DISABLE_FEATURE_FLAGS=1Turns off feature-flag fetching; telemetry logging stays on unless DISABLE_TELEMETRY is setEnv vars
dontAsk modeAuto-denies tool calls that would otherwise promptPermission modes
Comparison chart of five Claude Code options for unattended runs and what each does

What should you check before an unattended run?

The steps below are my suggestions, not instructions from Anthropic's pages.

  1. Note whether telemetry or feature flags are off in the sessions you run unattended, and whether CLAUDE_CODE_AUTO_MODE_SERVER is set.
  2. Decide what you want when a call cannot be checked: the built-in classifier (CLAUDE_CODE_AUTO_MODE_SERVER=0), or an ask or deny.
  3. If nobody will be at the terminal, consider permissions.denyInsteadOfPrompting in your user settings.
  4. For scripted runs, read the exit code. The changelog says claude -p now exits 1 in auto mode when actions were refused for lack of a safety check. The permission modes page says a -p run with no permission mode set starts in Manual mode from v2.1.302, so check which mode your script starts in.
  5. Test the denied path once. The settings reference says the denial Claude reads can open with "Permission for this tool use was denied. It requires approval, and this session has no approval surface", and that auto mode with the setting on ends the turn after 20 refused calls in a row.
Timeline of Claude Code versions 2.1.282, 2.1.302 and 2.1.319 and what each changed for auto mode and headless runs

Frequently Asked Questions

Does the 2.1.319 auto mode change affect Bedrock, Vertex and Foundry?

The changelog entry says Bedrock, Vertex and Foundry are unchanged.

How do I keep the built-in classifier after upgrading?

The changelog says to set CLAUDE_CODE_AUTO_MODE_SERVER=0. The auto mode documentation describes the same variable as a way to skip asking the server and always use Claude Code's own classifier requests.

Does denyInsteadOfPrompting stop a headless run from stalling?

The changelog describes it as denying a call that would wait on a prompt so the turn continues, in terminal sessions, subagents and teammates. The settings reference adds -p runs, the VS Code extension and local Desktop app sessions to that list, and says a session can still wait on the workspace trust dialog and on project MCP server approval.

Where do I set denyInsteadOfPrompting?

The settings page says a true value is honored from ~/.claude/settings.json or --settings, and the settings reference lists the scope as user or managed.

Conclusion

If you run Claude Code unattended behind an LLM gateway, read the 2.1.319 entry before upgrading. My suggestion: choose between the built-in classifier and an ask or deny, decide whether permissions.denyInsteadOfPrompting fits, and test the denied path once.


Learn from me

Claude Code in Practice

Claude Code in Practice, my Maven cohort. Master Claude Code from fundamentals to advanced orchestration: skills, subagents, hooks, MCP, and production automation. Join the next cohort →

Hire us

Traversaal.ai. We're a team of forward deployed engineers solving the toughest AI problems for Fortune 100 companies: document intelligence, agentic data platforms, and real-time web intelligence, deployed in production. Work with our team to deploy your next agentic ecosystem. Talk to Traversaal.ai →

Join us

Want to solve these problems with us? We're always looking for forward deployed engineers who want to ship production AI. jobs@traversaal.ai

Hamza Farooq
Hamza Farooq

Former Senior Research Manager at Google and Walmart Labs, leading teams in optimization, NLP, recommender systems, and time series forecasting.