Repository navigation
Description
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?
- 在 Windows 10 build
19045上打开 Codex 桌面版,用 Computer Use 针对任意应用窗口操作(本例用记事本和一个聊天客户端复现)。 - 发起一次包含截图的观测,例如
get_window_state({ window, include_screenshot: true })。 - 尝试任意一次点击,例如
click({ window, element_index })。
What is the expected behavior?
- 截图返回该窗口的画面。
- 点击(左键/右键)落在指定的元素/坐标上。
- ## 实际结果
- 截图请求约在 2–5 秒后失败:
window capture timed out: timed out waiting on channelFrameArrived 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(VA0x14012C4B8)中存放回调地址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。
建议的上游修复
- 对边框接口做特性探测:
IGraphicsCaptureSession3不存在时跳过该调用并继续捕获,而不是让会话失败。 - 不要在帧回调里阻塞:把表面拷贝/位图转换放到
FrameArrived线程之外执行(或确保任何同步 join 之前回调已经返回),使 Windows 10 上不可能死锁。 - 在修复之前,建议明确把 Computer Use 限制在 Windows 11,或文档化 Windows 10 的已知限制——目前 Win10 用户拿到的是一个"半可用"功能(无障碍/键盘正常,截图与鼠标全挂)。
注意事项
- 该补丁是按 helper 哈希写死的兼容档案,不是通用二进制补丁。helper/Codex 一经更新,哈希改变,必须重新分析适配;社区工具对未知哈希会直接拒绝写入。
- 它修改的是
%LOCALAPPDATA%下的codex-computer-use.exe,请自行评估风险并保留备份。 - 本人与上述社区仓库无任何隶属关系,此处仅作为已验证修复方案的出处引用。
Activity
[-][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[/+]github-actions commentedon Sep 18, 2026
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__2p2nqsd0c76g0What subscription do you have?
FREE
What platform is your computer?
Windows 10 Pro 22H2, build
19045What 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 (
SetIsBorderRequiredE_NOINTERFACE,FrameArriveddeadlock)**[Windows 10] Computer Use screenshots always time out and all mouse clicks fail (two Win10 compatibility defects in codex-computer-use.exe)
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, andactivate_window.The root cause is two independent Windows 10 compatibility defects in the native helper
codex-computer-use.exe(distributed with the@oai/skyruntime, located in thecua_noderuntime directory under%LOCALAPPDATA%):What steps can reproduce the bug?
19045and use Computer Use to operate on any application window (reproduced here with Notepad and a chat client).get_window_state({ window, include_screenshot: true }).click({ window, element_index }).What is the expected behavior?
- ## Actual results
window capture timed out: timed out waiting on channelFrameArrived timed out: timed out waiting on channelcoordinate input geometry is unavailableSetIsBorderRequired 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
IGraphicsCaptureSession3solely to callput_IsBorderRequired(false)once. Windows 10 does not provide this interface, soQueryInterfacefails withE_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 offset0x3D81E). NOP-ing out only this branch changes the visible error fromSetIsBorderRequiredtoFrameArrived timed out—confirming defect 1 and immediately exposing defect 2.2. Self-deadlock in the FrameArrived callback
The
FrameArriveddelegate first startsSoftwareBitmap.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 theFrameArrivedcallback returns—the two wait on each other, and the consumer thread eventually times out withFrameArrived 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 inputandcoordinate 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
FrameArriveddelegate vtable entry in this build: file offset0x12C4B8(VA0x14012C4B8) stores callback address0x140041F9B(bytes9b 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, andSoftwareBitmap.CreateCopyFromSurfaceAsync failed.GraphicsCaptureItem.Size failedandDirect3D11CaptureFramePool.CreateFreeThreaded failednever appeared: obtaining the item size, creating the frame pool,CreateCaptureSession,SetIsCursorCaptureEnabled,StartCapture, and subscribing toFrameArrivedall succeeded before the hang.Fix/workaround (verified locally, with hash validation)
A community project maintains a Windows 10 compatibility profile for this helper:
chen0416ccc-cpu/codex-windows-fast-patch-skillscripts/patch-computer-use-helper-win10.ps1references/win10-computer-use-screenshot-backend.mdFor 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):
0x3D7AC4889c64189d6eb4ce96f0000009090900x413D00f855b3100000f853d3100000x413E1740deb0d0x12670000(padding area)0x12C4B89b1f044001000000(→0x140041F9B)0073124001000000(→0x140127300)Design of the injected wrapper: it replaces the entry point of the
FrameArriveddelegate—atomically sets the one-time flag in the delegate closure, callsAddRefon the delegate, callsCreateThread, and immediately returns. The worker thread executesRoInitialize(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)
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:590 ms, obtained an actual 1182×920 image (previously: timeout)82 ms/60 ms, 1235×929 live contentRollback is supported: the patch tool backs up the original helper to
.codex\backups\computer-use-helper\...\codex-computer-use.exe.originaland provides-Rollback.Suggested upstream fixes
IGraphicsCaptureSession3is unavailable, skip the call and continue capturing instead of failing the session.FrameArrivedthread (or ensure that the callback has returned before any synchronous join), preventing deadlocks on Windows 10.Notes
codex-computer-use.exeunder%LOCALAPPDATA%; please assess the risks yourself and retain a backup.Fr33man233 commentedon Oct 9, 2026
thanks,very useful suggest,helps me figure out my issue。
非常感谢,你的这个解决方法比我codex自己工作了一上午还要有用,几分钟弄好了。