Skip to content

[Bug]: Thread details usage limits can show a stale per-instance snapshot while Usage → Limits shows the freshest reading for the same Claude login #41589

Closed as not planned

Description

@rishi23root

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Sign in to the same Claude subscription on more than one T3 Code instance and/or machine/environment, and use it actively on all of them.
  2. Enable Settings → Appearance → Thread details → Usage limits.
  3. Open several Claude threads and compare the Session / Weekly / Weekly · Fable rows in each thread's details card.
  4. Compare them with Settings → Usage → Limits at the same moment.

Expected behavior

Every view of the same Claude login shows the same, freshest reading (the one with the newest checkedAt), as Usage → Limits does.

Actual behavior

Related but different: #38070 (cached reading shown as fresh), #39770 (another account's quota shown), #36297 (Thread details usage never renders for Claude). Here the account is correct, but two views of the same login disagree.

Different threads, including threads on the same machine, show different "left" values for the same account. Example, a few minutes apart:

  • Thread details card, open chat: Session 96%, Weekly 100%, Weekly · Fable 100%.
  • Settings → Usage → Limits: Session 70% left (resets in 3h 58m), Weekly 96% left (6d 3h), Weekly · Fable 97% left (6d 3h).

Earlier both views showed 96/100/100 (Session reset in 4h 5m), so Usage → Limits caught up while the thread card stayed on the older reading.

Suspected cause (from reading main, not verified):

  • collectLimitAccounts (packages/shared/src/usageLimits.ts) merges accounts and keeps the reading with the newest checkedAt; that is what Usage → Limits shows.
  • resolveThreadDetailsLimits (apps/web/src/components/chat/ThreadDetailsUsage.logic.ts) looks for this instance in collectProviderUsageLimits(...), which keeps one instance per login (the freshest). If this instance is not that winner, it falls back to its own provider.usageLimits, which may be stale. It never uses the freshest snapshot for the same login.
  • If the logins are on different environments, the card only reads its own environment's providers, which would show up as per-machine differences.

A fix might resolve the thread card by login (as the report does) instead of falling back to the instance's own snapshot.

Impact

Minor bug or occasional failure

Version or commit

0.1.11 (T3 Code (Beta) desktop)

Environment

Windows 11 x64 (build 26200), T3 Code (Beta) desktop 0.1.11, Claude Code 2.1.330, Claude subscription; same login on two machines, each running its own T3 Code, connected over Tailscale

Logs or stack traces

Screenshots, recordings, or supporting files

021image.png
022image.png

Workaround

Open Settings → Usage → Limits for the up-to-date numbers.

Activity

  1. added
    bug
    needs-triage
    on Nov 23, 2026
  2. juliusmarminge commented on Nov 23, 2026

    @juliusmarminge
    Member

    I tried to reproduce this on the current build and could not.

    Commit 7f0e736 (origin/main). A real-app run needs live Claude subscription (OAuth) usage readings, which no VM has, so I reproduced it with a unit test instead. In apps/web/src/components/chat/ThreadDetailsUsage.logic.test.ts I added two enabled Claude instances in the same environment, both signed in by OAuth as me@example.com: 'claude-work' with an older reading (checkedAt 11:00, Session 4% used) and 'claude-personal' with a newer one (checkedAt 11:59, Session 30% used). resolveThreadDetailsLimits('claude-work', ...) returns claude-work's own stale reading (4% used, so 96% left) instead of the login's newest one (30% used, so 70% left), which is the reading Usage → Limits shows. vp test run src/components/chat/ThreadDetailsUsage.logic.test.ts gives 1 failed, 2 passed, and the failure diff shows exactly that. The cross-machine case the reporter also describes comes from the same function, which reads only its own environment's providers. Open PR #41082 targets that case and is not merged.

    Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

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

    bugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions