fix(opencode): cap session retries with jitter - #41939
Merged
Merged
Conversation
eyalatox
added a commit
to eyalatox/opencode
that referenced
this pull request
Aug 12, 2026
Builds on the fixed RETRY_MAX_RETRIES cap from anomalyco#41939: providers differ in how aggressively they should be retried, so expose 'retry' (max attempts, 0 disables) and 'backoffDelay' (initial backoff ms) provider options in opencode.json. retry-after headers from the provider still take precedence over the configured backoff. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6 tasks
HQ123-BOOP
pushed a commit
to HQ123-BOOP/LibreCode
that referenced
this pull request
Aug 12, 2026
sepo-eng
added a commit
to Draugur-AI/opencode
that referenced
this pull request
Aug 13, 2026
…alyco/dev (#56) * fix(ui): correct OC-2 weak icon color (anomalyco#41504) (cherry picked from commit 3a90639) * fix(provider): scope DeepSeek V4 Flash sampling defaults (anomalyco#41620) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: 侯秀凯 <9627034+hoooou@users.noreply.github.com> (cherry picked from commit 5d95348) * fix(opencode): detect Copilot PDF input support (anomalyco#41522) (cherry picked from commit 561afb4) * fix(opencode): cap session retries with jitter (anomalyco#41939) (cherry picked from commit c789868) * fix(provider): add Merge Gateway reasoning variants (anomalyco#41867) (cherry picked from commit 8571a92) * docs: fix broken DigitalOcean and Daytona links (anomalyco#42048) Co-authored-by: skyzhao1223 <skyzhao1223@users.noreply.github.com> (cherry picked from commit ca3df21) * docs: fix provider display name and PAT typos (anomalyco#42034) Co-authored-by: skyzhao1223 <skyzhao1223@users.noreply.github.com> (cherry picked from commit 959c8bd) * fix(xai): pass through reasoning effort (anomalyco#42160) Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com> (cherry picked from commit 502310f) * fix(mistral): pass through reasoning effort (anomalyco#42164) Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com> (cherry picked from commit beeabe2) * fix(groq): pass through reasoning effort (anomalyco#42166) Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com> (cherry picked from commit 6fea419) * fix(opencode): select Kimi prompt by provider (anomalyco#42161) Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com> (cherry picked from commit 91df883) --------- Co-authored-by: OpeOginni <107570612+OpeOginni@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: 侯秀凯 <9627034+hoooou@users.noreply.github.com> Co-authored-by: Steven Ao <stevenao@users.noreply.github.com> Co-authored-by: Matthew Feroz <136640686+MatthewFeroz@users.noreply.github.com> Co-authored-by: SKY ZHAO <boyzhaotian@hotmail.com> Co-authored-by: skyzhao1223 <skyzhao1223@users.noreply.github.com> Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
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.
Issue for this PR
Closes #37076
Type of change
What does this PR do?
Caps the high-level session retry policy at five retries so persistent retryable provider failures terminate instead of running indefinitely. Adds up to 25% jitter to locally computed exponential delays while continuing to honor explicit provider retry delays unchanged.
How did you verify your code works?
bun test test/session/retry.test.tsfrompackages/opencode: 54 passedbun typecheckfrompackages/opencode: passedScreenshots / recordings
N/A
Checklist