claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] claude setup-token/CLAUDE_CODE_OAUTH_TOKEN is not enough to authenticate claude

Open samodadela opened this issue 3 months ago • 10 comments

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?

I ran claude setup-token, got the token and exported in CLAUDE_CODE_OAUTH_TOKEN. Run claude in a fresh container (where claude was never run before) with the exported token. Claude walks me through the usual startup process, theme, choice of authentication (oauth, anthropic key). I was expecting it to just start and be ready for operation

What Should Happen?

When claude is started with an exported CLAUDE_CODE_OAUTH_TOKEN it should just start without asking for authorization.

Error Messages/Logs


Steps to Reproduce

  1. Run claude setup-token
  2. export CLAUDE_CODE_OAUTH_TOKEN
  3. rm -rf .claude*
  4. claude
  5. claude asks for theme and authentication

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.0.5 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

No response

samodadela avatar Oct 04 '25 22:10 samodadela