-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed as duplicate
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Environment
- Platform (select one):
- Anthropic API
- AWS Bedrock
- Google Vertex AI
- Other:
- Claude CLI version: Since 1.0.67
- Operating System: Linux c956dfb691a7 6.14.10-orbstack-00291 aarch64 GNU/Linux
- Terminal: xterm-256color
Bug Description
When headless claude --print
And CLAUDE_CODE_OAUTH_TOKEN set in environment
Or present in $HOME/.claude/.credentials.json
Then authenticate with OAuth token
And ignore ANTHROPIC_API_KEY
Steps to Reproduce
# Remove ANTHROPIC_API_KEY
unset ANTHROPIC_API_KEY;
# Install 1.0.68 (latest as of 5 August)
npm install -g @anthropic-ai/claude-code@1.0.68;
claude --version # 1.0.68 (Claude Code)
# Simple test asserts OAuth token usage
echo "ping" | CLAUDE_CODE_OAUTH_TOKEN=$(cat $HOME/.claude/.credentials.json | jq -r '.claudeAiOauth.accessToken') claude -p # Credit balance is too lowExpected Behavior
When headless claude --print
And CLAUDE_CODE_OAUTH_TOKEN set in environment
Or present in $HOME/.claude/.credentials.json
Then authenticate with OAuth token
And ignore ANTHROPIC_API_KEY
Actual Behavior
CLAUDE_CODE_OAUTH_TOKEN is ignored; falls back to ANTHROPIC_API_KEY if present in environment.
Additional Context
Last known good version 1.0.66
Claude Max Subscription (paid to September 2025)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists