claude-code - 💡(How to fix) Fix Claude Code bills API instead of Max subscription — OAuth response missing organizationType for specific org [5 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58625Fetched 2026-05-14 03:43:25
View on GitHub
Comments
5
Participants
2
Timeline
13
Reactions
0
Timeline (top)
commented ×5cross-referenced ×5labeled ×3

Code Example

"organizationType": "claude_max",
"organizationRateLimitTier": "default_claude_max_20x"

---

"oauthAccount": null,
"hasAvailableSubscription": false
RAW_BUFFERClick to expand / collapse

Environment

  • macOS, Claude Code CLI + VS Code extension (both reproduce)
  • Claude Code version: latest

Symptom

Every session shows · API Usage Billing. After OAuth, ~/.claude.json writes oauthAccount: null and hasAvailableSubscription: false, causing Claude Code to fall through to API billing instead of consuming the Max subscription.

Affected org

6a3344e3-6ad4-44ef-a191-cc40aba0f8a9 (Claude Max 20x — Anthropic support confirmed subscription is active for this org)

Working pre-incident state (from backup ~/.claude.json)

"organizationType": "claude_max",
"organizationRateLimitTier": "default_claude_max_20x"

Current post-OAuth state

"oauthAccount": null,
"hasAvailableSubscription": false

Proof this is server-side

Modified the OAuth URL's orgUUID param to a different org on the same account (7e6c2941-f4cf-42db-b0a1-93f3b9224dd5) — that org's metadata wrote correctly into ~/.claude.json (UUID and name populated). The OAuth flow itself works. The affected org's backend response is specifically missing subscription metadata fields.

Also tested: removed Google SSO requirement from the affected org and retried with email-only login — still returned null. SSO routing is not the cause.

Client-side exhaustively ruled out

  • No ANTHROPIC_API_KEY anywhere: env, shell rc, launchctl, settings.json, managed-settings.json, root-owned managed-settings
  • Keychain entries (Claude Code-credentials, Claude Code-credentials-ab061586) fully deleted and re-created
  • Fresh CLAUDE_CONFIG_DIR tested
  • Switched to plain Sonnet 4.6 (ruling out 1M-context tier as cause)
  • Both VS Code extension and standalone CLI reproduce identically

Request

Backend investigation into why org 6a3344e3-6ad4-44ef-a191-cc40aba0f8a9 is not returning organizationType / organizationRateLimitTier in its OAuth response. The subscription is confirmed active — the metadata is simply not being returned for this specific org.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING