Both ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY set · Claude Code
Quick fix
Switching from DeepSeek or MiMo to Codex writes both authentication variables at once; this issue has no confirmed Codex fix.
Symptom
Section titled “Symptom”Both ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY set · auth may not work as expectedIn a Windows report on CC Switch 3.16.5, after switching from DeepSeek or MiMo to Codex, both `ANTHROPIC_API_KEY` and `ANTHROPIC_AUTH_TOKEN` appear in `~/.claude/settings.json`. Claude Code therefore shows the dual authentication environment variable warning.
The same report states that after switching back from Codex to DeepSeek or MiMo, only `ANTHROPIC_AUTH_TOKEN` remains in the file, and Claude Code runs normally. The reporter did not configure any extra environment variables; the issue contains no maintainer-confirmed root cause or Codex-specific fix.
To temporarily restore a configuration that uses only `ANTHROPIC_AUTH_TOKEN`, switch back from Codex to DeepSeek or MiMo; the report describes Claude Code as running normally in this state.
If you must use Codex, the current issue offers no confirmed workaround; keep your reproduction steps and the authentication fields in `~/.claude/settings.json` for follow-up.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- I ran into this problem too. Is there a temporary workaround?
- The thread has no confirmed Codex workaround. The report only states that after switching back to DeepSeek or MiMo, `~/.claude/settings.json` keeps only `ANTHROPIC_AUTH_TOKEN`, and Claude Code runs normally.
- Even with this problem, I can still chat in the terminal. It is unclear what impact this has.
- The thread records feedback that terminal chat still works, but it only explicitly shows the Claude Code dual authentication variable warning; no further impact is described.
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.