Repository navigation
Conversation
Port the focused recovery implementation from pingdotgg#17866 (a9c9b50) onto current main. Preserve current driver and registry refactors and document the provider environment required when Claude is launched through a wrapper. A bare Claude 429 can use fresh quota evidence from an explicitly matching CLIProxy pool. Native reset times retain precedence; unknown or unexplained cooldowns remain manual retries. Ported and verified with GPT-6.1-Sol through the Codex harness. Co-authored-by: coderdevang <devangatpc@gmail.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
Thread transfer impact
This comment will update automatically after the next completed run. |
Owner
Author
|
Closing as superseded. Upstream fixed the same problem in pingdotgg#36238 (merged Nov 13, in nightly 0.1.10-nightly.20261113.4656 and later): proxied Claude usage limits now take their reset time from the CLIProxyAPI hub. Both machines now run 0.1.11-nightly.20261117.4838, which includes it. Rebasing this branch would mean redoing 7 conflicting files for a fix that is already shipped. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude turns routed through CLIProxyAPI can fail with HTTP 429 after the pool runs out of quota. Claude CLI drops the proxy's cooldown metadata, leaving T3 with no reset time and preventing auto-resume even when the connected Usage source already knows when the pool recovers.
This ports the maintainer-owned upstream fix pingdotgg/t3code#17866 onto upstream main at
bf270e74e4c6144fc65648186e879d8bfdb411ed, resolving conflicts with current driver and registry changes. Original authors are retained in the commit attribution. This fork PR provides a reviewable patch for Omar; it does not duplicate or replace the upstream PR. The matching upstream report is #26574.When native reset information is missing, the adapter refreshes explicitly matching hub sources within five seconds. It uses the latest exhausted applicable window per Claude account, then the earliest whole-account recovery across the pool. Native reset evidence wins. Headroom, unavailable data, ambiguous model scopes, missing or expired deadlines, and failed lookups leave recovery unknown. Stop during lookup remains an interruption.
For this setup, the Claude provider instance must also expose the nonsecret variable
ANTHROPIC_BASE_URL=http://127.0.0.1:8317. Setting it only inside the Claude wrapper is invisible to T3's driver. Authentication can remain inside the wrapper. The user guide now explains this requirement. No live configuration or installed application was changed.Validation on Linux with Node and the repository's
vprunner:2026-10-10T08:00:00.000Z, receivednull.vp run check:changed --concurrency 1: formatting, lint, both knip checks, GraphQL, three affected package typechecks, and 319 tests across five files passed.vp test run --project t3 apps/server/src/orchestration-v2/runtimeLayer.test.ts -t 'usage-limit recovery': 17 passed; 85 unrelated cases skipped. This exercises persisted recovery and scheduling behavior.git diff --checkis clean.Not exercised: a live exhausted subscription pool, successful quota renewal, installation into the running T3 instance, or platform/browser/device UI. Proxy cooldowns unexplained by reported quota exhaustion still require manual retry. No UI source changed.
Port and verification: GPT-6.1-Sol through the Codex harness in T3 Code, with independent GPT-6.1-Sol review. Original implementation: coderdevang and Julius Marminge, retained from upstream PR pingdotgg#17866.