Skip to content

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

@samodadela

Description

@samodadela

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions