Repository navigation
Honor Retry-After in WebSocket error events - #51440
Merged
copyberry[bot] merged 1 commit intoOct 6, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why WebSocket rate-limit and overload errors ignored `Retry-After` advice and ended turns even when the server supplied a retry delay. ## What changed Extract retry advice from nested `error.headers`, falling back to top-level `headers` when nested advice is missing or invalid. Use the shared HTTP header validation and retry-delay parser, and preserve the delay when mapping WebSocket errors. ## Testing Add coverage for nested-header precedence, malformed headers, HTTP header validation, and recovery after an advised rate limit. Verify that overloads retry only while advice is present, without falling back to HTTP, and that headerless rate limits, usage limits, and `flex_unavailable` errors remain terminal. GitOrigin-RevId: 61add0c36197e10402d6d3c325332aac72a5a521
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/61add0c36197e10402d6d3c325332aac72a5a521
branch
from
October 6, 2026 18:17
c09396c to
f6cf05a
Compare
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/61add0c36197e10402d6d3c325332aac72a5a521
branch
October 6, 2026 18:18
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Honor Retry-After in WebSocket error events
Why
WebSocket rate-limit and overload errors ignored
Retry-Afteradvice and ended turns even when the server supplied a retry delay.What changed
Extract retry advice from nested
error.headers, falling back to top-levelheaderswhen nested advice is missing or invalid. Use the shared HTTP header validation and retry-delay parser, and preserve the delay when mapping WebSocket errors.Testing
Add coverage for nested-header precedence, malformed headers, HTTP header validation, and recovery after an advised rate limit. Verify that overloads retry only while advice is present, without falling back to HTTP, and that headerless rate limits, usage limits, and
flex_unavailableerrors remain terminal.