openai / openai/codex

Windows Chrome dialog.accept() stalls in Emulation.setFocusEmulationEnabled after a save click opens a JavaScript confirm

Open
#43,653 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app browser bug tool-calls windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

No business records, account information, browsing history, screenshots, or private filesystem paths are included.

Environment

  • Microsoft Windows NT 10.0.19045.0 x64, ChatGPT desktop / Codex
  • Subscription: not provided; account information intentionally omitted
  • Installed MSIX identity: OpenAI.Codex
  • Installed version: 26.901.6511.0
  • App-managed unified-computer-use bundle: 26.901.51231
  • Browser runtime: @oai/browser-desktop 0.1.1
  • Existing local Chrome tab controlled through the ChatGPT extension
  • A legacy frameset web app with a normal JavaScript confirm, followed by an alert

On 2026-09-08, a HEAD request to the stable x64 MSIX linked by the official Windows deployment documentation returned package version 26.901.6511.0, matching the installed version. No newer package was identified on that official route; no reinstall was attempted.

Reproduction observed in the live task

  1. Successfully select the existing tab, search a record, enter its final value, and verify the page's derived fields.
  2. Click Save once. The website opens its native JavaScript registration-confirmation dialog.
  3. The click reports an Input.dispatchMouseEvent timeout, despite the confirm appearing in Chrome.
  4. On the same retained Tab object, getJsDialog() returns a confirm object. The accessibility state contains the expected message, Cancel, and OK.
  5. Call that confirm object's supported accept() method.
  6. The tool times out in Emulation.setFocusEmulationEnabled. The native dialog remains open, independently confirmed by a user-provided screenshot.
  7. Further state reads may stall. The agent does not repeat Save or assume success.

An earlier reproduction was manually completed by the user accepting the registration confirm and then the success alert. Manual success did not resolve the automation failure on the next record.

Expected

The supported dialog API should handle the known active confirm without waiting for a renderer operation blocked by that same modal. A subsequent success alert must be separately discoverable and handled. The existing URL, app-permission, target-tab, and command-security checks must remain enforced.

Source-level findings

Read-only inspection of the installed production browser service found:

  • ensureAttachedTab awaits focus emulation immediately after attaching, before registering the attached tab and running normal attachment handlers, including Page.enable.
  • Root-tab CDP events are ignored until the tab is registered as attached.
  • Page.handleJavaScriptDialog is exempt from the active-dialog method guard, but still goes through the attachment-initialization path.
  • Detach cleanup removes the active-dialog cache and top-level URL cache.
  • The mouse-release input path does not explicitly retain the debugger on timeout. Whether this caused the initial detach in the live case remains unproven; backend tracing is needed.

Service SHA-256: 3032666de451e423db76b5f9b0456e370d4f57416bbf53d0c746be636359ba02

Offline diagnostic coverage and limitations

Eight mock tests extracted the actual CDP class and dialog-close handler from the installed bundle. They reproduced the observed focus-before-discovery stall. A narrow in-memory ordering change recovered only when the mock replayed the dialog-opening event, preserved ordinary focus initialization, blocked a pending renderer operation after discovering a modal, and preserved an immediately following alert's distinct ID.

Importantly, the candidate still failed without event replay. Retaining attachment-handler invocation did not establish completion of Fetch/Runtime setup under a modal. Deferred setup/focus restoration and backend timeout/session retention require proper integration tests. These tests are diagnostic evidence, not a verified production patch.

During this investigation, we did not modify installed runtimes, security checks, extension settings, web-app functions, or confirmation semantics. No custom CDP client or auto-accept hook was used.

Requested product investigation

Please inspect modal-producing input timeout handling, attachment initialization ordering, retention of the original dialog-capable session, and confirm-to-alert transitions. Please provide a supported fix that does not disable URL/app checks or automatically accept all dialogs.

Official references:

Related reports checked

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading ensureAttachedTab and Page.handleJavaScriptDialog in the installed browser service, then review the extracted CDP dialog-close handler and its eight diagnostic mock tests. Reproduce the focus-before-discovery stall with integration coverage; done means the supported confirm API completes, a following alert remains separately discoverable, and URL, app-permission, target-tab, and command-security checks stay enforced.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
desktop, devtools
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.