[Fix] Tasks abort on OpenCode provider rate-limit errors#469
Merged
Conversation
OpenRouter-style UnknownError payloads with rate_limit_exceeded were terminating tasks. The OpenCode harness now backs off and continues automatically for a few attempts before aborting.
Remove the unused OPENCODE_RATE_LIMIT_RETRY_PROMPT_SOURCE export so knip stays clean.
Contributor
Author
|
No new code issues found. See task
Reviewed e09406b |
Contributor
Author
|
Fixed both review findings in e09406b:
Also covered with harness tests for both cases. Browser proof n/a (harness-only). |
…ncel During provider rate-limit backoff, steers that auto-prioritize no longer jump ahead of the hidden continue prompt, and cancel clears the backoff timer and retry budget so a later resume is not blocked.
mrubens
marked this pull request as ready for review
July 17, 2026 04:34
mrubens
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
July 17, 2026 04:34
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.
Related issue
N/A — internal Roomote work from Slack request to auto-retry OpenCode provider rate limits.
Why this PR exists
What changed
When OpenCode surfaces a provider rate limit as a terminal
session.error— including OpenRouter-styleUnknownErrorpayloads like{"code":429,...,"error_type":"rate_limit_exceeded"}— the worker harness no longer aborts the task immediately.Instead it:
After a few failed attempts it still falls through to the existing terminal abort path. Successful later turns reset the retry budget.
How it was tested
Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset