[BUG] .credentials.json not created during OAuth login — banner shows "Claude API" instead of "Max" (v2.1.76)
Still reproducing on v2.1.76 — .credentials.json missing entirely
Same issue here. Max subscription, OAuth authentication, but banner shows "Opus 4.6 · Claude API" instead of "Max".
Environment
- Claude Code version: v2.1.76
- OS: macOS (MacBook Air)
- Auth method: OAuth (
CLAUDE_CODE_OAUTH_TOKEN) - Model: Opus 4.6
- Subscription: Max (confirmed working — no rate limit issues, usage is within subscription)
Investigation results
.credentials.jsondoes not exist:
````
$ grep subscriptionType ~/.claude/.credentials.json
grep: /Users/***/.claude/.credentials.json: No such file or directory
- No credential/auth files in
~/.claude/at all:
````
$ ls -la ~/.claude/ | grep -i cred
(no output)
$ ls -la ~/.claude/ | grep -i auth
(no output)
- Not in macOS Keychain either:
````
$ security find-generic-password -s "claude-code" -w 2>/dev/null
(not found)
- OAuth token IS present as environment variable:
````
$ echo $CLAUDE_CODE_OAUTH_TOKEN | head -c 10
sk-ant-oat...
- Token is NOT manually set in any shell config:
````
$ grep CLAUDE_CODE_OAUTH_TOKEN ~/.zshrc ~/.zprofile ~/.zshenv ~/.bash_profile ~/.bashrc ~/.profile ~/.env 2>/dev/null
(no output)
Analysis
It appears that Claude Code's /login OAuth flow sets the token internally as CLAUDE_CODE_OAUTH_TOKEN but never creates .credentials.json. Without this file, subscriptionType is unknown, so the CLI falls back to displaying "Claude API".
This has been persisting across multiple versions (confirmed from v2.1.69 through v2.1.76). Full OAuth re-authentication (/logout → /login) does not fix it.
Impact
- Remote Control feature is completely blocked — it requires Max subscription detection, which depends on the subscription type being recognized correctly.
/usagedoes not work properly.- This has been ongoing for months with no resolution.
Expected behavior
After OAuth login with a Max subscription, .credentials.json should be created with "subscriptionType": "max", and the banner should display "Opus 4.6 · Max" instead of "Claude API".
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗