Skip to content

Handle bio policy errors in Codex - #31439

Merged
fc-oai merged 1 commit into
mainfrom
fc/bio-policy-error-compat
Jul 7, 2026
Merged

Handle bio policy errors in Codex#31439
fc-oai merged 1 commit into
mainfrom
fc/bio-policy-error-compat

Conversation

@fc-oai

@fc-oai fc-oai commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat streamed Responses bio_policy failures as terminal invalid requests instead of retryable stream errors.
  • Recognize the new biology policy code and message in the TUI while preserving the legacy invalid_prompt contract.
  • Keep the existing dedicated biology safety notice and add regression/snapshot coverage for all supported error shapes.

Why

openai/openai#1068559 gates a Responses API contract change from invalid_prompt and the legacy message to bio_policy and new biology copy.

Without this compatibility change, streamed blocks are retried as transient failures and the OSS TUI falls back to a generic/raw error instead of the dedicated safety notice.

Validation

  • just test -p codex-api — 137 passed
  • just test -p codex-tui app_server_safety_access_errors_render_dedicated_notice — passed
  • just fix -p codex-api
  • just fix -p codex-tui
  • just fmt
  • just test -p codex-tui — 2,957 passed; two reproducible failures remain in untouched Guardian feature-flag persistence tests:
    • update_feature_flags_disabling_guardian_clears_review_policy_and_restores_default
    • update_feature_flags_disabling_guardian_clears_manual_review_policy_without_history

@ftoddywala ftoddywala left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@fc-oai
fc-oai marked this pull request as ready for review July 7, 2026 17:23
@fc-oai
fc-oai merged commit 78df123 into main Jul 7, 2026
35 checks passed
@fc-oai
fc-oai deleted the fc/bio-policy-error-compat branch July 7, 2026 17:33
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants