Skip to content

fix: recheck browser cancellation after approval callbacks - #4322

Open
marcuswood-oai wants to merge 1 commit into
mainfrom
codex/browser-cancel-after-approval
Open

marcuswood-oai wants to merge 1 commit into
mainfrom
codex/browser-cancel-after-approval

Conversation

@marcuswood-oai

Copy link
Copy Markdown
Contributor

Changes being requested

Recheck cancellation after the approval diagnostic callback returns, before reading browser state for an approved read or invoking a browser action. Apply the same checks to the sync and async toolsets.

Additional context & links

Four regression cases verify that cancellation from the callback prevents the next driver call. All four failed before the change. All 753 browser tests passed with the change. Ruff and ty passed for the changed files.

@marcuswood-oai
marcuswood-oai requested a review from a team as a code owner November 24, 2026 00:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T00:16:07.656844Z 254b5ab PR opened
🔒 Security Review ✅ Completed 2026-11-24T00:16:49.033773Z 254b5ab PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Both browser toolsets now recheck cancellation after the approval callback and before the next driver call. The new cases cover cancellation before an approved read or action in both toolsets.

Static review only. Hosted checks were still running.

@jbeckwith-oai jbeckwith-oai left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the full change and surrounding sync/async dispatch, diagnostic observer, cancellation, and lifecycle paths, including an independent review. No actionable findings. The added checks stop approved reads before browser state access and stop actions before handler invocation when the approval diagnostic callback requests cancellation; cancellation propagation and lifecycle cleanup remain intact. The regression cases cover both paths in both toolsets.

Static review only; no candidate code or local tests executed. Hosted CI at review time: 13 successful checks, 9 skipped, and 4 still running; no failures observed.

Hosted CI update (2026-11-24 00:38 UTC): all checks are terminal, with 17 successful and 9 skipped; no failures.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants