Repository navigation
Surface Flex capacity failures as a distinct terminal error - #47967
Merged
copyberry[bot] merged 1 commit intoSep 24, 2026
Conversation
## What changed - Recognize `flex_unavailable` in HTTP 429 responses and streamed `error` and `response.failed` events. End normal turns without retries and report `Flex capacity unavailable.` - Expose `flexUnavailable` through the core and app-server protocols and generated schemas and SDK types. - Keep Flex capacity failures eligible for Guardian review and sampler retries, with a distinct telemetry classification. - Map unexpected HTTP responses to `HttpConnectionFailed`, preserving their status codes. ## Testing Add regression coverage for terminal Flex failures over HTTP, SSE, and WebSocket, HTTP 504 status preservation after a stream retry, and protocol serialization. Update Guardian retry and sampler recovery tests to cover Flex failures. GitOrigin-RevId: f2e03a6d2d36a6d9748c35952e40397f8670d121
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/f2e03a6d2d36a6d9748c35952e40397f8670d121
branch
from
September 24, 2026 23:33
9569b5e to
dafb133
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/f2e03a6d2d36a6d9748c35952e40397f8670d121
branch
September 24, 2026 23:33
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.
Surface Flex capacity failures as a distinct terminal error
What changed
flex_unavailablein HTTP 429 responses and streamederrorandresponse.failedevents. End normal turns without retries and reportFlex capacity unavailable.flexUnavailablethrough the core and app-server protocols and generated schemas and SDK types.HttpConnectionFailed, preserving their status codes.Testing
Add regression coverage for terminal Flex failures over HTTP, SSE, and WebSocket, HTTP 504 status preservation after a stream retry, and protocol serialization. Update Guardian retry and sampler recovery tests to cover Flex failures.