Skip to content

Computer Use get_app_state for Chrome returns cgWindowNotFound while Chrome is running #30797

Open

Description

@jsleemaster

What version of the Codex App are you using?

Codex Desktop 26.623.61825 / build 4548

Computer Use helper: 1.0 / build 857

What platform is your computer?

  • macOS 15.7.7 build 24G720
  • Apple Silicon / arm64

What issue are you seeing?

Computer Use cannot attach to Google Chrome in a normal unlocked desktop session. Chrome is running and visible to the app inventory, but get_app_state fails before returning a screenshot or accessibility tree.

The same failure reproduces with all three Chrome identifiers:

mcp__computer_use.get_app_state({ app: "Google Chrome" })
=> Computer Use server error -10005: cgWindowNotFound

mcp__computer_use.get_app_state({ app: "com.google.Chrome" })
=> Computer Use server error -10005: cgWindowNotFound

mcp__computer_use.get_app_state({ app: "/Applications/Google Chrome.app" })
=> Computer Use server error -10005: cgWindowNotFound

At the same time, mcp__computer_use.list_apps() reports Chrome as running:

Google Chrome — /Applications/Google Chrome.app/ — com.google.Chrome [running]

Chrome is also scriptable outside the Computer Use path: AppleScript can query the active tab URL and title successfully. This points away from Chrome being absent or crashed, and toward the Computer Use window lookup / attach path.

What steps can reproduce the bug?

  1. Open Codex Desktop on macOS.
  2. Open Google Chrome and make sure it has a normal browser window.
  3. From a Codex thread with the Computer Use plugin available, call:
mcp__computer_use.list_apps()
mcp__computer_use.get_app_state({ app: "Google Chrome" })
mcp__computer_use.get_app_state({ app: "com.google.Chrome" })
mcp__computer_use.get_app_state({ app: "/Applications/Google Chrome.app" })
  1. Observe that list_apps sees Chrome, but each get_app_state call returns cgWindowNotFound.

What is the expected behavior?

Computer Use should attach to the visible Chrome window and return a screenshot and accessibility tree, or return a more specific diagnostic explaining why the visible/running app is not eligible for attachment.

What is the actual behavior?

Computer Use returns:

Computer Use server error -10005: cgWindowNotFound

No screenshot or accessibility tree is returned.

Related issues checked

I searched existing issues before filing. These look related but not exact duplicates:

If maintainers prefer this folded into #27829, that is fine; I filed separately because the failure is in direct Computer Use get_app_state for Chrome rather than Appshot hotkey capture.

Privacy / redaction note

I intentionally omitted the actual Chrome URL/title and local project details. The important observation is only that AppleScript could read Chrome's active tab while Computer Use could not attach.

Activity

  1. added
    bug
    app
    on Jul 1, 2026
  2. axelcursive commented on Sep 30, 2026

    @axelcursive

    Related local observation: we reproduced cgWindowNotFound in Chrome Appshots, then recovered a successful capture with both screenshot and AX text on Codex 26.928.21956 / build 12404 and macOS 26.6.2.

    The recovery followed helper Accessibility reset/reauthorization and termination of the old helper. On the successful hotkey attempt, Codex replaced its stale helper PID and spawned a new helper, without restarting the main app. Earlier restarts had not fixed it, so this is not a confirmed general workaround.

    A separate native Swift probe could resolve Chrome's AX focused/main window, obtain its CG window ID, and retrieve its CG description. The failure therefore appears localized to the helper's window-resolution path, although its exact cause remains unknown.

    Full diagnostic and recovery evidence: #27829 (comment)

    This validates the Appshot hotkey path only; direct get_app_state has not been revalidated after recovery.

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

    appbugcomputer-use

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions