[BUG] API Error: Rate limit reached + Silent API Credit Billing Despite Active Claude Max Subscription (VS Code Extension)
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?
This report covers two compounding bugs that together caused significant financial harm:
Bug 1: After reinstalling the VS Code extension, subscriptionType and rateLimitTier in .credentials.json are silently reset to null. The extension operates in API billing mode without any warning or user consent, consuming Extra Usage API credits even though a Claude Max subscription is active.
Bug 2: Even after re-login where /usage correctly shows Plan: Claude max with low usage (Session 27%, Weekly 7%), the VS Code extension still returns API Error: Rate limit reached on every request. The Max subscription quota is not being honored by the extension.
The CLI (claude command) works correctly throughout. Only the VS Code extension is affected.
What Should Happen?
[BUG] API Error: Rate limit reached + Silent API Credit Billing Despite Active Claude Max Subscription (VS Code Extension)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported in this exact combination
- [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?
This report covers two compounding bugs that together caused significant financial harm:
Bug 1: After reinstalling the VS Code extension, subscriptionType and rateLimitTier in .credentials.json are silently reset to null. The extension operates in API billing mode without any warning or user consent, consuming Extra Usage API credits even though a Claude Max subscription is active.
Bug 2: Even after re-login where /usage correctly shows Plan: Claude max with low usage (Session 27%, Weekly 7%), the VS Code extension still returns API Error: Rate limit reached on every request. The Max subscription quota is not being honored by the extension.
The CLI (claude command) works correctly throughout. Only the VS Code extension is affected.
---
Critical Issue: API Credits Billed When Max Plan Should Be Used
This is the most severe part of the bug. The extension:
- Does not warn the user that it has switched to API billing mode
- Does not ask for consent before consuming API credits
- Silently charges Extra Usage API credits even when a Claude Max subscription is active and has remaining quota
- Shows no visual indicator distinguishing API billing mode from subscription mode until the user manually checks
/usageor inspects.credentials.json
A user with an active Max subscription has no reason to expect API credits to be consumed. This silent billing behavior is a critical UX failure and arguably a billing compliance issue.
---
Steps to Reproduce
- Have an active Claude Max subscription
- Uninstall and reinstall the Claude Code VS Code extension
- Log in via
Claude.ai Subscription(browser OAuth flow) - Bug 1 occurs:
.credentials.jsonshowssubscriptionType: null,rateLimitTier: null→ extension silently charges API credits - Perform
/logoutthen/loginagain .credentials.jsonnow showssubscriptionType: "max",rateLimitTier: "default_claude_max_5x"/usagecorrectly shows Plan: Claude max, Session 27%, Weekly 7%- Send any message in the extension
- Bug 2 occurs:
API Error: Rate limit reached— Max subscription quota is not honored - CLI works normally throughout steps 1–9
---
Expected Behavior
- Reinstalling the extension should never silently switch to API billing mode
- If subscription info cannot be retrieved, the extension should warn the user explicitly before consuming any API credits
- After re-login with confirmed
subscriptionType: "max", the extension should use Max subscription quota, not API credits - Extension and CLI should behave consistently under the same account
Actual Behavior
- Extension silently consumes API credits after reinstall with zero user warning
subscriptionTyperesets tonullon reinstall, even after OAuth re-login- Even when Plan correctly shows
Claude maxin/usage,API Error: Rate limit reachedis returned on every request - CLI works fine in parallel with the same credentials
- Extra Usage credits were fully consumed, resulting in unexpected charges
---
Credentials State After Reinstall (Before Re-login)
{
"claudeAiOauth": {
"subscriptionType": null,
"rateLimitTier": null
}
}
Credentials State After Re-login (Bug 2 still occurs)
{
"claudeAiOauth": {
"subscriptionType": "max",
"rateLimitTier": "default_claude_max_5x"
}
}
---
/usage Output When Bug 2 Occurs
ACCOUNT
Auth method Claude AI
Email jihyennn@gmail.com
Plan Claude max
USAGE
Session (5hr) 27% Resets in 1h
Weekly (7 day) 7% Resets in 4d
Weekly Sonnet 12% Resets in 4d
Error: API Error: Rate limit reached
---
Financial Impact
- Silent API credit consumption: After reinstall, the extension operated in API mode without warning. Extra Usage API credits were fully consumed without user consent.
- Refund process bug: When attempting to get a refund for the incorrectly charged API credits via the Anthropic support bot, the bot interpreted the refund request as a subscription cancellation and canceled the Claude Max subscription without explicit user confirmation. The user had to manually re-subscribe.
- Total damage: Extra Usage API credit charges + accidental subscription cancellation + hours of lost productivity.
---
Why This Is a Billing Compliance Issue
- The extension switches billing modes (subscription → API) silently on reinstall
- No warning, no confirmation, no visual indicator
- A Max subscriber paying $100/month has a reasonable expectation that their subscription quota will be used before any API credits are charged
- The current behavior violates this expectation and results in unexpected charges
---
Environment
- OS: Windows 11
- Claude Code Extension version: 2.1.66
- CLI version: 2.1.66
- VS Code version: latest
- Subscription: Claude Max
- Auth method: Claude AI (OAuth)
- Platform: VS Code
---
Related Issues
- #29579 - Rate limit reached despite Claude Max subscription
- #28450 - Rate limit reached when Extra Usage is disabled
- #9156 - Usage limit discrepancy between VS Code extension and CLI
---
Workaround
Use CLI (claude in terminal) instead of the VS Code extension. The CLI works correctly with the same account and credentials. Do not reinstall the VS Code extension until this is patched.
Error Messages/Logs
Steps to Reproduce
- Have an active Claude Max subscription
- Uninstall the Claude Code VS Code extension
- Reinstall the Claude Code VS Code extension (v2.1.66)
- Log in via "Claude.ai Subscription" (browser OAuth flow)
- Check .credentials.json → subscriptionType: null, rateLimitTier: null
- Extension silently operates in API mode and consumes Extra Usage credits without any warning
- Perform /logout then /login again
- .credentials.json now shows subscriptionType: "max", rateLimitTier: "default_claude_max_5x"
- Check /usage → Plan: Claude max, Session 27%, Weekly 7%
- Send any message in the VS Code extension
- Result: API Error: Rate limit reached (Max subscription quota is not honored)
- Open terminal and run claude → CLI works normally with the same account
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.51(Claude Code for VS Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗