Extension doesn't update when switching accounts — stuck on previous account's data #45
Copy link
Copy link
Description
Description
When switching between Claude accounts, the extension doesn't react to the change and keeps displaying the previous account's usage data. The only way to get it to refresh is to reload the VS Code window.
This is especially confusing because the extension looks like it's showing live data — there's no stale indicator, no error, no loading state. It just silently shows the wrong account's numbers.
Steps to Reproduce
- Open VS Code with the extension active and logged in to Account A — usage data loads correctly.
- Switch to Account B via the Claude account switcher.
- Observe that the extension still shows Account A's usage data.
- Data does not update even after waiting or triggering usage (e.g. sending a message in Claude Code).
Expected Behavior
The extension should detect the account change (e.g. by watching the auth session or polling the active account) and automatically reload usage data for the newly active account.
Actual Behavior
Extension stays frozen on the previous account's data with no indication anything is wrong. A manual Developer: Reload Window is required to force a refresh.
Additional Context
- No error appears in the Output panel or Developer Tools console when switching accounts.
- The issue is reproducible consistently — every account switch triggers it.
- Possibly related to the extension caching the session/token at startup and never re-checking it.
Environment
- OS: macOS 26.5.1 (Build 25F80, Apple Silicon)
- VS Code: 1.126.0 (arm64)
- Extension version: latest from marketplace
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
fix: refresh quota when the Claude account is switched (#45) (#47)
Carl723000 commentedon Jun 30, 2026
Thanks @BarisKuzu — fixed in the upcoming 2.1.1. The extension was caching the OAuth token and only re-reading it when it expired; a switched-in account's token is still valid, so it kept serving the old account's quota. It now re-reads the credentials on each quota check and watches the credentials file, so the switch is picked up without a window reload. Only the quota panel was affected — the local token counts come from a shared folder.
chore(release): prepare 2.1.1 (#49)