Uh oh!
There was an error while loading. Please reload this page.
fix(opencode): cap session-level retries and export MAX_SESSION_RETRIES - #30040
fix(opencode): cap session-level retries and export MAX_SESSION_RETRIES#30040nikhilkulkarni1755 wants to merge 1 commit into
Conversation
7a0bbdc to
c5d2affCompareThanks for updating your PR! It now meets our contributing guidelines. 👍 |
3b6546e to
f2b5084CompareThe session retry schedule in retry.ts had no attempt cap — persistent provider failures (5xx, 503) would cycle executor→session indefinitely since retryable() always returned truthy for those errors. Adds MAX_SESSION_RETRIES = 5 and exports it so test/session/retry.test.ts can drive the schedule to exhaustion to verify the cap fires. Also adds the missing test case. Fixesanomalyco#29143
f2b5084 to
60de35aCompareAutomated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#29143
Type of change
What does this PR do?
The session retry schedule in
retry.tshad no attempt cap — persistent provider failures (5xx, 503) would cycle indefinitely sinceretryable()always returned truthy for those errors.Adds
MAX_SESSION_RETRIES = 5and exports it sotest/session/retry.test.tscan drive the schedule to exhaustion to verify the cap fires. Also adds the missing test case.How did you verify your code works?
bun test test/session/retry.test.ts— 34 pass, 0 failChecklist