Skip to content

session isn't eligible: Claude Code Local Routing

Quick fix

For a non-Anthropic upstream or format conversion, set CLAUDE_CODE_AUTO_MODE_SERVER=0 in the provider env.

Error output
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.

Claude Code's free server-side classifier depends on an Anthropic-format upstream returning `safeguard_results`. The maintainer explained that Local Routing for Anthropic-format providers forwards `safeguards` unchanged and returns `safeguard_results`; OpenAI Chat, OpenAI Responses, Gemini, and other format conversions, as well as any non-Anthropic upstream, do not have this server-side classifier. Claude Code therefore falls back to the local billed classifier and shows a one-time prompt.

A comment in the issue said the conversion path had previously dropped related fields and mentioned #7636, but the maintainer's final status remained clear: non-Anthropic upstreams always fall back. This is not an Auto Mode failure; the free server-side classifier is unavailable, changing billing and prompting.

  1. Confirm whether the provider uses Anthropic format. If it is an Anthropic-format provider, check for a relay between CC Switch and the Anthropic upstream that removes `safeguards` or `safeguard_results`.

  2. If the provider uses OpenAI Chat, OpenAI Responses, Gemini, or another format conversion, or its upstream is not Anthropic, set `CLAUDE_CODE_AUTO_MODE_SERVER=0` in that provider's `env`, then restart Claude Code.

ToolClaude Code
Version3.20.4
PlatformsWindows

(No FAQ yet)

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.