Skip to content
Source
Sign inSign up
pingdotgg/t3code

Usage-limit auto-resume never arms when a Claude instance reaches a CLIProxy hub through an account-pinning router #48272

Closedvivekkairi(GitHub profile, opens in a new tab) opened this issue 1 comment

What happened

A Claude thread stopped with the "Usage limit reached" banner and "Reset time unavailable; retry manually". The account is a subscription. Its 5-hour session was spent but reset in about 15 minutes, and T3's own usage panel showed that reset time. Auto-resume and "Snooze until reset" were never offered, so the thread had to be retried by hand.

Diagnosis

The setup is one CLIProxyAPI hub with two Claude subscription accounts (work and personal), added in T3 as a cliproxy usage source at http://127.0.0.1:8317. To pin each T3 instance to one account, a small local router listens on 127.0.0.1:8318 (work) and 127.0.0.1:8319 (personal). It rewrites the request model to work/<model> or personal/<model> and forwards to the hub on 8317. The T3 instances "Work (Proxy)" and "Personal (Proxy)" run Claude Code with ANTHROPIC_BASE_URL set to 8318 and 8319.

When the work account's session ran out, the hub returned:

API Error: Request rejected (429) · All credentials for model work/claude-opus-5-5 are cooling down (last error: rate_limit_error: This request would exceed your account's monthly spend limit. Please try again later.)

The "monthly spend limit" part is the account's extra-usage budget, which was also exhausted. The limit that actually blocked the request was the 5-hour session.

T3 never found a reset time, for two reasons:

  1. Claude adapter: the 429 text has no (reset after …) suffix, so resetAt is null. The adapter also replaces the text with the generic "Claude API rate limit reached. Try again later." (apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts, around L5537-L5593).
  2. Hub fallback: for a usage_limit with no reset time, ProviderEventIngestor (around L706) asks UsageLimitResetFallback.resetAt. That keeps only sources where source.origin === endpoint (apps/server/src/usage/UsageLimitSources.ts, around L361). The instance's endpoint is http://127.0.0.1:8318 and the hub's origin is http://127.0.0.1:8317, so it returns null. No reset time means no auto-resume (UsageLimitRecoveryBanner.tsx: canSchedule requires resetAt !== null).

Matching the endpoint wouldn't be enough on its own. hubRoutes / hubPoolResetAt treat the hub as one pool for the model (claude-opus-5-5) and return a reset only when every routed account is spent. The personal account still had room, so the pool would still report no reset, even though this instance can only ever reach the work account.

The usage panel has the same blind spot. Because instanceHubs matches nothing, the "Work (Proxy)" usage view shows both hub accounts rather than only the one it is pinned to.

Possible directions:

  • Let a provider instance name the hub (usage source) it goes through and the hub account or route prefix it is pinned to.
  • Or recognize CLIProxyAPI's <prefix>/<model> routing, which the hub reports in its own 429 text (All credentials for model work/claude-opus-5-5), and compute the reset from that account alone.

Steps to reproduce

  1. Run CLIProxyAPI on 127.0.0.1:8317 with two Claude subscription credentials, using model prefixes work/ and personal/. Add it in T3 as a CLIProxy usage source.
  2. Run a pass-through router on 127.0.0.1:8318 that rewrites model to work/<model> and forwards to 8317.
  3. Add a Claude provider instance whose binary wrapper sets ANTHROPIC_BASE_URL=http://127.0.0.1:8318.
  4. Use the work account until its 5-hour session is spent (extra usage off or exhausted), then send a message on that instance.
  5. The thread fails with "Usage limit reached / Reset time unavailable; retry manually", and no Resume or Snooze actions appear. The usage panel shows the work account's session reset a few minutes away.

Expected: T3 takes the reset time for the pinned account from the hub and arms auto-resume.

Version

0.1.14-nightly.20261203.5651 (server, commit 5dea97de40d63e89da137e3132775167d78557e4; desktop client is the same nightly on macOS)

Environment

Server: Linux x64 (GCP VM), Node v26.13.1, Claude Code 2.1.332, CLIProxyAPI 8.0.10. Client: T3 Code Desktop on macOS.

Evidence

# provider event log, failing turn (work instance, endpoint 127.0.0.1:8318)
14:06:59.269Z outgoing query.open  model=claude-opus-5-5 pathToClaudeCodeExecutable=~/.local/bin/claude-proxy-work resume=<session>
14:06:59.442Z incoming assistant  model="<synthetic>" error="rate_limit" api_error_status=429 api_error_type="rate_limit_error"
              text="API Error: Request rejected (429) · All credentials for model work/claude-opus-5-5 are cooling down (last error: rate_limit_error: This request would exceed your account's monthly spend limit. Please try again later.)"
14:06:59.452Z incoming result     terminal_reason="api_error"
# no rate_limit_event was emitted in this session (API-key style auth through the proxy)

# resulting turn item
{"type":"error","title":"Usage limit reached","failure":{"class":"usage_limit","message":"Claude API rate limit reached. Try again later.","code":"api_error_429","retryable":true,"resetAt":null}}

# settings (redacted)
usageLimitSources.cliproxy-127.0.0.1-8317: kind=cliproxy url=http://127.0.0.1:8317 enabled=true
providerInstances.claudeAgent_proxy_work: binaryPath=~/.local/bin/claude-proxy-work   (ANTHROPIC_BASE_URL=http://127.0.0.1:8318)
providerInstances.claudeAgent_proxy_personal: binaryPath=~/.local/bin/claude-proxy-personal (ANTHROPIC_BASE_URL=http://127.0.0.1:8319)

# listeners
127.0.0.1:8317 cliproxyapi
127.0.0.1:8318 python3 router.py (work)  -> 127.0.0.1:8317
127.0.0.1:8319 python3 router.py (personal) -> 127.0.0.1:8317

The usage panel at the same moment showed the work account at 0% session left with "resets in 7m", and the personal account at 98% left. The user will attach a screenshot.

#26574 (closed) added the hub reset fallback for CLIProxy instances. This report is the case it does not cover: an instance whose endpoint is a router in front of the hub, pinned to one account. #39737 is a similar endpoint-attribution gap for custom ANTHROPIC_BASE_URL, but about Thread details usage, not recovery.

Fix applied or workaround

Nothing was changed on the machine. Workarounds: retry manually after the session resets, or switch the thread to the other account's instance. Locally, the router could add CLIProxy's (reset after …) suffix to its 429 text, which ClaudeAdapterV2 already parses.

Filed by

Claude Code (claude-opus-5-5) via T3 Code triage

  1. vivekkairi(GitHub profile, opens in a new tab) added labelsvia-triage

  2. tanstack-source added labelsbug

  3. Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.

  4. juliusmarminge closed this

Sign in to join this conversation.