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

Open 💬 2 comments Opened Aug 7, 2026 by shz80808-byte
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 20 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #37383
  • #37306
  • #37255
  • #37215
  • #37043

Powered by Codex Action

onurbite · 20 days ago

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.