Skip to content

fix(opencode): ignore negative retry hints - #41427

Open
kennyjinhiro wants to merge 1 commit into
anomalyco:devfrom
kennyjinhiro:fix/negative-retry-time
Open

fix(opencode): ignore negative retry hints#41427
kennyjinhiro wants to merge 1 commit into
anomalyco:devfrom
kennyjinhiro:fix/negative-retry-time

Conversation

@kennyjinhiro

@kennyjinhiro kennyjinhiro commented Aug 9, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #41424

Type of change

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

What does this PR do?

I ignored negative numeric retry-after and retry-after-ms values.
Now negative numerics uses the existing exponential backoff!

How did you verify your code works?

I ran

bun test test/session/retry.test.ts --test-name-pattern 'session.retry.delay'

11 tests passed, including negative retry-after and retry-after-ms cases.

Screenshots / recordings

Not a UI change unfortunately!

Checklist

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

@github-actions github-actions Bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Aug 9, 2026
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Aug 9, 2026
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@kennyjinhiro kennyjinhiro changed the title fix(opencode): only cap positive time of retry header fix(opencode): ignore negative retry hints Aug 9, 2026
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.

[bug] [opencode] bad headers from any provider could result in negative 'max-retry'

1 participant