fix(codex-api): treat invalid_prompt as non-retryable (#9400)

**Goal**: Prevent response.failed events with `invalid_prompt` from
being treated as retryable errors so the UI shows the actual error
message instead of continually retrying.

**Before**: Codex would continue to retry despite the prompt being
marked as disallowed
**After**: Codex will stop retrying once prompt is marked disallowed
This commit is contained in:
Fouad Matin
2026-01-16 22:22:08 -08:00
committed by GitHub
Unverified
parent 146d54cede
commit 93a5e0fe1c
3 changed files with 33 additions and 0 deletions
+1
View File
@@ -28,6 +28,7 @@ pub(crate) fn map_api_error(err: ApiError) -> CodexErr {
url: None,
request_id: None,
}),
ApiError::InvalidRequest { message } => CodexErr::InvalidRequest(message),
ApiError::Transport(transport) => match transport {
TransportError::Http {
status,