fix(approvals): honor resolved status before policy checks - #4183
Conversation
Treat stored approval decisions as authoritative across execution, resume planning, Realtime, and multi-operation apply-patch paths. Co-authored-by: Henry Su <henrysu4707@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36f90ea4e5
ℹ️ 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".
|
@codex review again |
|
Security review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
This pull request fixes tool approval handling so stored approve and reject decisions remain authoritative across initial execution, resume planning, Realtime calls, and native and sandbox apply-patch operations.
It carries forward the bug identified and initially addressed in the now-closed #3937. Because that PR had fallen behind current main and did not cover newer concurrent checker, guardrail, and resume paths, this maintainer-authored follow-up reimplements the fix against current main while preserving Henry Su's contribution through commit co-authorship.
Resolved decisions now skip unnecessary dynamic approval checks, and decisions recorded while a checker or pre-approval guardrail is suspended are re-read before execution or interruption registration. Resume planning preserves unmatched pending approvals, avoids stale re-interruptions, and retains new approvals emitted by execution-time policy reevaluation. Tool input safety guardrails remain independent, and there are no public API or serialized-state changes.