[Bug]: Claude disappears from Usage → Limits when get_usage returns rate_limits_available: true with rate_limits: null #15364
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
- Sign in to Claude Code with a subscription account (Claude Team here). No API key, no
CLAUDE_CODE_OAUTH_TOKENoverride, just one Claude instance. - Open T3 Code and use Claude normally (the composer is on Claude Opus 5).
- Open Usage → Limits.
Expected behavior#
Claude's session and weekly windows show up next to Codex. If the CLI couldn't fetch them, there should at least be a notice saying the limits couldn't be loaded.
Actual behavior#
Only Codex is listed. Claude isn't there at all and there's no notice.
What the CLI returns. I ran the same calls the capabilities probe makes (initializationResult() and then usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET()) through @anthropic-ai/claude-agent-sdk against the same CLI binary (2.1.288):
{
"subscription_type": "team",
"rate_limits_available": true,
"rate_limits": null
}
I got the same result with settingSources: [], so it isn't caused by my user settings.
rate_limits_available: true means plan limits do apply to this account. In the 2.1.288 bundle, rate_limits is only null when the CLI's own usage fetch doesn't come back with status: "ok" (in-band error, 429, empty body). So this is a failed fetch, and it doesn't mean the account has no limits.
Where it goes wrong in T3. claudeUsageResponseToLimits treats this case the same way as an API-key account:
Then collectLimitNotices skips "unsupported" providers without a notice:
As described in #13053, the "unsupported" snapshot also stops applyUsageLimitsUpdate from accepting later rate_limit_events, so the row doesn't come back on its own.
Suggested fix. Only return "unsupported" when rate_limits_available === false. When it's true and rate_limits is null, return probeFailed. That way the user sees a notice, mid-turn events can fill the row, and the next probe can recover.
How this differs from related issues:
- #13053: same
"unsupported"lock, but there the trigger was unknown and the setup was a second Claude instance with its own config dir. Here it's a single, default instance, and the trigger is the exact response above. (I added the same data as a comment there.) - #15354: there the probe times out, so it ends up as
probeFailedand shows a notice. Here the CLI answers in time and Claude is hidden without any notice.
Impact#
Minor bug or occasional failure
Version or commit#
T3 Code (Nightly) 0.0.46-nightly.20261003.2638 (source checked at main @ 8d84666)
Environment#
macOS 27.2, desktop app, Claude Code CLI 2.1.288, Claude Team subscription
Logs or stack traces#
Screenshots, recordings, or supporting files#
Screenshot 2026-10-04 at 01.05.31.png Screenshot 2026-10-04 at 01.04.59.png
Workaround#
None found.
fatalist(GitHub profile, opens in a new tab) added labelsbug
fatalist(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge removed labelsneeds-triage
juliusmarminge added labelsvia-triage
Same on Windows: T3 Code 0.0.45 desktop, Claude Code CLI 2.1.289, Claude Pro, single first-party account. Usage → Limits shows only Codex.
Calling the same API the probe uses (
usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET()via@anthropic-ai/claude-agent-sdk0.3.289) against my CLI returns, consistently:{"subscription_type":"pro","rate_limits_available":true,"rate_limits":null, ...}So this isn't Team-specific; Pro hits it too.
One note for whoever picks this up: #15443 alone won't bring the bars back here. My turns do stream
rate_limit_events with the data, but in the newer shape where utilization lives only underunifiedWindows:"rate_limit_info":{"status":"allowed","rateLimitType":"five_hour","resetsAt":1791219600, "unifiedWindows":{"five_hour":{"utilization":0.01,"resetsAt":1791219600}, "seven_day":{"utilization":0.24,"resetsAt":1791442800}}}claudeRateLimitEventToUpdatereturns early ontypeof info.utilization !== "number", so noaccount.rate-limits.updatedis ever emitted for Claude (provider logs: thousands for Codex, zero for Claude). That's what #14441 fixes. With #15443 + #14441 together Claude should show "Could not read limits." until the first turn, then fill in session + weekly.One reliable trigger for this:
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC.macOS, T3 Code 0.0.46-nightly.20261006, Claude Code CLI 2.1.285, Claude Max, single first-party account. I had
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"in theenvblock of~/.claude/settings.json. Callingusage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET()through@anthropic-ai/claude-agent-sdk0.3.276:result flag set ~300 ms, rate_limits_available: true,rate_limits: nullflag unset ~800 ms, rate_limitspopulated (five_hour,seven_day, …)With
--debug-to-stderr, the flagged run logsfetchUtilization: GET /api/oauth/usage (attempt 1)and never logs a response. The clean run logsfetchUtilization: 200 after 1 attempt(s). After I removed the flag, Claude came back in Usage → Limits.Two things that make this easy to miss:
- Any non-empty value turns the flag on, including
0andfalse. It has to be unset. settingSources: []doesn't rule it out, because the flag can also come from the process environment (shell profile, or whatever launched T3), and the spawned CLI inherits that.
Worth checking for anyone else hitting this:
env | grep NONESSENTIALand theenvblock in~/.claude/settings.json.This doesn't change the fix: a null
rate_limitswithrate_limits_available: trueshould still show "Could not read limits" rather than hide Claude. It's one common cause and an easy way to reproduce it.- Any non-empty value turns the flag on, including
I can reproduce this on a different plan and a newer CLI.
- T3 Code Nightly 0.0.46-nightly.20261009.2873, macOS
- Claude Code CLI 2.1.295, Claude Pro subscription, a single Claude instance
I ran
initializationResult()and thenusage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET({ skipBehaviors: true })through@anthropic-ai/claude-agent-sdk0.3.295 against the same CLI. It returns:{ "rate_limits_available": true, "rate_limits": null }Claude's limits never show up as a result. The session also gets live
rate_limit_events with usableunifiedWindowsvalues (for example, five_hour 0.5 and seven_day 0.26). However, these never repair the snapshot, because the event mapper dropsunifiedWindows-only events (#17488). Together, the two bugs leave Pro accounts with no Claude limits at all.Note
Grok responding on behalf of Julius.
Fixed by #18624, which just merged to
main. A Claude subscription whose usage probe returnsrate_limits_available: truewithrate_limits: nullis now treated as a failed probe instead ofunsupported, so you get the failure notice and later probes can bring the row back. It landed alongside #15116, so a sparse mid-turn update no longer hides that failure. It should be in the next nightly. If Claude still drops out of Usage → Limits on a build with this fix, please reopen with your CLI version.juliusmarminge closed this
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
Triage#
Thanks for capturing the exact
get_usageresponse, @fatalist! This is a real bug on currentmain(00eb8f61), and it's not a duplicate of #13053 or #15354. A Claude subscription whoseget_usagereturnsrate_limits_available: truewithrate_limits: nullgets stored asunsupported, the same as an API-key account. Usage → Limits then drops Claude with no row and no notice, which matches your screenshots.What happens#
claudeUsageResponseToLimitscollapses both shapes into one result:rate_limits_available: falseis the API-key or Bedrock case the existing test covers.truewithnullis different: the CLI says plan limits apply, but the usage body didn't come back.From there,
collectLimitNoticesskipsunsupportedandcollectLimitAccountsskips any snapshot with a notice, so Claude gets neither a notice nor a row.applyUsageLimitsUpdateignores laterrate_limit_events while the snapshot isunsupported, andresolveUsageLimitsAfterProbetreatsunsupportedas final, so the next refresh locks it in again. A timed-out or failedget_usagenever reaches this mapper and gets published asprobeFailed. That's #15354, which does show "Could not read limits."Related#
unsupportedlock on a second Claude instance, but its response wasn't captured. A subscription that still returnsrate_limits_available: falsewouldn't be covered by splitting only this shape.probeFailedsnapshot, a single laterrate_limit_eventcan look like a complete read.Likely fix area#
rate_limits_available === falseasunsupportedand maptruewithrate_limits == nulltoprobeFailed, with a test for each. The rest of the pipeline already handlesprobeFailed: the notice shows, a laterrate_limit_eventcan fill windows, and the last good windows survive a failed probe.available: falsesubscription path could stay with #13053.There's no workaround I know of that brings the row back while every probe returns this shape. A maintainer will decide on the fix direction.