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
Claude "Monthly spend" limit row disappears after refreshing limits when a CLIProxy usage source is configured #23057
On the Usage page (Limits view, All environments), the Claude card showed a "Monthly spend" row with a bar for each Claude account (99% and 74% left). After I clicked the refresh button, the row disappeared. Session, Weekly, and Weekly · Fable stayed. The server still had the data: both Claude provider status caches held a monthly_spend window after the refresh.
Diagnosis
The hub read never produces a monthly spend window, and the client lets a newer hub read replace the native probe's windows as a whole.
apps/server/src/usage/cliproxyApi.ts (readAccount, Claude branch) builds the get_usage-shaped response from /api/oauth/usage with only five_hour, seven_day, and model_scoped. It never passes spend or extra_usage, so claudeUsageResponseToLimits cannot emit the monthly_spend window that fix(claude): map monthly account spending limits #19433 added for the native probe.
packages/shared/src/usageLimits.tscollectLimitAccounts merges the native provider report and the hub account under the same account key, then takes winner.limits whole from whichever has the newer checkedAt.
Refreshing limits re-reads the hub (UsageLimitSources.readSource), so the hub snapshot becomes the freshest. Its window list has no monthly_spend, and the row disappears. It should come back the next time the native provider probe is newer than the hub read, so the row flickers depending on which reader ran last.
Either fix closes it: map the spend budget in the CLIProxy Claude read, or merge windows per window id across sources instead of taking one source's list whole.
Repro steps
Sign in to Claude on a subscription with a monthly spending limit enabled, so the native probe reports "Monthly spend".
In Settings, add a CLIProxy usage limit source that serves the same Claude account, and enable it.
Open Usage, then Limits. The Claude card shows "Monthly spend".
Click refresh. "Monthly spend" disappears while the other Claude rows remain.
Environment
Version: 0.1.1-nightly.20261020.3438 (desktop app, macOS nightly channel), connecting to its local server. Triage CLI was 0.1.1.
OS: macOS 26 (Darwin 25.6.0), arm64
Usage limit sources: one CLIProxy source on localhost
Claude provider instances: two (both lost the row after refresh)
Evidence
Server caches and trace confirm the row is dropped client-side.
Server trace: UsageLimitSources.readSource ran at the refresh time and succeeded with no error.
Both Claude provider status caches still held {"id":"monthly_spend","kind":"monthly","label":"Monthly spend"} with usedPercent 26.43 and 1.02 after the refresh, matching the 74% and 99% bars shown before it.
main has no changes to cliproxyApi.ts or the merge logic since the tag.
Activity