You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[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
Open several Claude threads and compare the Session / Weekly / Weekly · Fable rows in each thread's details card.
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:
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
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.
Activity
juliusmarminge commentedon Nov 23, 2026
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.tsgives 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.