Skip to content

Login required: Claude Code missing ANTHROPIC_AUTH_TOKEN

Quick fix

Upgrade to v3.16.3; on older versions add an ANTHROPIC_AUTH_TOKEN placeholder to Claude Code's env.

Error output
claude code仍提示需要登陆
English translation

claude code still prompts that login is required

When takeover is enabled for a managed Codex provider, Claude Code's live config may lack `ANTHROPIC_AUTH_TOKEN`, triggering the login prompt. Reported in v3.16.1 and v3.16.2.

The maintainer states v3.16.3 auto-injects an `ANTHROPIC_AUTH_TOKEN` placeholder during takeover, covering hot switches, fresh installs, and old configs that lost the key.

  1. Upgrade CC Switch to v3.16.3, which auto-injects the required placeholder when taking over a managed Codex provider.

  2. If you cannot upgrade yet, manually add an `ANTHROPIC_AUTH_TOKEN` placeholder to `env` in the Claude Code config, then start Claude Code.

    ~/.claude/settings.json
    {
    "env": {
    "ANTHROPIC_AUTH_TOKEN": "PROXY_MANAGED"
    }
    }
ToolClaude Code
Version受影响:3.16.1 - 3.16.2;已在 v3.16.3 修复
PlatformsWindows
What if manually adding "ANTHROPIC_AUTH_TOKEN": "" does not fix it?
Use `"ANTHROPIC_AUTH_TOKEN": "PROXY_MANAGED"` instead; after upgrading to v3.16.3 no manual change is needed.
Do I need to re-edit the config file when switching models back and forth?
v3.16.3 auto-injects the placeholder during takeover; the maintainer states no manual config edits are needed.

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.