[BUG] Claude Code silently billed $447 to API instead of Max subscription, then gave incorrect auth confirmation
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 version: Latest (as of May 25, 2026)
OS: macOS (Darwin 25.3.0)
What happened
During Claude Code CLI sessions on May 24-25, 2026, my authentication silently
defaulted to API billing instead of my active Max subscription. I was charged $447.30
in API credits that should have been covered by Max.
The critical issue
When I explicitly asked Claude Code to verify my billing mode during the session, it
incorrectly confirmed I was on my Max subscription — twice. I relied on this and
continued working. The Usage dashboard at console.anthropic.com also showed $0 at the
time due to a reporting lag, further masking the problem.
The issue was only discovered after the session. Running claude auth login followed by
claude auth status then correctly showed subscriptionType: "max".
Three compounding failures
- Auth defaulted to API billing without any warning, despite having an active Max
subscription
- Claude Code gave incorrect billing confirmation when directly asked — twice
- Usage dashboard showed $0 due to reporting lag, hiding the charges
Expected behavior
- Claude Code should use Max subscription when one is active
- If falling back to API billing, it should warn the user explicitly
- claude auth status (or equivalent checks during a session) should return accurate
billing information
Support response
I contacted support@anthropic.com requesting a refund. The AI support agent denied it,
stating "API credits that have been consumed are non-refundable under our Credit
Terms... regardless of the underlying cause — including authentication issues or
product bugs." It also stated it cannot escalate to a human reviewer.
A policy that charges users $447 due to a product bug, gives them incorrect
information when they try to verify, and then refuses a refund with no human
escalation path is not acceptable.
What Should Happen?
- Claude Code should use Max subscription when one is active
- If falling back to API billing, it should warn the user explicitly
- claude auth status (or equivalent checks during a session) should return accurate
billing information
Error Messages/Logs
Steps to Reproduce
Error: Exit code 127
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code version: Latest (as of May 25, 2026) OS: macOS (Darwin 25.3.0)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Support response
I contacted support@anthropic.com requesting a refund. The AI support agent denied it,
stating "API credits that have been consumed are non-refundable under our Credit
Terms... regardless of the underlying cause — including authentication issues or
product bugs." It also stated it cannot escalate to a human reviewer.
A policy that charges users $447 due to a product bug, gives them incorrect
information when they try to verify, and then refuses a refund with no human
escalation path is not acceptable.
Showing cached comments. Read the full discussion on GitHub ↗
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is not a duplicate. The linked issues may report similar auth bugs, but my issue
specifically documents:
separate, compounding failure
The auth bug may be known, but the billing impact and support response need to be
addressed. This issue should remain open until a refund is processed.
This is not a duplicate — it's the same unresolved bug still costing users money.
The linked issues prove this is a known, recurring pattern:
API billing — reported May 13, still open
— €84.68 charged, still open
None of these have been resolved or refunded. Combined with my $447.30, that's over
$600 in documented charges from the same class of bug across at least 4 users. The
auto-close bot flagging these as "duplicates" is actually evidence that Anthropic is
aware of this problem but hasn't fixed it or made the affected users whole.
I'm requesting this issue remain open until: (1) the auth bug is fixed, and (2)
affected users are refunded.
I had exactly the same problem. I got charged close to $1600 from May 23rd to May 25th.
@drdonnelly I figured out what is going on.
At some point in the last couple of days, claude code overrode my max plan and kept defaulting to APIs. I did everything from uninstall to reinstall and it did not work. When I installed it on a fresh machine, it recognized my max plan.
After some research, I found an anthropic directory in ~/.config/anthropic which contains a credentials file. It has workspace name and some credentials in it.
I backed up that folder and deleted it. And launched Claude Code and it automatically asked me to login and this time it shows Claude Max as the subscription in the welcome screen as well as usage stats.
@prasadt3's root-cause find is the cleanest articulation I've seen of this failure mode so far. The stale credentials file in
~/.config/anthropic/taking precedence over the active Max subscription session — and the auth confirmation routing through the same stale credentials, hence the "confirmed Max" lie — explains both the silent billing divergence and the incorrect verification response in one mechanism.A few cross-references that may help bracket this:
This is the same cluster as #58625, #61704, #58083 — but the surface is broader
This failure mode now spans at least 4 surfaces in the May 2026 issue corpus:
The architectural shape they share: the agent surface and the billing surface read from different state sources, and when they disagree, the agent surface always wins for the user-facing report. No verification path exists for the operator to cross-check "what billing context will this session actually charge against" before tokens are spent.
This is also one of the four open clusters I've been tracking publicly at <https://yurukusa.github.io/cc-safe-setup/cluster-tracker.html> — the "multi-account" cluster (#18435 / #27302 / #36151, combined 1,178 reactions). Different surface manifestations, same architectural gap.
Operator-side hardening that catches this before the bill arrives
While the upstream fix is pending, two MIT defense hooks shipped to cc-safe-setup last week target this specific divergence:
account-routing-preflight.sh(PR #328, SessionStart hook). Refuses session start when the active credentials file's account doesn't match the expected account for the working directory. Catches the prasadt3-style stale credentials shadow before the session even begins.account-billing-log.sh(same PR, Stop hook). Logs per-session billing reconciliation events (what account, what tokens, expected vs. actual) so the divergence is surfaced in seconds rather than at the end-of-month bill.Install (from main branch, npm publish pending):
MIT, no telemetry, single-file install. The hooks log to
~/.claude/billing-log/so you have a per-session audit trail to attach to any refund request.Suggested triage discipline for anyone hitting this
cat ~/.config/anthropic/credentials.json(or wherever your platform stores it) and check theworkspace_id/account_idfield. If it doesn't match what you expect, back it up and delete (prasadt3's fix). Re-auth.console.anthropic.comusage in real time (the lag the original report mentions is real — but it's bounded; if usage is non-zero on a Max-eligible session within ~5 minutes, you're being charged API).Happy to add prasadt3's specific reproduction (stale
~/.config/anthropic/file) to theaccount-routing-preflighthook's symptom catalogue if useful — the current version covers OAuth-refresh-null but doesn't explicitly check for credentials-file staleness as a distinct trigger.Same pattern here. Was charged ~€180 to API via Claude Code in early May despite an active Max subscription. Session logs showed sub usage, invoice told a different story. Support was an AI loop - "API credits are non-refundable" regardless of cause.
I've started working on this to help with the issue: cost.botzone.ai (https://github.com/botzone-ai).
Same thing here — adding cross-platform confirmation plus a root cause and the only fix that worked for me.
I'm also a Max subscriber, on Windows (your report is macOS — so this isn't OS-specific). The charges drained the Extra Usage on my Max subscription. My developer Console account is at $0.00 and has never been used — so this is subscription-side Extra Usage being silently consumed, not developer-API usage.
I hit the same "the tool reassures you while it keeps billing you" failure:
/login→ subscription flipped my banner to Claude Max, but Extra Usage kept draining anyway. The only thing that actually stopped it was uninstalling the standalone Claude Code CLI. I have both Claude Desktop and the CLI installed — the dual install is the trigger: despite the active subscription, the CLI silently runs in a metered "API Usage Billing" mode that charges Extra Usage instead of drawing on the plan's included allowance. (To be clear: "API Usage Billing" is just the CLI's label for metered rates — the money still comes out of the subscription's Extra Usage, not a separate developer-API balance.)I also got the identical refund denial — "consumed credits are non-refundable… regardless of the underlying cause, including bugs" — and the AI agent first said it couldn't escalate. (I did eventually reach a human reviewer by pushing back, so it is possible.)
I've documented this in detail —
/statusoutput, the dual-install behavior, and the fix — here: anthropics/claude-code#68501This really needs an official response. Subscribers are being silently billed real money for usage that should be covered by their plan, then told it's non-refundable.
Hit this exact bug. I have an active Max subscription and was logged in via claude.ai OAuth. The moment I added
ANTHROPIC_API_KEYto my Windows user environment variables and opened a new terminal, Claude Code started billing my API credits instead of the subscription — no warning, nothing.Running
claude auth statusshowed:subscriptionTypegoesnullas soon as the env var is present. The Max subscription is still active, Claude Code just silently stops using it.No dual install involved, no Desktop app conflict. Just adding the API key to user env is enough to trigger it. And since
/statusdoesn't flag anything unusual, there's no way to know it's happening mid-session.Would be a huge improvement if Claude Code warned on startup when it detects this conflict — "API key found, this overrides your subscription billing, is that what you want?" — rather than silently switching.
Adding a related billing-mode / credit-ledger datapoint from a separate unresolved Claude billing case, kept public-safe.
This issue is useful because it shows another place where Claude-visible/auth-visible state can diverge from the billing system that actually charges or gates the user. In this thread, the reported shape is subscription/auth state implying one billing mode while metered/API billing is used instead, with support/refund routing not resolving the mismatch.
My current case is a different surface, but the ownership gap is similar:
The useful overlap is not that every case has the same root cause. It is that Anthropic needs one owner path for billing-mode/auth context, subscription entitlement, usage-credit ledger, and runtime charge/gate behavior when those systems disagree.
Actionable owner request: please route this class of issues to Billing Platform / payment operations plus Claude Code auth/runtime entitlement owners who can inspect which account, org/workspace, billing mode, subscription entitlement, API/usage-credit ledger, and support case state were active at the time of charge or rejection.
Public, privacy-sanitized evidence hub:
https://coolak.github.io/anthropic-claude-billing-incident/
Billing reconciliation matrix / owner map:
https://coolak.github.io/anthropic-claude-billing-incident/reconciliation-matrix.html
I am intentionally not posting card details, bank names, private payment IDs, invoice IDs, exact balances from anyone's account, raw logs, screenshots, support-thread bodies, token values, or private identifiers here.
Adding my case - same bug, same support response
I want to add my own experience to this thread, because it matches almost exactly what's described here, down to the support response.
What happened
I'm a Claude Max subscriber. On 4-5 September 2026, Claude Code silently routed my usage through a leftover ANTHROPIC_API_KEY that was set in my shell environment (~/.zprofile, sourced from macOS Keychain) - something I had no active awareness was set. Instead of using my paid subscription, every request during two long working sessions was billed as pay-as-you-go API usage.
The result: seven auto-reload credit charges on 5 September 2026, totalling US$145.48, hit my card the same day - all traceable via my own Claude Code session logs (request IDs, timestamps, token counts) and confirmed against Anthropic's own Console usage export (API key attributed to a "Claude Code" workspace, 169.7M input tokens / 1.2M output tokens, 99.9% cache reads).
There was no warning, no confirmation prompt, and no indication anywhere in the product that my billing had switched from my subscription to metered API charges.
How support handled it
I documented this thoroughly - invoice history, Console usage export, per-request IDs, file hashes, and activity logs proving it was genuine interactive usage (500+ tool calls: file edits, shell commands, reads) during my own normal working hours. Here's the response sequence from Anthropic's Fin AI Agent:
Five responses, all automated, and an explicit admission that this support channel cannot escalate a billing dispute to a human being under any circumstances.
This is a pattern, not an isolated bug
This issue (#62338, $447 charged, identical refusal script) is one of several I found on this repo describing the same root cause - Claude Code silently defaulting to API-key billing over an active subscription with no warning:
Anthropic's own Help Center article states that "all transitions to API credit usage require explicit user consent." Based on this pattern, that isn't matching what's actually happening.
If this has happened to you too
Please consider commenting below with your own case and numbers. A pile of individually-documented reports is what gets a systemic billing bug taken seriously by an engineering team, and it's the most useful thing any of us can do here.
If you're considering legal options: be aware that API/pay-as-you-go accounts are typically governed by Anthropic's Commercial Terms, which include mandatory individual arbitration and a class-action waiver in most jurisdictions - so a straightforward class action may not be available for this specific type of account. If you want to pursue this seriously, talk to a local consumer-rights attorney who can advise on your specific situation and jurisdiction.