Repository navigation
Preserve invalid_prompt as a distinct error classification - #47353
Merged
copyberry[bot] merged 1 commit intoSep 22, 2026
Conversation
## Why `invalid_prompt` responses were classified as generic invalid requests, losing the server's specific error classification. ## What changed Add `InvalidPrompt` variants to the API and core error types and serialize the core protocol classification as `invalid_prompt`. Recognize the code in HTTP 400 responses, wrapped WebSocket errors, and SSE `response.failed` events while preserving server messages and keeping the error non-retryable. Map it to `other` in the app-server v2 protocol. ## Testing Extend coverage for typed error mapping, missing and blank messages, protocol conversion, and guardian retry handling. Exercise HTTP and SSE failures in core integration tests, asserting the error message, serialized classification, and a single request without retry. GitOrigin-RevId: 5d9a299a013b06158a4dc27a4054f3dbc5fd0f4d
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/5d9a299a013b06158a4dc27a4054f3dbc5fd0f4d
branch
from
September 22, 2026 20:08
c46e86b to
559264d
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/5d9a299a013b06158a4dc27a4054f3dbc5fd0f4d
branch
September 22, 2026 20:08
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.
Preserve
invalid_promptas a distinct error classificationWhy
invalid_promptresponses were classified as generic invalid requests, losing the server's specific error classification.What changed
Add
InvalidPromptvariants to the API and core error types and serialize the core protocol classification asinvalid_prompt. Recognize the code in HTTP 400 responses, wrapped WebSocket errors, and SSEresponse.failedevents while preserving server messages and keeping the error non-retryable. Map it tootherin the app-server v2 protocol.Testing
Extend coverage for typed error mapping, missing and blank messages, protocol conversion, and guardian retry handling. Exercise HTTP and SSE failures in core integration tests, asserting the error message, serialized classification, and a single request without retry.