Repository navigation
Add model request preflight and explicit tool execution policies - #6212
markstuart-oai wants to merge 5 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Request changes: the new preflight can accept an explicit native approval recovery requirement even though dispatch disables recovery for that request. See inline finding. Reviewed adapter validation, automatic preflight ordering, ownership declarations, workspace policy, input conversion, and tests.
Hosted CI at review: all 19 reported checks passed. Static review only; no candidate code or tests executed.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb76af0301
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
The prior native approval recovery finding is fixed: incompatible required-tool requests now fail before native startup, with both Runner modes covered.
Request changes remains necessary for the existing strict Chat reasoning-settings preflight finding, independently confirmed during re-review. Preflight omits the validation that _fetch_response performs for reasoning.mode/context in strict mode, so a selector can admit LLM-start hooks and RunControl submission before a deterministic rejection. Include equivalent validation in preflight while preserving legacy behavior. Linking the existing finding rather than duplicating it inline.
Reviewed the fix, inherited tool-identity changes, adapter paths, tests and existing feedback. Hosted CI at review: 16 passed, 2 skipped, 3 running. Static only; no candidate code or local tests executed.
Hosted CI update (2026-11-24 07:57 UTC): 19 passed, 4 skipped; no checks remain pending in the current rollup. The strict Chat preflight finding still requires changes. No local tests were run.
There was a problem hiding this comment.
Approved after static re-review and an independent review. Strict Chat reasoning settings now use the dispatch validators during preflight, before hooks or receipt submission, while legacy warnings remain at dispatch. Reviewed shared argument construction and collision checks, omitted-argument overrides, static input conversion, and computer/web-tool handling without invoking caller callbacks or serializers. Tests cover both Runner modes, retained receipts, and strict/legacy behavior. The prior findings are addressed.
Hosted CI at review: {"SUCCESS":17,"IN_PROGRESS":2}. Pending checks remain under follow-up. No candidate code or local tests executed.
Hosted CI follow-up (2026-11-24 08:32 UTC): all checks at this reviewed commit are complete: 19 passed and 2 skipped, with no failures. The pending CI follow-up is resolved. No candidate code or local tests executed.
Why
An app switching from Responses to
CodexProvidercannot continue usingprevious_response_id. Learning this before starting the run lets it supply conversation history instead of attempting a request that will fail.Summary
Model.preflight()checks known request incompatibilities offline. Given a model fromCodexProvider, this reports failed validation.ToolExecutionConfiglets the app choose who runs workspace commands. The preflight report identifies who runs each tool, as shown in the complete example. Runner checks filtered requests automatically when model selection or an explicit execution policy is active. Preflight cannot confirm remote access or host permissions. SDK workspace execution does not prevent native child agents from making model calls. Requiring native approval recovery needs a provider-owned Codex workspace,ResumableSessionand unset or"auto"tool choice.Parent #6211.
Test plan
The offline snippet reported the expected incompatibility. Python and simulated Codex tests passed, including rejection before hooks and native startup in both Runner modes.
Issue number
None.
Checks
.agents/skills/code-change-verification/scripts/run.sh/reviewbefore submitting this PR