Files
codex/codex-rs/response-debug-context
Charlie Marsh 65f2709052 Treat content policy violations as terminal errors (#60479)
## What changed

Recognize `content_policy_violation` in HTTP 400 responses and streamed errors as a dedicated, non-retryable error. Preserve the provider's message and available HTTP status, use a fallback message when needed, and report `CodexErrorInfo::InvalidPrompt` to clients.

End the response stream immediately on this error and stop compaction from falling back to the current model after a content policy rejection. Add redacted diagnostic output and a dedicated sampler failure reason.

## Testing

Extend coverage for HTTP and wrapped WebSocket errors, missing or blank provider messages, terminal stream failures with retry headers, and content policy rejections during local and remote compaction on model downshift.

GitOrigin-RevId: 592170ac30c07b0b303a8d5cb15bd35c8f821b55
2026-11-10 00:53:04 +00:00
..