[BUG] Claude Code is stuck in "API Billing" despite having active Pro Subscription
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?
Claude Code routes to API billing org instead of Pro subscription despite --claudeai and all workarounds
I'm locked out of my Pro subscription Claude Code for over two weeks. I got no reply from Anthropic support channels, AI bots or emails. I found a few other issues where people are experiencing the same issues, no resolution.
Claude Code version: v2.1.142 / v2.1.143
OS: macOS
Install method: Homebrew (/opt/homebrew/Caskroom/claude-code/)
---
Problem
Claude Code header shows API Usage Billing and routes all requests to the Console API org instead of the claude.ai Pro subscription. The Pro subscription is active and working — Claude Desktop and claude.ai web both correctly show and use the Pro plan on the same account.
The account has two orgs under the same email:
- claude.ai → Pro subscription (active, working in Desktop/web)
- platform.anthropic.com → "Individual Org / API plan"
Claude Code invariably picks the API plan org. Every request fails with a billing error against that org.
The problem is Claude Code routing to the wrong org entirely. And no matter what I try I just can't switch the Claude Code back to Subscription mode.
---
Evidence
~/.claude/settings.json with workaround applied — still shows API Usage Billing in header:
witohut this file it is also in API Billing
Claude Code v2.1.142
Opus 4.7 (1M context) · API Usage Billing
Env inside Claude Code session (no API key, no Vertex vars):
AI_AGENT=claude-code_2-1-142_agent
CLAUDE_CODE_ENTRYPOINT=cli
CLAUDECODE=1
CLAUDE_CODE_SESSION_ID=3ae24264-382e-4949-a78a-0c714d06895f
CLAUDE_CODE_EXECPATH=/opt/homebrew/Caskroom/claude-code/2.1.142/claude
CLAUDE_EFFORT=xhigh
Claude Desktop on same account correctly shows Pro plan. Console shows separate "Olga's Individual Org / API plan" org — this is the org Claude Code is routing to.
---
Root cause hypothesis
The --claudeai OAuth flow completes successfully but the server resolves the token to the Console API org rather than the claude.ai subscription org. No local config change, auth reset, or reinstall can override server-side org selection. forceLoginMethod: claudeai has no effect either.
The trigger appears to be using the ant CLI (Anthropic Managed Agents SDK) with ANTHROPIC_API_KEY set in a separate terminal session — after that session, Claude Code permanently routes to the API org.
---
Expected behaviour
claude auth login --claudeai should consistently select the claude.ai subscription org, not the Console API org, for an account that has an active Pro subscription.
---
Related issues: #40688, #26839, #20976 — all closed mostly without resolution. All issues that I found that did have any resolution mentioned - I tried them and still no luck.
Anthropic support does not respond.
<img width="663" height="627" alt="Image" src="https://github.com/user-attachments/assets/b0743603-6570-4c84-9e42-a5c6af3c0f26" />
<img width="650" height="184" alt="Image" src="https://github.com/user-attachments/assets/06282150-bb43-4867-9e12-228fb5faff66" />
My Claude Desktop correctly shows "Pro":
<img width="375" height="292" alt="Image" src="https://github.com/user-attachments/assets/a4e43b80-04e1-400c-bdf1-36d249b0d347" />
But my Anthropic console shows "API Billing" and I think this is where the problem is, but there is nothing that I can do to change it.
<img width="646" height="310" alt="Image" src="https://github.com/user-attachments/assets/7b639906-0395-4c52-96df-216535fb14b6" />
What Should Happen?
I should be able to use my subscription. Instead I am locked out, and I am not getting any support. I have annual subscription and I have no clue how to resolve this issue. It looks like a bug either in Claude Code or on Anthropic side and there is nothing more that I or Opus can do to debug this further. At the very least there should be some acknowledgement from Anthropic at this stage. It's been weeks now trying to troubleshoot or access support
Error Messages/Logs
▐▛███▜▌ Claude Code v2.1.142
▝▜█████▛▘ Sonnet 4.6 · API Usage Billing <---- should be Pro
Steps to Reproduce
What I've tried (all unsuccessful)
Auth resets:
/logininside Claude Codeclaude auth logout && claude auth login --claudeai- Full macOS Keychain wipe Claude/Anthropic creds followed by fresh
claude auth login --claudeai— browser OAuth completes, "Login successful", still routes to API billing
Config:
- Added
"forceLoginMethod": "claudeai"to~/.claude/settings.json— no effect, still shows API Usage Billing upon re-launch - Cleared all cache fields from
~/.claude.json(cachedDynamicConfigs,s1mAccessCache,passesEligibilityCache,overageCreditGrantCache,cachedExtraUsageDisabledReason, and ~10 others) - Verified
~/.claude.jsonoauthAccountsection is correct:billingType: stripe_subscription,organizationType: claude_pro
Environment:
ANTHROPIC_API_KEYnot set- see below env vars checked from inside Claude Code session
- No Vertex/Console env vars set (
env | grep -iE 'VERTEX|ANTHROPIC_VERTEX'returns nothing) - Env inside Claude Code session confirms no API key or auth env vars present
Full reinstall:
rm -rf ~/.claude ~/.claude.json- Keychain entries cleared
- Reinstalled Claude Code
- Fresh
claude auth login --claudeai - Still routes to API billing org
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
any version
Claude Code Version
v2.1.142
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗