DEV Community

Ahab
Ahab

Posted on Originally published at indieseek.co

Claude Code 2.1.278 auto mode: diagnose classifier billing fallback through a gateway

Claude Code 2.1.278 auto mode: diagnose classifier billing fallback through a gateway

Quick answer

Claude Code v2.1.278 changes how auto mode checks actions for Claude API and Enterprise users, and for supported Bedrock, Google Cloud Agent Platform, Microsoft Foundry, and gateway sessions. It asks the server to classify eligible actions within the session's model requests. When the server performs those checks, Anthropic says there is no separate classifier-request charge. If the server-side path cannot reach the session, Claude Code continues with its own classifier requests, which can be billed as before. The action can pause for an eligibility notice; this is not permission bypass and does not mean all model usage is free.

Check /status for the Auto mode server row, exercise a harmless action that requires classification, and capture whether a fallback notice appears. If a gateway is in the path, investigate header, request-field, response-field, streaming-event, and tool-use-ID preservation before deciding to opt out. This is a rollout and cost-diagnosis guide, not a guarantee of eligibility or savings in your account.

Who this is for

This is for Claude Code users and administrators who deliberately select auto mode, especially teams routing Claude traffic through a company gateway or one of the listed cloud providers. It also helps Agent SDK operators recognize the non-interactive warning. Pro, Max, and Team subscribers do not see the specific classifier-charge notice described in Anthropic's documentation; do not use this article to infer their entire billing model.

Our earlier Claude Code 2.1.276 proxy-400 recovery checklist concerns a request failure caused by an advisor_20260301 input tag. Here the session can keep working while classifier requests fall back to a billed path. Diagnose those two symptoms separately.

What changed, and the boundary of the promise

Anthropic's v2.1.278 release says server-side classification is the default in the covered environments. Its classifier billing guide explains that a single action that the server cannot check can be handled locally and retried on the next request; the notice appears only once the server's checks have stopped reaching the session for the rest of it. Platform, region, credential, model support, and gateway behavior all affect what is available. A /status row of Disabled refers to server-side checks in that session, not necessarily auto mode itself.

Session path What to inspect Interpretation
Direct Claude API or Enterprise account Version, auto mode, supported model, /status Server checks requested by default; a fallback may be provider/credential-specific. The gateway opt-out variable is not read on direct API connections.
Bedrock, Google Cloud Agent Platform, Foundry, or signed-in gateway Model eligibility, provider rollout, /status, notices Availability is conditional; a gateway or region may prevent server checks.
Company proxy between client and provider Request and response pass-through, streaming events, tool-use IDs Stripped or rewritten fields can trigger billed local classification.
Pro, Max, or Team Auto-mode behavior and normal plan documentation Anthropic says the specific charge notice does not appear; do not extrapolate API billing claims.

Anthropic documents narrower model support on Bedrock, Google Cloud Agent Platform, Foundry, and signed-in gateways: Sonnet 5, Opus 4.7 or later, and Fable models. Verify current permission-mode availability before treating a missing server row as a network bug. Auto mode itself is not a substitute for review on sensitive operations, and explicit ask/deny rules continue to matter.

A bounded diagnosis workflow

  1. Record the route, not a secret. Note Claude Code version, plan or API account category, model, provider, whether ANTHROPIC_BASE_URL points to a gateway, auto-mode status, and /status's Auto mode server value. Redact tokens and proprietary prompt content.
  2. Trigger one harmless classified action. In a disposable repository, ask for a benign shell command or allowed network check. A file read or ordinary edit may skip the classifier and cannot establish server-side eligibility. Record whether the action runs, prompts, or shows the classifier-charge notice.
  3. Separate intermittent from persistent fallback. One locally handled action alone does not trigger the notice. If the notice pauses an interactive action, Enter continues it with Claude Code's own classifier requests, billed as before; Esc or Ctrl+C cancels that action and stops the turn. Neither choice repairs the gateway.
  4. Trace the gateway contract with sanitized fixtures. Anthropic names request headers, unrecognized fields such as safeguards, response fields such as safeguard_results, streaming-event keys, and tool-use IDs as relevant pass-through points. Compare a direct path and a gateway path where policy permits. Never capture raw credentials or real customer data just to debug this.
  5. Choose a controlled response. If the gateway can preserve the contract, fix it and start a new session to recheck server classification. If it cannot, on Bedrock, Agent Platform, Foundry, or gateway routes set CLAUDE_CODE_AUTO_MODE_SERVER=0 before a new session; this deliberately uses the potentially billed client classifier and suppresses the eligibility notice. Anthropic calls this setting temporary. On a direct Anthropic API connection, the variable is not read. If rollout or credential support is the cause, ask the provider or admin rather than weakening the gateway blindly.

Five-case rollout matrix

Use a test account and compare actual usage records; this is a proposed acceptance plan, not a claim that IndieSeek tested your gateway or billing.

Canary Pass evidence
Baseline direct route Supported session enters auto mode, harmless action completes, /status records server row, no charge notice.
Gateway route Same fixture completes with fields and tool-use IDs intact; record status and any warning, not only the final answer.
Deliberate gateway field drop in test only Warning or fallback is captured without leaking traffic; stop after one fixture and restore the gateway. Do not induce this in production.
Non-interactive -p or Agent SDK Warning is observed on stderr or as a system message in stream-json; automation does not mistake it for success or suppress it.
Policy negative control A harmless action governed by an explicit ask/deny rule still respects that rule; server-side billing change is not permission expansion.

Keep classifier-location, action outcome, explicit policy result, and separately measured usage in the same receipt. A green task summary without those fields cannot demonstrate cost or safety behavior.

version: 2.1.278+
route: direct_api | bedrock | agent_platform | foundry | gateway
model_and_auto_mode: 
gateway_present: yes | no
auto_mode_server_status: Enabled | Disabled | unavailable
notice_seen: yes | no
held_action: continued | cancelled | none
classified_canary: pass | fail
explicit_policy_canary: pass | fail
classifier_usage_evidence: 
decision: promote | fix_gateway | accept_billed_fallback | hold
owner: 
Enter fullscreen mode Exit fullscreen mode

Common mistakes

  • Calling the no-charge server classifier โ€œfree Claude Code.โ€ The claim is limited to separate classifier checks when the server performs them.
  • Confusing a billing-path fallback with auto mode turning off, or with the separate repeated-block threshold that can resume human prompts.
  • Diagnosing an ordinary file read as a classifier test when it may skip classification.
  • Setting CLAUDE_CODE_AUTO_MODE_SERVER=0 and calling it a free fix: it opts out to the client classifier, which can be billed.
  • Logging raw prompts, credentials, or customer data while investigating a gateway; use sanitized comparisons.

Building something? Turn your product page into a show people want to watch with PromoFastโ€”hosted, embeddable, and ready to export.

FAQ

Does a single missed server check trigger the notice?

No. Anthropic says Claude Code can handle one action with its own classifier and ask the server again next time. The notice follows a persistent session fallback.

What happens in headless runs?

With -p, the warning goes to stderr; in stream-json it is a system warning message. Record it as a distinct state, not a successful server-side check.

Should I disable auto mode to avoid all charges?

This release concerns the location and billing of classifier requests, not the entire model bill. Choose the permission mode for your risk boundary and measure actual usage; the gateway opt-out uses the potentially billed local classifier.

Sources

Originally published on IndieSeek.

Top comments (0)