Claude Code CLI always selects API Usage Billing org instead of Max plan on second Mac

Resolved 💬 4 comments Opened Feb 19, 2026 by tomogouke-lang Closed Feb 23, 2026

Description

Claude Code CLI on MacBook Air always authenticates to the "API Usage Billing" organization instead of the Max plan (stripe_subscription) organization. The same account works correctly on MacBook Pro.

Environment

  • MacBook Pro (works): macOS, Claude Code v2.1.42, user: gouke
  • MacBook Air (broken): macOS, Claude Code v2.1.47 (also tested v2.1.42), user: air-gouke
  • Plan: Claude Max (5x)
  • Auth method: OAuth (claude.ai)

Symptoms

  1. claude auth login → browser opens → "Login successful"
  2. claude auth statusloggedIn: true, authMethod: "oauth_token", apiProvider: "firstParty"
  3. Claude Code UI shows: Sonnet 4.6 · API Usage Billing · <email>'s Organization
  4. Any message → API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid bearer token"}}
  5. On claude.ai (browser), the account correctly shows Max plan with the correct organization

What we tried (all failed)

  1. claude auth logoutclaude auth login (multiple times)
  2. Complete uninstall (npm -g uninstall, rm -rf ~/.claude, rm ~/.claude.json, keychain cleanup) → reinstall → login
  3. Tested with v2.1.42, v2.1.47, and latest
  4. Copied keychain credentials from working MacBook Pro
  5. Copied .claude.json with correct oauthAccount (billingType: "stripe_subscription") from MacBook Pro
  6. Set ANTHROPIC_ORG_ID environment variable to the correct org UUID
  7. Verified on platform.claude.com: only one org exists ("personal org" with API plan)
  8. Verified on claude.ai: Max plan is active, correct org ID shown in account settings

Root cause hypothesis

The OAuth flow (claude.ai/oauth/authorize → redirect to platform.claude.com/oauth/code/callback) always resolves to the default API platform organization instead of the Max plan (stripe_subscription) organization. There is no way for the user to select which organization to authenticate with during the OAuth flow.

On MacBook Pro, the authentication was originally set up when this behavior worked correctly. On a new machine (MacBook Air), fresh authentication always picks the wrong org.

Related issues

  • #20976 - Max plan shows as 'API Usage Billing' in CLI
  • #22990 - Opus 4.5 API Usage Billing can't use claude CLI max plan anymore
  • #17402 - /login reports success but bearer token is invalid
  • #12383 - Claude Code for Desktop always shows 'Claude API Account'
  • #12740 - Claude Code connects to Pro Account instead of selected Team organization

Expected behavior

Claude Code CLI should authenticate with the Max plan organization when the user has an active Max subscription, or provide a way to select/switch organizations during or after authentication.

Impact

Unable to use Claude Code CLI on any new machine. Spent 6+ hours troubleshooting with no resolution. The only working machine is the one where auth was originally configured before this bug appeared.

View original on GitHub ↗

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