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.
Symptom
Section titled “Symptom”claude code仍提示需要登陆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.
Upgrade CC Switch to v3.16.3, which auto-injects the required placeholder when taking over a managed Codex provider.
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"}}
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- 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.
Related problems
Section titled “Related problems”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.