[BUG] API Error: Rate limit reached + Silent API Credit Billing Despite Active Claude Max Subscription (VS Code Extension)

Resolved 💬 4 comments Opened Mar 9, 2026 by jihyennn Closed Mar 12, 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?

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:

  1. Does not warn the user that it has switched to API billing mode
  2. Does not ask for consent before consuming API credits
  3. Silently charges Extra Usage API credits even when a Claude Max subscription is active and has remaining quota
  4. Shows no visual indicator distinguishing API billing mode from subscription mode until the user manually checks /usage or 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

  1. Have an active Claude Max subscription
  2. Uninstall and reinstall the Claude Code VS Code extension
  3. Log in via Claude.ai Subscription (browser OAuth flow)
  4. Bug 1 occurs: .credentials.json shows subscriptionType: null, rateLimitTier: null → extension silently charges API credits
  5. Perform /logout then /login again
  6. .credentials.json now shows subscriptionType: "max", rateLimitTier: "default_claude_max_5x"
  7. /usage correctly shows Plan: Claude max, Session 27%, Weekly 7%
  8. Send any message in the extension
  9. Bug 2 occurs: API Error: Rate limit reached — Max subscription quota is not honored
  10. 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
  • subscriptionType resets to null on reinstall, even after OAuth re-login
  • Even when Plan correctly shows Claude max in /usage, API Error: Rate limit reached is 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

  1. Silent API credit consumption: After reinstall, the extension operated in API mode without warning. Extra Usage API credits were fully consumed without user consent.
  2. 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.
  3. 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

  1. Have an active Claude Max subscription
  2. Uninstall the Claude Code VS Code extension
  3. Reinstall the Claude Code VS Code extension (v2.1.66)
  4. Log in via "Claude.ai Subscription" (browser OAuth flow)
  5. Check .credentials.json → subscriptionType: null, rateLimitTier: null
  6. Extension silently operates in API mode and consumes Extra Usage credits without any warning
  7. Perform /logout then /login again
  8. .credentials.json now shows subscriptionType: "max", rateLimitTier: "default_claude_max_5x"
  9. Check /usage → Plan: Claude max, Session 27%, Weekly 7%
  10. Send any message in the VS Code extension
  11. Result: API Error: Rate limit reached (Max subscription quota is not honored)
  12. 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_

View original on GitHub ↗

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