[BUG] Claude Code bills API instead of Max subscription — OAuth returns null subscription metadata

Resolved 💬 3 comments Opened May 13, 2026 by BradFEDCON Closed May 16, 2026

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?

After OAuth login, ~/.claude.json writes oauthAccount: null and hasAvailableSubscription: false for my personal Claude Max 20x org (6a3344e3-6ad4-44ef-a191-cc40aba0f8a9). The status bar shows "· API Usage Billing" on every model, so Claude Code falls through to billing my Console API credits instead of consuming the Max subscription.

Anthropic support has confirmed the Max subscription is active on this org. The OAuth backend is simply not returning organizationType / organizationRateLimitTier in the response for this specific org.

Proof this is server-side: I modified the OAuth URL's orgUUID param to swap to a different org on the same account (7e6c2941-f4cf-42db-b0a1-93f3b9224dd5). That org's metadata wrote correctly into ~/.claude.json. The OAuth flow itself works — the affected org's backend response is specifically missing subscription metadata.

I also removed Google SSO from the affected org and retried with email-only login — still returned null. SSO routing is not the cause.

What Should Happen?

After OAuth, ~/.claude.json should write:
oauthAccount: { ... populated ... }
hasAvailableSubscription: true
organizationType: "claude_max"
organizationRateLimitTier: "default_claude_max_20x"

Status bar should show Max subscription consumption, not "API Usage Billing".

Error Messages/Logs

Pre-incident ~/.claude.json (working state from backup):
  "organizationType": "claude_max",
  "organizationRateLimitTier": "default_claude_max_20x"

Current post-OAuth state:
  "oauthAccount": null,
  "hasAvailableSubscription": false

Steps to Reproduce

  1. Run /logout in Claude Code
  2. Delete keychain entries: Claude Code-credentials and Claude Code-credentials-ab061586
  3. Run claude to trigger fresh OAuth
  4. Complete OAuth in browser for org 6a3344e3-6ad4-44ef-a191-cc40aba0f8a9 (Claude Max 20x)
  5. Run: jq '.oauthAccount, .hasAvailableSubscription' ~/.claude.json
  6. Observe: returns null and false
  7. Status bar shows "· API Usage Billing" instead of Max subscription

Account: bradley.egbert@federalgovernment.info
Affected org UUID: 6a3344e3-6ad4-44ef-a191-cc40aba0f8a9

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.140 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

Client-side causes exhaustively ruled out over 5+ hours:

  • No ANTHROPIC_API_KEY anywhere: env, shell rc, launchctl, settings.json, managed-settings.json, root-owned managed-settings
  • Both keychain entries fully deleted and re-created
  • Fresh CLAUDE_CONFIG_DIR tested
  • Switched between Sonnet 4.6 and Opus 4.7 — both reproduce
  • VS Code extension and standalone CLI reproduce identically
  • Google SSO removed from org, retested with email login — still null

Related: https://github.com/anthropics/claude-code/issues/58625
Also emailed support@anthropic.com with same details.

Other orgs on this account (for backend cross-reference):

  • 7e6c2941-f4cf-42db-b0a1-93f3b9224dd5 (FEDCON team, Console — OAuth works correctly)
  • 8b7c680b-1c0e-4124-b824-dbfd2940d5ba (Personal Console — OAuth works correctly)

View original on GitHub ↗

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