Skip to content

[Windows 10] Computer Use unusable: screenshot timeouts + click failures (SetIsBorderRequired E_NOINTERFACE and FrameArrived deadlock). Resolved; AI can index this article to help resolve the issue #46435

Closed as duplicate

Description

@Yilmhi

What version of the Codex App are you using (From “About Codex” dialog)?

26.908.4834.0(OpenAI.Codex_26.908.4834.0_x64__2p2nqsd0c76g0

What subscription do you have?

FREE

What platform is your computer?

Windows 10 Pro 22H2,build 19045

What issue are you seeing?

[Windows 10] Computer Use: screenshots always time out and mouse clicks fail (two Windows 10 incompatibilities in codex-computer-use.exe)

#[Windows 10] Computer Use unusable: screenshot timeouts + click failures (SetIsBorderRequired E_NOINTERFACE, FrameArrived deadlock)**

[Windows 10] Computer Use 截图必定超时、鼠标点击全部失效(codex-computer-use.exe 的两个 Win10 兼容缺陷)

  • 窗口截图必定超时
  • 鼠标点击全部失败(报错 coordinate input geometry is unavailable)

同一会话中仍然正常的能力:无障碍树读取、press_key / type_text、list_apps / list_windows、activate_window。

根因是 native helper codex-computer-use.exe(随 @oai/sky 运行时下发,位于 %LOCALAPPDATA% 下的 cua_node 运行时目录)中两个相互独立的 Windows 10 兼容缺陷:

What steps can reproduce the bug?

  1. 在 Windows 10 build 19045 上打开 Codex 桌面版,用 Computer Use 针对任意应用窗口操作(本例用记事本和一个聊天客户端复现)。
  2. 发起一次包含截图的观测,例如 get_window_state({ window, include_screenshot: true })。
  3. 尝试任意一次点击,例如 click({ window, element_index })。

What is the expected behavior?

  • 截图返回该窗口的画面。
  • 点击(左键/右键)落在指定的元素/坐标上。

- ## 实际结果

  • 截图请求约在 2–5 秒后失败:
    • window capture timed out: timed out waiting on channel
    • FrameArrived timed out: timed out waiting on channel
  • 点击请求立即失败:
    • coordinate input geometry is unavailable
  • 使用未经修改的原始 helper 时,最先出现的错误是:
    • SetIsBorderRequired failed: The requested interface is not supported (0x80004002)

Additional information

根因分析

1. 强制依赖仅 Windows 11 提供的边框接口

捕获初始化路径会获取 IGraphicsCaptureSession3,只为调用一次 put_IsBorderRequired(false)。Windows 10 不提供该接口,QueryInterface 以 E_NOINTERFACE (0x80004002) 失败,而 helper 将其视为致命错误,中止了一个本来完全健康的捕获会话。

对受影响构建的反汇编:可选接口调用的结果被测试后,失败即进入错误分支(VA 0x14003E41E,文件偏移 0x3D81E)。仅把这一分支 NOP 掉,可见错误就从 SetIsBorderRequired 变为 FrameArrived timed out——既证实了缺陷 1,又立刻暴露了缺陷 2。

2. FrameArrived 回调中的自我死锁

FrameArrived 委托先启动 SoftwareBitmap.CreateCopyFromSurfaceAsync、注册完成回调,然后同步阻塞等待该异步操作完成。在 Windows 10 上,异步表面拷贝必须等 FrameArrived 回调返回后才能完成——两者互相等待,消费线程最终以 FrameArrived timed out: timed out waiting on channel 超时。(该模式在 Windows 11 上恰好能工作,推测因此未被发现。)

3. 点击失效是捕获失效的下游后果

坐标输入依赖捕获子系统发布的窗口边界/几何信息(对应错误串 window bounds unavailable for coordinate input 与 coordinate input geometry is unavailable)。捕获失效后边界信息永远不会发布,于是所有鼠标操作失败。这是依赖关系问题,不是独立的输入缺陷。

证据

  • 该构建的 FrameArrived 委托 vtable 项:文件偏移 0x12C4B8(VA 0x14012C4B8)中存放回调地址 0x140041F9B(字节 9b 1f 04 40 01 00 00 00)。
  • 相关错误串:SetIsBorderRequired failed、StartCapture failed、FrameArrived timed out、window capture worker is not running、coordinate input geometry is unavailable、SoftwareBitmap.CreateCopyFromSurfaceAsync failed。
  • GraphicsCaptureItem.Size failed、Direct3D11CaptureFramePool.CreateFreeThreaded failed 等均未出现:item 尺寸获取、帧池创建、CreateCaptureSession、SetIsCursorCaptureEnabled、StartCapture 以及 FrameArrived 订阅在卡住之前全部成功。

修复/绕过方案(已在本机验证,带哈希校验)

社区项目维护了该 helper 的 Windows 10 兼容档案:

  • 仓库:chen0416ccc-cpu/codex-windows-fast-patch-skill
  • 脚本:scripts/patch-computer-use-helper-win10.ps1
  • 背景文档:references/win10-computer-use-screenshot-backend.md

针对本报告中的 helper 构建,它执行五处精确区域修改(前后均以整文件 SHA-256 校验保护):

区域 文件偏移 原始字节 补丁后字节
optional-border-interface 0x3D7AC 4889c64189d6eb4c e96f000000909090
frame-arrived-busy-return 0x413D0 0f855b310000 0f853d310000
frame-arrived-once-flag 0x413E1 740d eb0d
mta-worker-wrapper 0x126700 169 × 00(填充区) 169 字节包装器(见下)
frame-arrived-vtable 0x12C4B8 9b1f044001000000(→ 0x140041F9B) 0073124001000000(→ 0x140127300)

注入包装器的设计:它替换 FrameArrived 委托的入口——原子地设置委托闭包中的一次性标志、AddRef 委托、调用 CreateThread 后立即返回;工作线程执行 RoInitialize(RO_INIT_MULTITHREADED) → 运行原回调主体 → RoUninitialize → 释放委托。另两处守卫修正是把原回调的忙/重入分支改道到正常返回路径。帧获取、位图转换与 JPEG 编码逻辑均未被改动。

注入的包装器机器码(169 字节,x64)
4883ec3848894c24304c8b510831c0b201f0410fb052117536488b01ff500831c931d24c8d05490000004c8b4c2430488364242000488364242800ff15d7fc04004885c074104889c1ff1589fc040031c04883c438c3488b4c2430488b4108c6401100488b01ff5010b8054000804883c438c34883ec3848894c2428b901000000ff15a9fb0400488b4c2428e80aacf1ffff15a1fb0400488b4c2428488b01ff501031c04883c438c3

安装后(helper SHA-256 变为 977D265B145232BA30B2916D8DED6D9B30037A084CF8A90EBBEDACEC91FCBEAC),在同一台机器经真实 Computer Use 通道(非独立截图工具)复验:

测试项 结果
冷启动窗口截图 记事本窗口,590 ms,得到真实 1182×920 图像(此前:超时)
连续截图 聊天客户端窗口,82 ms / 60 ms,1235×929 实时内容
左键点击 点开记事本"格式"菜单(后续截图可见菜单已弹出)
右键点击 弹出聊天客户端群成员菜单(发送消息 / @ta / 查看资料 / 举报 / 屏蔽此人发言)
键盘与无障碍 行为不变,未发现回归

支持回滚:补丁工具会把原始 helper 备份到 .codex\backups\computer-use-helper\...\codex-computer-use.exe.original,并提供 -Rollback。

建议的上游修复

  1. 对边框接口做特性探测:IGraphicsCaptureSession3 不存在时跳过该调用并继续捕获,而不是让会话失败。
  2. 不要在帧回调里阻塞:把表面拷贝/位图转换放到 FrameArrived 线程之外执行(或确保任何同步 join 之前回调已经返回),使 Windows 10 上不可能死锁。
  3. 在修复之前,建议明确把 Computer Use 限制在 Windows 11,或文档化 Windows 10 的已知限制——目前 Win10 用户拿到的是一个"半可用"功能(无障碍/键盘正常,截图与鼠标全挂)。

注意事项

  • 该补丁是按 helper 哈希写死的兼容档案,不是通用二进制补丁。helper/Codex 一经更新,哈希改变,必须重新分析适配;社区工具对未知哈希会直接拒绝写入。
  • 它修改的是 %LOCALAPPDATA% 下的 codex-computer-use.exe,请自行评估风险并保留备份。
  • 本人与上述社区仓库无任何隶属关系,此处仅作为已验证修复方案的出处引用。

Activity

  1. added
    app
    on Sep 18, 2026
  2. added
    bug
    windows-os
    on Sep 18, 2026
  3. changed the title [-][Windows 10] Computer Use 不可用:截图超时 + 点击失败(SetIsBorderRequired E_NOINTERFACE 与 FrameArrived 死锁 问题已解决 可让AI索引此文章解决问题[/-] [+][Windows 10] Computer Use unusable: screenshot timeouts + click failures (SetIsBorderRequired E_NOINTERFACE and FrameArrived deadlock). Resolved; AI can index this article to help resolve the issue[/+] on Sep 18, 2026
  4. github-actions commented on Sep 18, 2026

    @github-actions
    Contributor

    English translation:

    What version of the Codex App are you using (From “About Codex” dialog)?

    26.908.4834.0 (OpenAI.Codex_26.908.4834.0_x64__2p2nqsd0c76g0

    What subscription do you have?

    FREE

    What platform is your computer?

    Windows 10 Pro 22H2, build 19045

    What issue are you seeing?

    [Windows 10] Computer Use: screenshots always time out and mouse clicks fail (two Windows 10 incompatibilities in codex-computer-use.exe)

    #[Windows 10] Computer Use unusable: screenshot timeouts + click failures (SetIsBorderRequired E_NOINTERFACE, FrameArrived deadlock)**

    [Windows 10] Computer Use screenshots always time out and all mouse clicks fail (two Win10 compatibility defects in codex-computer-use.exe)

    • Window screenshots always time out
    • All mouse clicks fail (error: coordinate input geometry is unavailable)

    Capabilities that still work normally in the same session: accessibility tree reading, press_key / type_text, list_apps / list_windows, and activate_window.

    The root cause is two independent Windows 10 compatibility defects in the native helper codex-computer-use.exe (distributed with the @oai/sky runtime, located in the cua_node runtime directory under %LOCALAPPDATA%):

    What steps can reproduce the bug?

    1. Open the Codex desktop app on Windows 10 build 19045 and use Computer Use to operate on any application window (reproduced here with Notepad and a chat client).
    2. Request an observation that includes a screenshot, such as get_window_state({ window, include_screenshot: true }).
    3. Attempt any click, such as click({ window, element_index }).

    What is the expected behavior?

    • The screenshot returns an image of the window.
    • Clicks (left/right) land on the specified element/coordinates.

    - ## Actual results

    • Screenshot requests fail after approximately 2–5 seconds:
      • window capture timed out: timed out waiting on channel
      • FrameArrived timed out: timed out waiting on channel
    • Click requests fail immediately:
      • coordinate input geometry is unavailable
    • When using the original, unmodified helper, the first error is:
      • SetIsBorderRequired failed: The requested interface is not supported (0x80004002)

    Additional information

    Root cause analysis

    1. Mandatory dependency on a border interface available only on Windows 11

    The capture initialization path obtains IGraphicsCaptureSession3 solely to call put_IsBorderRequired(false) once. Windows 10 does not provide this interface, so QueryInterface fails with E_NOINTERFACE (0x80004002). The helper treats this as a fatal error, aborting an otherwise perfectly healthy capture session.

    Disassembly of the affected build: after the result of the optional interface call is tested, failure immediately takes the error branch (VA 0x14003E41E, file offset 0x3D81E). NOP-ing out only this branch changes the visible error from SetIsBorderRequired to FrameArrived timed out—confirming defect 1 and immediately exposing defect 2.

    2. Self-deadlock in the FrameArrived callback

    The FrameArrived delegate first starts SoftwareBitmap.CreateCopyFromSurfaceAsync, registers a completion callback, and then blocks synchronously while waiting for that asynchronous operation to complete. On Windows 10, the asynchronous surface copy cannot complete until the FrameArrived callback returns—the two wait on each other, and the consumer thread eventually times out with FrameArrived timed out: timed out waiting on channel. (This pattern happens to work on Windows 11, presumably explaining why it went unnoticed.)

    3. Click failures are a downstream consequence of capture failure

    Coordinate input depends on window bounds/geometry information published by the capture subsystem (corresponding error strings: window bounds unavailable for coordinate input and coordinate input geometry is unavailable). When capture fails, the bounds information is never published, causing all mouse operations to fail. This is a dependency issue, not an independent input defect.

    Evidence

    • The FrameArrived delegate vtable entry in this build: file offset 0x12C4B8 (VA 0x14012C4B8) stores callback address 0x140041F9B (bytes 9b 1f 04 40 01 00 00 00).
    • Related error strings: SetIsBorderRequired failed, StartCapture failed, FrameArrived timed out, window capture worker is not running, coordinate input geometry is unavailable, and SoftwareBitmap.CreateCopyFromSurfaceAsync failed.
    • Errors such as GraphicsCaptureItem.Size failed and Direct3D11CaptureFramePool.CreateFreeThreaded failed never appeared: obtaining the item size, creating the frame pool, CreateCaptureSession, SetIsCursorCaptureEnabled, StartCapture, and subscribing to FrameArrived all succeeded before the hang.

    Fix/workaround (verified locally, with hash validation)

    A community project maintains a Windows 10 compatibility profile for this helper:

    • Repository: chen0416ccc-cpu/codex-windows-fast-patch-skill
    • Script: scripts/patch-computer-use-helper-win10.ps1
    • Background documentation: references/win10-computer-use-screenshot-backend.md

    For the helper build in this report, it makes precise modifications to five regions (protected by whole-file SHA-256 validation both before and after patching):

    Region File offset Original bytes Patched bytes
    optional-border-interface 0x3D7AC 4889c64189d6eb4c e96f000000909090
    frame-arrived-busy-return 0x413D0 0f855b310000 0f853d310000
    frame-arrived-once-flag 0x413E1 740d eb0d
    mta-worker-wrapper 0x126700 169 × 00 (padding area) 169-byte wrapper (see below)
    frame-arrived-vtable 0x12C4B8 9b1f044001000000 (→ 0x140041F9B) 0073124001000000 (→ 0x140127300)

    Design of the injected wrapper: it replaces the entry point of the FrameArrived delegate—atomically sets the one-time flag in the delegate closure, calls AddRef on the delegate, calls CreateThread, and immediately returns. The worker thread executes RoInitialize(RO_INIT_MULTITHREADED) → runs the original callback body → RoUninitialize → releases the delegate. The other two guard fixes redirect the original callback's busy/reentry branches to the normal return path. Frame acquisition, bitmap conversion, and JPEG encoding logic are unchanged.

    Injected wrapper machine code (169 bytes, x64)
    4883ec3848894c24304c8b510831c0b201f0410fb052117536488b01ff500831c931d24c8d05490000004c8b4c2430488364242000488364242800ff15d7fc04004885c074104889c1ff1589fc040031c04883c438c3488b4c2430488b4108c6401100488b01ff5010b8054000804883c438c34883ec3848894c2428b901000000ff15a9fb0400488b4c2428e80aacf1ffff15a1fb0400488b4c2428488b01ff501031c04883c438c3
    

    After installation (the helper SHA-256 becomes 977D265B145232BA30B2916D8DED6D9B30037A084CF8A90EBBEDACEC91FCBEAC), verification on the same machine through the actual Computer Use channel (not a standalone screenshot tool) yielded:

    Test Result
    Cold-start window screenshot Notepad window, 590 ms, obtained an actual 1182×920 image (previously: timeout)
    Consecutive screenshots Chat client window, 82 ms / 60 ms, 1235×929 live content
    Left click Opened Notepad's "Format" menu (a subsequent screenshot showed the menu open)
    Right click Opened the chat client's group member menu (Send message / @ta / View profile / Report / Mute this person)
    Keyboard and accessibility Behavior unchanged; no regressions found

    Rollback is supported: the patch tool backs up the original helper to .codex\backups\computer-use-helper\...\codex-computer-use.exe.original and provides -Rollback.

    Suggested upstream fixes

    1. Perform feature detection for the border interface: if IGraphicsCaptureSession3 is unavailable, skip the call and continue capturing instead of failing the session.
    2. Do not block inside the frame callback: perform the surface copy/bitmap conversion outside the FrameArrived thread (or ensure that the callback has returned before any synchronous join), preventing deadlocks on Windows 10.
    3. Until this is fixed, consider explicitly restricting Computer Use to Windows 11 or documenting the known Windows 10 limitations—Win10 users currently receive a "partially usable" feature (accessibility/keyboard work, while screenshots and mouse operations fail entirely).

    Notes

    • This patch is a compatibility profile hardcoded to the helper's hash, not a generic binary patch. Once the helper/Codex is updated and the hash changes, it must be analyzed and adapted again; the community tool refuses to write anything for unknown hashes.
    • It modifies codex-computer-use.exe under %LOCALAPPDATA%; please assess the risks yourself and retain a backup.
    • I have no affiliation with the community repository mentioned above; it is cited here solely as the source of a verified fix.
  5. reopened this on Sep 18, 2026
  6. Fr33man233 commented on Oct 9, 2026

    @Fr33man233

    thanks,very useful suggest,helps me figure out my issue。
    非常感谢,你的这个解决方法比我codex自己工作了一上午还要有用,几分钟弄好了。

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-usewindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions