Repository navigation
Description
Summary
Usage → Limits displays “Claude: Could not read limits.” when Claude Code has CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC enabled.
The account is authenticated and supports subscription limits. The setting blocks Claude’s usage lookup, but T3’s warning gives no indication that a local configuration is responsible.
Area
apps/server
Steps to reproduce
-
Sign in to Claude Code with a Claude subscription account.
-
Add this environment setting to
~/.claude/settings.json:{ "env": { "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1" } } -
Launch T3 Code with the default Claude provider enabled.
-
Open Usage → Limits and refresh.
Expected behavior
Respect Claude’s traffic restriction and explain that it prevents subscription limits from being read. Provide an actionable diagnostic identifying the setting.
Actual behavior
T3 displays:
Claude: Could not read limits.
The warning does not identify the configuration responsible or explain how to restore limits while keeping telemetry disabled.
Environment
- Windows 11 Pro, build
10.0.26200, x64 - T3 Code Nightly
0.1.6-nightly.20261030.3917 - Backend failure also reproduced from an unmodified checkout at
305a90dce44b8b7813d951662f13ce8510a3c669 - Claude Code
2.1.314 @anthropic-ai/claude-agent-sdk0.3.276- Claude Pro subscription
Investigation and verification
The existing T3 capabilities probe authenticated successfully but received:
{
"rate_limits_available": true,
"rate_limits": null
}T3 maps this response to probeFailed, which produces the generic warning.
A single direct, authenticated read of Anthropic’s usage endpoint returned HTTP 200 with limit data. A temporary CLI settings override that removed the broad traffic restriction also restored both Session and Weekly windows.
After applying the settings workaround below, T3’s unmodified production probe, using the saved settings with no temporary overrides, returned:
Provider status: ready
Authentication: authenticated
Session limits: returned
Weekly limits: returned
Unavailable: none
No model prompt or paid turn was needed. No T3 source changes were made. The banner was observed before the workaround; verification afterward was through the backend probe.
Workaround
Remove CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC from Claude’s settings. To keep telemetry, error reporting, auto-updates, and feedback disabled, use their individual controls:
{
"env": {
"DISABLE_TELEMETRY": "1",
"DISABLE_ERROR_REPORTING": "1",
"DISABLE_AUTOUPDATER": "1",
"DISABLE_FEEDBACK_COMMAND": "1"
}
}This removes the broad traffic restriction, so other optional requests may run. Setting the broad flag to "0" does not disable it; Claude treats any non-empty value as enabled. See Claude’s environment-variable documentation.
Impact
Minor bug: subscription limits remain unavailable with a generic warning until the configuration is diagnosed.
Related report
#15364 covers a null limits response being incorrectly classified as unsupported. In the checkout tested here, that response is already classified as probeFailed; the remaining problem is explaining this specific configuration cause.
Activity
krissemicolon commentedon Nov 1, 2026
Same issue on macOS, confirmed via
t3 triage.0.1.7-nightly.20261101.4035, macOS 27.0 (Darwin 27.0.0) arm642.1.316, Claude Pro,@anthropic-ai/claude-agent-sdk0.3.276~/.claude/settings.json→env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1"Running the same
usage_EXPERIMENTAL…({ skipBehaviors: true })call the T3 probe makes returned{"rate_limits_available": true, "rate_limits": null}in ~4 ms every time, including after 3–8 s delays and withskipBehaviors: false. With the flag removed from the process env, the same call returnedfive_hourandseven_daywindows. A flag-settings override of"0"did not help, consistent with any non-empty value counting as enabled.The CLI caches a successful read in
~/.claude.json(cachedUsageUtilization) and serves it even while the flag is set. So limits can appear to "work" briefly after any unrestricted read, then return to "Could not read limits" once the cache goes stale. That could confuse anyone verifying a fix or workaround.The workaround from the issue body (replacing the broad flag with the individual
DISABLE_*opt-outs) was applied on this machine.Triaged with Claude Code (Claude Opus 5.5) via
t3 triage.mixram commentedon Nov 3, 2026
Another case of the same cause, but this time the flag is not in
~/.claude/settings.json. That makes it much harder to find.Environment
0.1.7-nightly.20261103.4106, local server, same version2.1.317,@anthropic-ai/claude-agent-sdk0.3.284What is different here
The Claude provider
binaryPathpoints to a wrapper script. The script starts Claude through a corporate gateway launcher. The launcher spawns Claude with this environment:The user's own settings do not contain the flag. T3 showed only "Claude: Could not read limits." The provider status cache had
usageLimits.unavailable.reason: "probeFailed", and all probe spans inserver.trace.ndjsonexited withSuccess. Nothing pointed at the environment.Evidence
I ran the same probe as
probeClaudeCapabilities(initializationResult(), thenusage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET({ skipBehaviors: true })) outside T3:get_usageresultrate_limits_available: true,rate_limits: null(returned in about 2 ms, so no request was made)claudefive_hourandseven_daywindows returned--settings '{"env":{"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC":"0"}}'five_hourandseven_daywindows returnedWorkaround
A settings
envoverride wins over the inherited process environment. The wrapper now passes"env":{"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC":"0"}in its--settingsJSON. The individualDISABLE_*flags from the launcher stay set.Suggestion
This supports the request in this issue. When
get_usagereturnsrate_limits_available: truewithrate_limits: null, T3 could check the environment it passes to Claude, including what a wrapper may add. A process-env check alone would miss this case, so the warning could at least nameCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICas a likely cause.Diagnosed via
t3 triagewith Claude Code (Claude Opus 5.5).mixram commentedon Nov 3, 2026
Correction to my earlier comment: the
"0"override does not work. It only looked like it worked because of the usage cache that @krissemicolon described above.What I found
2.1.317treats any non-empty value ofCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICas enabled. This includes"0", in the process env and in--settingsenv."env":{"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC":"0"}. Limits showed whilecachedUsageUtilizationin~/.claude.jsonwas fresh. When the cache went stale, T3 showed "Claude: Could not read limits." again.4106→4119) only happened at the same time. No Claude usage probe code changed between those builds.Evidence
I ran the same probe as
probeClaudeCapabilitiesoutside T3, about 70 s apart, so that each run started with a stale cache. "Live read" meanscachedUsageUtilization.fetchedAtMschanged."0"claude+ settings env"0"claude+ process env=1claude+DISABLE_TELEMETRY,DISABLE_ERROR_REPORTING,DISABLE_AUTOUPDATER,DISABLE_GROWTHBOOK,DISABLE_FEEDBACK_COMMAND=1=1+ settings env""""Note: if you check a workaround right after any live read, the cached result hides a broken setup. Wait for the cache to go stale, or check that
fetchedAtMschanges.Working workaround
Pass an empty string, not
"0":--settings '{"env":{"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC":""}}'Environment
0.1.7-nightly.20261103.4119, local server, same version2.1.317,@anthropic-ai/claude-agent-sdk0.3.284, Claude MaxThis makes the request in this issue more important. The flag has a non-obvious truthiness rule, and the cache hides it. If
get_usagereturnsrate_limits_available: truewithrate_limits: null, the warning could nameCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICand say that any non-empty value, also"0", enables it.Diagnosed via
t3 triagewith Claude Code (Claude Opus 5.5).mickroplastics commentedon Nov 4, 2026
+1 to this
mauricioliu commentedon Nov 7, 2026
Confirmed on Linux as well, with a newer nightly:
0.1.8-nightly.20261105.42182.1.318Usage → Limits shows
Claude: Could not read limits.The saved~/.claude/settings.jsoncontainsenv.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1".Verified through Claude Code's stream-json control protocol, without sending a model prompt:
initialize, thenget_usagewithskip_behaviors: trueusing the saved settings. Response is successful but containsrate_limits_available: trueandrate_limits: null.--settings '{"env":{"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC":"0"}}': limits remain null.--settings '{"env":{"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC":""}}':rate_limitsis populated, includingfive_hour,seven_day, andmodel_scoped.A direct authenticated GET to Anthropic's
/api/oauth/usagealso returned HTTP 200 with limit data, confirming that authentication and the upstream endpoint were working. No credentials or account identifiers are included here.The temporary override did not modify saved settings or the T3 installation. This corroborates the request for an actionable warning identifying the broad traffic restriction, while respecting the user's setting.