Skip to content

Extension doesn't update when switching accounts — stuck on previous account's data #45

Closed

Description

@BarisKuzu

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

  1. Open VS Code with the extension active and logged in to Account A — usage data loads correctly.
  2. Switch to Account B via the Claude account switcher.
  3. Observe that the extension still shows Account A's usage data.
  4. 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

Activity

  1. Carl723000 commented on Jun 30, 2026

    @Carl723000
    Collaborator

    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.

  2. added a commit that references this issue on Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions