[BUG] Onboarding flow login prompt does not consider `ANTHROPIC_AUTH_TOKEN` env var from settings files
Resolved 💬 4 comments Opened Feb 25, 2026 by cflee Closed Mar 20, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
After configuring a fresh Claude Code install with an ANTHROPIC_AUTH_TOKEN env var in a settings files, when going through the onboarding flow, it still stops the user and requires selecting an login method, and doesn't use the already-configured env var.
What Should Happen?
The onboarding flow should move from the theme selection screen to the security notes screen, skipping the mandatory login method selection screen.
Error Messages/Logs
Steps to Reproduce
- Ensure you have a fresh Claude Code environment – either with no
~/.claude.jsonfile present, or by removing thehasCompletedOnboardingkey in~/.claude.json. - In the
~/.claude/settings.jsonfile, set theenvto contain an object with a value forANTHROPIC_AUTH_TOKEN.
``json``
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "asdf"
}
}
- Run
claude. - It will start the onboarding flow, the first page is the theme setting, press enter.
- Observe that the next page is the "Select login method:" screen.
- Ctrl-C repeatedly to exit.
- Run
ANTHROPIC_AUTH_TOKEN="asdf" claude. - It will restart the onboarding flow, press enter to select the theme.
- Observe that the next page is the "Security notes:" screen, the select login method screen is skipped and no longer blocking.
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.52
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗