[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

  1. Ensure you have a fresh Claude Code environment – either with no ~/.claude.json file present, or by removing the hasCompletedOnboarding key in ~/.claude.json.
  2. In the ~/.claude/settings.json file, set the env to contain an object with a value for ANTHROPIC_AUTH_TOKEN.

``json
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "asdf"
}
}
``

  1. Run claude.
  2. It will start the onboarding flow, the first page is the theme setting, press enter.
  3. Observe that the next page is the "Select login method:" screen.
  4. Ctrl-C repeatedly to exit.
  5. Run ANTHROPIC_AUTH_TOKEN="asdf" claude.
  6. It will restart the onboarding flow, press enter to select the theme.
  7. 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_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗