Skip to content

[Bug]: Claude instances authenticated with CLAUDE_CODE_OAUTH_TOKEN (claude setup-token) never appear in Usage → Limits, although their sessions stream usable rate-limit windows #24114

Open

Description

@Liri-s29

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

  1. Create a token with claude setup-token and a wrapper script that exports CLAUDE_CODE_OAUTH_TOKEN and execs claude. Register the wrapper as a Claude provider instance (binaryPath). Repeat for a second account.
  2. Use both instances normally.
  3. Open Usage → Limits.

Expected behavior

Both accounts show session and weekly bars, or at least a notice saying why they cannot be read.

Actual behavior

Neither account is listed and there is no notice. The boot-time get_usage probe returns rate_limits_available: false for a setup-token session (confirmed by caitlon in #13053), so claudeUsageResponseToLimits marks the instance "unsupported" and collectLimitAccounts and collectLimitNotices both skip it. #18624 fixed the rate_limits_available: true + rate_limits: null shape and explicitly left this case out.

The data is available anyway. A turn on such an instance streams rate_limit_info with unifiedWindows, for example
{"five_hour":{"utilization":0.2,"resetsAt":1792759800},"seven_day":{"utilization":0.59,"resetsAt":1792760400}}
captured today from claude -p ... --output-format stream-json --verbose under a setup-token wrapper. T3 discards streamed windows for an instance marked unsupported.

Suggested fix: treat rate_limits_available: false as "probe unsupported, streamed windows allowed" when apiKeySource is "none" and the token is an OAuth token: show the instance in Limits as soon as a streamed rate_limit_info arrives, and keep the last streamed reading between turns. Keep "unsupported" only for API-key accounts.

Impact: Anyone running several subscriptions through setup-token wrappers (the documented way to use Claude Code on a headless or multi-account machine) has no limit visibility in T3 and cannot pick the account with headroom.

Impact

Major degradation or frequent failure

Version or commit

T3 Code Nightly 0.1.3-nightly.20261023.3553

Environment

macOS (Darwin 25.6.0, arm64), Claude Code CLI 2.1.309, three Claude subscription accounts each behind a setup-token wrapper script registered as its own provider instance.

Logs or stack traces

Stream line from a setup-token session (fields other than the rate-limit window omitted):
"rate_limit_info":{"status":"allowed","rateLimitType":"five_hour","unifiedWindows":{"five_hour":{"utilization":0.2,"resetsAt":1792759800},"seven_day":{"utilization":0.59,"resetsAt":1792760400}}}

Screenshots, recordings, or supporting files

No response

Workaround

No response

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 23, 2026
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

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions