Skip to content

Windows Computer Use screenshot fails on Windows 10 22H2 when SetIsBorderRequired is called #25178

Description

@Define1165250535

Summary

On Windows Codex Desktop, Computer Use can list apps/windows, activate windows, read accessibility text, and send keyboard input, but any get_window_state call that requests a screenshot fails before capture with:

SetIsBorderRequired failed: 不支持此接口 (0x80004002)

The same target window works when requesting accessibility text only (include_screenshot: false, include_text: true). This looks like the Windows capture helper unconditionally calls GraphicsCaptureSession.IsBorderRequired / SetIsBorderRequired on a Windows build that does not support that property.

Environment

Sanitized user machine details:

  • Platform: Windows Codex Desktop
  • Codex app package observed: OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0
  • Computer Use plugin observed: computer-use/26.527.31326
  • OS: Windows 10 Pro 22H2
  • OS build: 10.0.19045
  • GPU: NVIDIA GeForce GTX 1060 3GB
  • DirectX: 12
  • Driver model: WDDM 2.7
  • Remote/virtual display drivers also present: ToDesk Virtual Display Adapter, Oray Display Mirror Driver

Reproduction

From the Computer Use client in Codex Desktop on this Windows 10 machine:

  1. Bootstrap Computer Use and call sky.list_apps().
  2. Open or select a simple window such as Notepad.
  3. Activate the window.
  4. Call any screenshot-including state request, for example:
await sky.get_window_state({ window: targetWindow });
// or
await sky.get_window_state({ window: targetWindow, include_screenshot: true, include_text: false });
// or
await sky.get_window_state({ window: targetWindow, include_screenshot: true, include_text: true });
  1. The call fails with:
SetIsBorderRequired failed: 不支持此接口 (0x80004002)
  1. Calling text-only succeeds:
await sky.get_window_state({ window: targetWindow, include_screenshot: false, include_text: true });

Observed text-only result against Notepad included a focused editor element and accessibility tree, proving that the helper, native pipe, app enumeration, activation, and accessibility path are otherwise working.

Observed Batch Test Results

{
  "notepad_default_screenshot": "failed: SetIsBorderRequired failed: 不支持此接口 (0x80004002)",
  "notepad_explicit_screenshot": "failed: SetIsBorderRequired failed: 不支持此接口 (0x80004002)",
  "notepad_text_only": "ok",
  "notepad_both": "failed: SetIsBorderRequired failed: 不支持此接口 (0x80004002)",
  "explorer_screenshot": "failed: SetIsBorderRequired failed: 不支持此接口 (0x80004002)"
}

Suspected Cause

Microsoft documents GraphicsCaptureSession.IsBorderRequired as introduced in Windows 10 version 2104 / build 10.0.20348.0, API contract v12:

https://learn.microsoft.com/en-us/uwp/api/windows.graphics.capture.graphicscapturesession.isborderrequired

This repro machine is Windows 10 build 19045, so SetIsBorderRequired appears to hit E_NOINTERFACE (0x80004002, no such interface supported). The capture helper seems to abort instead of continuing without border toggling.

Expected Behavior

On Windows builds where border toggling is unsupported, Computer Use should still capture screenshots if the underlying Windows Graphics Capture path is otherwise available. Suggested behavior:

  • Gate the border call with ApiInformation.IsPropertyPresent("Windows.Graphics.Capture.GraphicsCaptureSession", "IsBorderRequired"), or an equivalent OS/API contract check.
  • If unsupported, skip SetIsBorderRequired and allow the default capture border behavior.
  • Alternatively, fail with a clear compatibility error such as: Computer Use screenshots require Windows build 20348+ because border toggling is currently unconditional.

Impact

This leaves Computer Use partially functional on Windows 10 22H2:

  • Working: app/window enumeration, activation, accessibility text, keyboard input.
  • Broken: screenshot-based UI inspection and accurate coordinate-based visual interaction.

For users on Windows 10 build 19045, this means Computer Use cannot reliably operate visual apps even though non-visual operations work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingcomputer-usewindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions