Skip to content

However, this session isn't eligible — Claude Code

Quick fix

Update to a version with the #7893 fix; it writes CLAUDE_CODE_AUTO_MODE_SERVER to settings.json when switching proxies.

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 127.0.0.1:15721...

cc-switch live projection is designed to write key connection, authentication, and model fields, plus provider-specific environment variables on the compatibility list. `CLAUDE_CODE_AUTO_MODE_SERVER` was added in Claude Code 2.1.281 and was not yet on that list, so it was not projected into `~/.claude/settings.json` even when configured in the provider env.

The maintainer fixed this in #7893 by adding the variable to `CLAUDE_EXCLUSIVE_ENV`. It is written when switching to the provider and removed when switching away if unchanged; a global value set by the user is unaffected.

  1. Update cc-switch to a version containing the #7893 fix. It treats `CLAUDE_CODE_AUTO_MODE_SERVER` from the provider env as a Claude-specific compatibility variable.

  2. Set `CLAUDE_CODE_AUTO_MODE_SERVER` to `0` in the provider env that accesses a third-party backend through cc-switch, then reapply that provider in the GUI.

  3. If you cannot update yet, run `export CLAUDE_CODE_AUTO_MODE_SERVER=0` in your shell rc to bypass settings.json rewriting.

ToolClaude Code
Version3.20.4(受影响版本)
PlatformsmacOS
How can I temporarily bypass settings.json rewriting?
Set `export CLAUDE_CODE_AUTO_MODE_SERVER=0` in your shell rc.
Why are other custom env keys preserved while only this variable is missing?
This key was not filtered specifically; at the time, it was not included in the Claude-specific compatibility variable list written by live projection.

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.