Repository navigation
fix(opencode): stop v1 quota retries and surface transient waits - #39459
Draft
BearThreat wants to merge 1 commit into
Draft
BearThreat wants to merge 1 commit into
BearThreat wants to merge 1 commit into
Conversation
Classify quota at event receipt and retain the classification through wake replay. A quota terminal settles pending start admission before native abort so orchestration can persist the broken-session outcome. Implemented with GPT-6.2 Sol in the Codex harness. not cross-provider checked.
This branch has not been deployed
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.
OpenCode v1 reports some exhausted quotas as
session.status: retrywithout asession.error. T3 ignores the retry details and can leave the turn running until a retry days away.This handles v1 retry notices and ends an exhausted-quota turn with
usage_limit. Explicit structured quota reasons terminate immediately; generic rate-limit text needs a retry deadline at least five minutes away. Short transient retries remain running and show a warning.Quota finalization settles pending startup before bounded native abort, preserving the queued failure even when submission rejects or hangs. Buffered native wakes retain receipt-time classification. The stopped native session is marked broken because v1 terminal events lack turn identity; recovery opens a fresh session. No v2 behavior or quota-reset redemption changes.
Related: #28375 (merged, v2 retry warnings) and #31838 (open, v2 Go recovery).
Validation on current main
29b42d409c:account_rate_limit=falseremain transient.The live-provider report motivating this was OpenCode 1.19.4 receiving a Go quota 429 and scheduling a retry up to 24.9 days away. This PR uses deterministic SDK integration tests; it does not claim a new live quota-exhaustion test or database persistence test. Reviewed on a different Codex model; not cross-provider checked.