Skip to content

[Windows] computer-use still uses EnumWindows although EnumDesktopWindows works in sandbox #37436

Open

Description

@shz80808-byte

Summary

On Windows, OpenDesktopW("Default", 0, FALSE, DESKTOP_READOBJECTS) plus EnumDesktopWindows works in the sandbox, but bundled @oai/sky window/app listing still fails.

Reproduction

sky.list_windows() and sky.list_apps() both return:

EnumWindows failed: The system cannot find the path specified. (0x80070003)

Independent control test: OpenDesktopW succeeds; EnumDesktopWindows succeeds; 464 windows are enumerated; GetWindowThreadProcessId/GetWindowTextW and CloseDesktop succeed; no desktop switch is performed.

Expected behavior

sky.list_windows() and sky.list_apps() should work when the process can open WinSta0\Default for read access.

Suspected cause

The native Windows implementation still relies on EnumWindows, which does not see the relevant windows from this sandbox desktop context. The verified compatible path is OpenDesktopW plus EnumDesktopWindows.

Proposed fix

Under the Computer Use native Windows implementation (suspected area: project/cua/sky_js/plugin): open Default with OpenDesktopW; enumerate with EnumDesktopWindows; keep existing HWND metadata APIs; always call CloseDesktop; preserve a clear denial/error path; do not switch desktops.

Acceptance criteria

  • list_windows returns windows and metadata.
  • list_apps succeeds.
  • No interactive desktop switch is required.
  • Desktop handles close on success and failure.
  • Existing behavior remains unchanged when OpenDesktopW is unavailable.

Notes

No custom binary or IPC wrapper was used.

Activity

  1. added
    bug
    windows-os
    sandbox
    on Aug 7, 2026
  2. onurbite commented on Aug 8, 2026

    @onurbite

    I’m experiencing the same issue on Windows 11 Pro 25H2 with Computer Use plugin version 26.803.41515.

    The exact error is:
    EnumWindows failed: The system cannot find the path specified. (0x80070003)

    Computer Use worked normally before, but now foreground takeover/mouse control no longer starts. I also opened a support ticket with OpenAI and it has been escalated.

    This is currently blocking my work completely.

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

    bugcomputer-usesandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions