Claude Code Auto Mode LLM gateway billing environment variables 2026

Claude Code Made Auto Mode Classifiers Free in v2.1.278 — and Broke Four Community Gateways Doing It

The Prompt Shelf ·

Claude Code v2.1.278 (September 19, 2026) changed one thing: auto mode’s safety classifier — the check that runs before a shell command or network request fires without a permission prompt — now runs as part of the session’s own model request on the server, instead of as a separate billed call, for Claude API and Enterprise accounts, and on Bedrock, Vertex, Foundry, and Claude Platform on AWS. The changelog entry is one line: “Changed auto mode… to default to the server-side classifier, which does not charge for classifier overhead… warns on billed fallback.”

Within three days, four separate open-source community gateway and router projects — cc-switch, free-claude-code, CLIProxyAPI, and 9router — got the identical incompatibility notice filed against them as bugs. None of them are actually broken in the sense of auto mode failing. They’re broken in the narrower, easy-to-miss sense that their users are still paying for classifier requests a direct connection no longer bills for, and the notice that says so points at a compliance contract that isn’t fully written down yet.

What the Notice Actually Says

Trigger an auto-mode-gated action through an incompatible path and Claude Code holds it and shows this before the first checked action of the session:

We're changing auto mode to no longer charge for classifier requests in Claude Code. However, this session isn't eligible because your requests go through <gateway>, which isn't compatible with this update. Nothing breaks: auto mode keeps working, and its classifier requests are billed as before. To fix it and access the new version of auto mode, ask your gateway to implement: https://code.claude.com/docs/en/auto-mode-classifier-billing

Two things worth being precise about, because the notice’s own wording undersells both:

  • “Nothing breaks” is literally true and also the wrong takeaway. Auto mode keeps deciding what runs. The only difference is that every classifier check goes back to being a billed token request instead of a free server-side one — which, for a heavy auto-mode session, is the difference the entire release exists to eliminate.
  • The notice fires once per session, not once per action. Press Enter and it won’t reappear in that session; a gateway it named gets a 24-hour grace period before it reappears on the same machine. An action the server’s checks genuinely couldn’t reach doesn’t trigger it either — Claude Code just falls back silently for that one action and asks the server again on the next request. So a session can look “eligible” for a while and then quietly stop being checked, with the only visible signal being the Auto mode server row in /status flipping from Enabled to Disabled.

Who Sees It, and Who Never Does

Per the official documentation, v2.1.278 or later asks for server-side checks by default on:

ConnectionServer-side checks by defaultNotice possible
Pro, Max, Team plansN/ANever — these plans never show the notice
Claude API accountsYesYes, if a gateway sits in the path
Enterprise plansYesYes
Claude Platform on AWSYes (rollout-dependent)Yes
Amazon BedrockYes (rollout-dependent)Yes
Google Cloud’s Agent PlatformYes (rollout-dependent)Yes
Microsoft FoundryYes (rollout-dependent)Yes

Whether a given platform or region actually performs the checks depends on that provider’s own rollout — the docs are explicit that this varies, which is exactly the ambiguity the five gateway bugs below ran into. And on Bedrock, Vertex, Foundry, or a signed-in Claude apps gateway session, only Sonnet 5, Opus 4.7+, and the Fable models support auto mode at all regardless of billing.

The Pass-Through Contract — and What It Doesn’t Document Yet

The billing docs point operators at a fix: implement the pass-through contract in the gateway compatibility guide. Specifically, forward request headers and body fields unchanged — including ones the gateway doesn’t recognize, such as a safeguards request field — and return responses and streaming events without dropping keys such as safeguard_results, or rewriting tool-use IDs.

Here’s the gap: as of this writing, the feature pass-through table on that exact page — the one the billing docs link to as the fix — lists adaptive reasoning, context management, extended context, beta tool fields, effort, structured outputs, prompt caching, and token counting. It does not contain the strings safeguards or safeguard_results anywhere on the page. An operator who follows the link expecting a row to implement against finds seven other capabilities and has to infer the classifier fields from the billing page’s prose instead. This is the same pattern we flagged with the five gateway hint headers Claude Code shipped in v2.1.273: the changelog and a narrowly-scoped doc page ship a behavior change days before the general reference page that operators actually build against catches up.

Four Gateways, Four Confirmations, One Root Cause

What makes this more than a documentation nitpick is that the failure mode isn’t hypothetical — four independent projects, built by different maintainers for different purposes, reproduced the identical notice within the same week:

ProjectWhat it isNotice trigger
cc-switch #7518Local API-key/provider switcher for Claude CodeLocal Routing proxy at 127.0.0.1:15721
free-claude-code #1846Community proxy (fcc-server) for free-tier model accessLocal gateway at 127.0.0.1:8082, reproduced 100% of sessions
CLIProxyAPI #6009Multi-provider CLI proxyRemote proxy over a Tailscale hostname
9router #4196Multi-provider LLM routerRouter endpoint, redacted in the report

The 9router report is the useful one, because its maintainer didn’t stop at reproducing the notice — they traced it to a specific line. Per the issue, open-sse/executors/default.js:166-170 replaces the client’s anthropic-beta header for Claude-routed requests instead of forwarding it unchanged, which the same feature pass-through guidance says breaks capability negotiation generally, not just the classifier billing feature specifically: “A gateway that strips the header while passing the body… produces hard 400 errors; only when both halves are absent together does the feature turn off quietly.” In 9router’s case the header substitution doesn’t 400 — it silently drops whatever capability signal the classifier eligibility check depends on, which is exactly the “turns off quietly” failure mode the guide warns about elsewhere in the same table, just not yet in a row that names this feature.

A fifth report, cc-switch #7538, hit the same notice routing through api.deepseek.com — a non-Anthropic upstream entirely, where the eligibility question doesn’t really apply, which suggests at least some of these reports are operators pattern-matching on the notice text without confirming whether their setup was ever a candidate for server-side checks in the first place. That’s its own small argument for the docs page being more explicit about what “compatible” actually requires before an operator spends time on a fix aimed at the wrong layer.

Fixing It vs. Opting Out

If you maintain a gateway or router in front of Claude Code, the actual remediation is unglamorous: forward anthropic-beta and anthropic-version byte-for-byte rather than reconstructing them, and don’t drop unrecognized request or response fields during content inspection. The gateway compatibility guide frames this as a general principle — treat headers and body fields as open lists, not a closed set you allowlist against — and the classifier billing feature is just the newest thing that principle now covers.

If you’re on the receiving end of a gateway you don’t control and don’t want the held-action prompt, CLAUDE_CODE_AUTO_MODE_SERVER=0 turns off the request for server-side checks entirely:

export CLAUDE_CODE_AUTO_MODE_SERVER=0

Classifier requests then always run as Claude Code’s own, billed the same way they always were, and the notice stops appearing. It’s explicitly called out as a temporary setting that may be removed in a later release, and it isn’t read at all on a direct connection to the Anthropic API — it only does anything behind a gateway or on Bedrock, Vertex, or Foundry. Setting CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 while the auto-mode variable is unset turns the server checks off as a side effect too, which is worth knowing if you’ve already set that variable for an unrelated reason and are confused about why the notice never appears for you.

To check where a running session actually stands, /status has an Auto mode server row: Enabled while the server’s checks are deciding the session’s actions, Disabled once it’s fallen back — whether from CLAUDE_CODE_AUTO_MODE_SERVER=0, an incompatible gateway, or a platform whose rollout hasn’t reached server-side checks yet.

FAQ

Does this change what auto mode allows or blocks? No. The classifier’s decisions are unchanged — this is purely about which requests get billed as separate token usage versus folded into the session’s own model call for free.

Will this notice ever stop appearing for my gateway? Only once the gateway forwards the fields the pass-through contract requires. There’s no client-side setting that silences it permanently short of CLAUDE_CODE_AUTO_MODE_SERVER=0, which keeps you on the old billed path rather than fixing eligibility.

Do Pro, Max, or Team plan users need to do anything? No — the documentation states those plans never show the notice, because the whole billing distinction only applies to Claude API, Enterprise, and the cloud-platform connection paths.

Is a 400 error the same failure as this notice? No. A stripped anthropic-beta header that breaks a different capability, like context management, produces a hard 400. This specific feature is designed to fail quietly to the old billed behavior instead, which is why several of the reports above describe auto mode as fully functional and only the cost as the actual regression.

Browse real-world settings.json and gateway configuration patterns in our gallery.

Related Articles

Explore the collection

Browse all AI coding rules — CLAUDE.md, .cursorrules, AGENTS.md, and more.

Browse Rules