[BUG] CLI caches subscriptionType and rateLimitTier indefinitely — plan upgrades not reflected
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?
Bug Description
When a user upgrades their Anthropic plan (e.g., Pro → Max 5x → Max 20x), the Claude Code CLI does not refresh the cached subscriptionType or rateLimitTier in .claude/.credentials.json. The CLI continues to enforce the rate limits of the plan that was active at the time of the original claude login, even after the plan has been upgraded on claude.ai.
Impact
Users who upgrade their plan continue to be rate-limited at their old plan's level
The CLI status bar displays the old plan (e.g., "Claude Pro" instead of "Claude Max")
Users hit rate limits far sooner than expected — in my case, hitting limits after ~20 minutes of use despite paying for Max 20x
The claude logout command is blocked when the user is "out of usage" under the stale plan limits, making it impossible to re-authenticate normally
What Should Happen?
It should detect when new CLI terminals are opened/closed
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
Log into Claude Code CLI on a Pro plan (claude login)
Upgrade to Max (5x or 20x) on claude.ai
Restart the CLI — observe it still shows "Claude Pro" and enforces Pro-level rate limits
Attempt claude logout after hitting the (incorrectly low) rate limit — blocked by "out of usage" error
Expected Behavior
The CLI should periodically refresh subscription info from the server (e.g., on each session start or via token refresh)
At minimum, subscriptionType and rateLimitTier should be updated when the OAuth token is refreshed
claude logout should not be blocked by rate limit status
Workaround
Manually editing .claude/.credentials.json to clear the accessToken, refreshToken, expiresAt, subscriptionType, and rateLimitTier fields, then running /login from within the CLI to force a fresh OAuth flow.
Environment
Claude Code v2.1.92
Windows 10 Pro
Plan: Max 20x (was being enforced as Pro)
Relevant Fields in .credentials.json
{
"claudeAiOauth": {
"subscriptionType": "pro", // stale, should be "max"
"rateLimitTier": "default_claude_ai" // stale, should reflect 20x tier
}
}
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.92
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗