Skip to content

fix(opencode): cap session retries with jitter - #41939

Merged
rekram1-node merged 1 commit into
devfrom
retry-adjustments
Aug 12, 2026
Merged

fix(opencode): cap session retries with jitter#41939
rekram1-node merged 1 commit into
devfrom
retry-adjustments

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Issue for this PR

Closes #37076

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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.ts from packages/opencode: 54 passed
  • bun typecheck from packages/opencode: passed
  • Added coverage for jitter bounds and retry schedule exhaustion

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@rekram1-node
rekram1-node merged commit c789868 into dev Aug 12, 2026
11 checks passed
@rekram1-node
rekram1-node deleted the retry-adjustments branch August 12, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

infinite retry loop on Azure 429 with Retry-After: 0

1 participant