codex - 💡(How to fix) Fix Windows Computer Use screenshot fails on Windows 10 22H2 when SetIsBorderRequired is called

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Error Message

  • Alternatively, fail with a clear compatibility error such as: Computer Use screenshots require Windows build 20348+ because border toggling is currently unconditional.

Root Cause

  • 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.

Code Example

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

---

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 });

---

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

---

await sky.get_window_state({ window: targetWindow, include_screenshot: false, include_text: true });

---

{
  "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)"
}
RAW_BUFFERClick to expand / collapse

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING