Skip to content

[Feature request][In-app Browser] Surface native webpage dialogs to agents #40925

Open

Description

@RazeBerry

What variant of Codex are you using?

Codex app 26.818.61809 on macOS, using the in-app Browser control capability.

What feature would you like to see?

Surface native webpage alert, confirm, and prompt dialogs as structured in-app Browser state. The agent should receive the dialog type, message text, and origin, and should be able to accept or dismiss it. In-app Browser screenshots should also capture the visible dialog overlay.

If a dialog is blocking the page, Browser actions should report that condition instead of appearing to succeed or silently doing nothing.

Additional information

Minimal reproduction:

  1. Open a webpage in the in-app Browser.
  2. Submit an incomplete form that triggers a native JavaScript alert, or wait for a site-rendered session-extension modal.
  3. The human can see the dialog and its message.
  4. Structured Browser control can report no active dialog, expose only the underlying DOM, or time out when clicking the visible button.
  5. The agent cannot reliably read or dismiss the dialog and may incorrectly infer that the previous action had no effect.

Expected behavior:

  • Emit a dialog-open event containing type, message, and origin for native dialogs.
  • Make native dialogs available through the structured dialog API until accepted or dismissed.
  • Capture visible native and site-rendered modal overlays in in-app Browser screenshots.
  • Report an explicit blocking-dialog condition when underlying-page actions cannot proceed.
  • Preserve this behavior for unattended workflows where the user is away from the computer.

Important scope distinction: screen-level Computer Use can see these rendered dialogs. The gap is specifically in the in-app Browser structured state and interaction layer. This is also distinct from #37855, which concerns clicking a button in a separate Chrome popup window.

Activity

  1. added
    enhancement
    app
    on Aug 26, 2026
  2. changed the title [-][Feature request][Browser/Computer Use] Surface native webpage dialogs to agents[/-] [+][Feature request][In-app Browser] Surface native webpage dialogs to agents[/+] on Aug 26, 2026
  3. AbubakarMahmood commented on Sep 29, 2026

    @AbubakarMahmood

    Windows-specific reproduction from Codex app 26.928.1915.0 (Windows 10/11 desktop, in-app Browser):

    1. Open an authenticated public web page in the Codex in-app Browser.
    2. Submit a normal form that triggers a native JavaScript alert() after the server accepts the change.
    3. The alert is rendered over the Codex chat/composer surface instead of being contained or clearly associated with the browser tab that initiated the action. In the live reproduction the page alert said Added Applicant Education.
    4. The agent-side action can then report a stale/missing dialog element or a timeout; after acknowledging the alert, the page state is updated, but the dialog placement makes it easy to act on the wrong surface or infer that the save failed.

    Expected: the native dialog should stay associated with its originating browser tab and be exposed through the structured dialog state with its type, message, origin, and a reliable accept/dismiss action. The desktop UI should not place it over the chat surface in a way that obscures which tab owns it. A blocking-dialog state should be reported until the dialog is handled.

    This is a Windows reproduction of the in-app Browser dialog visibility/association gap tracked here. No credentials, identity numbers, private files, or profile data are included. The website is a legacy portal that uses native JavaScript alerts for successful saves; the issue is the Codex dialog routing/structured handling, not the portal's content.

  4. fxware00 commented on Oct 7, 2026

    @fxware00

    Additional Windows in-app Browser reproduction on 2026-10-07.

    Environment:

    • Windows desktop, installed MSIX package OpenAI.Codex version 26.930.7945.0.
    • Codex in-app Browser (iab), controlled through the supported unified computer/browser APIs.
    • An authenticated web application with a normal save button that opens a native JavaScript confirmation.

    Observed sequence:

    1. Fill the form and click Save once using the supported Playwright locator API.
    2. The click fails with Timed out running CDP command "Input.dispatchMouseEvent" for tab 1.
    3. On the retained tab, tab.getJsDialog() returns undefined, although the native confirmation is awaiting user acknowledgement.
    4. tab.getAXState() fails with Timed out running CDP command "Emulation.setFocusEmulationEnabled" for tab 1.
    5. Calling Page.handleJavaScriptDialog with {accept: true} through the documented tab CDP capability also fails with the same focus-emulation timeout.
    6. A separate IAB tab remains usable and initially shows the previously saved form content. Save is not retried while the first outcome is unresolved.
    7. The user manually clicks OK in IAB. A fresh editor readback then matches the intended content exactly, and the public page reflects the saved change.

    This reproduces both the structured-dialog discovery gap (getJsDialog() returns no dialog) and the blocked interaction path in IAB on Windows. Manual acknowledgement completes the pending save, but is not a fix for automated dialog handling.

    Related: #43653 reports the same Input.dispatchMouseEvent and Emulation.setFocusEmulationEnabled timeouts with Chrome on Windows. Our reproduction uses IAB, a different backend; the matching errors do not establish a shared root cause.

    Expected: expose the active dialog reliably, allow supported accept/dismiss operations without waiting for an operation blocked by that modal, and report an explicit blocking-dialog state. Please retain existing origin, permission, and security checks. Blanket automatic acceptance of confirmations is not requested.

    No installed runtime or confirmation semantics were modified. No credentials, account details, private URLs, form content, screenshots, or filesystem paths are included in this comment.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbrowsercomputer-useenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions