codex icon indicating copy to clipboard operation
codex copied to clipboard

Windows 10 Computer Use deadlocks awaiting SoftwareBitmap conversion inside FrameArrived

Open zbw202301-droid opened this issue 4 months ago • 69 comments

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

26.721.4979.0

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

On Windows 10 22H2 build 19045, Computer Use screenshot capture still times out after the unsupported IsBorderRequired call is skipped.

Windows.Graphics.Capture starts successfully and delivers a real FrameArrived event. TryGetNextFrame returns a valid Direct3D11CaptureFrame and IDirect3DSurface. The helper then synchronously waits for SoftwareBitmap.CreateCopyFromSurfaceAsync inside the CreateFreeThreaded FrameArrived callback.

The async operation accepts its completion handler with HRESULT 0x00000000, but the completion handler is never invoked while FrameArrived remains blocked. The outer request eventually reports:

FrameArrived timed out: timed out waiting on channel

This is downstream of the Windows 10 IsBorderRequired compatibility problem reported in #25178. Ignoring E_NOINTERFACE exposes this second independent failure.

What steps can reproduce the bug?

  1. Run Codex Desktop 26.721.4979.0 with Computer Use plugin 26.721.41059 on Windows 10 22H2 build 19045.
  2. Start Computer Use and request a screenshot of a normal window such as Notepad.
  3. Skip E_NOINTERFACE (0x80004002) from GraphicsCaptureSession.IsBorderRequired so initialization continues.
  4. CreateFreeThreaded, event registration, session creation, and StartCapture succeed.
  5. FrameArrived enters on a WGC worker thread.
  6. TryGetNextFrame succeeds and Surface is valid.
  7. CreateCopyFromSurfaceAsync returns an operation and put_Completed returns S_OK.
  8. The completion handler is never invoked while FrameArrived synchronously waits.
  9. The screenshot request times out waiting for its result channel.

A standalone WGC probe confirmed that both CreateFreeThreaded and Create + DispatcherQueue continuously produce valid frames on this machine. The stall reproduced only when CreateCopyFromSurfaceAsync(...).get() ran synchronously inside FrameArrived.

It reproduced with both a Rust/windows-rs-style agile COM delegate and a standard C++/WinRT delegate, excluding the delegate ABI as the cause.

What is the expected behavior?

FrameArrived should return without synchronously waiting for SoftwareBitmap conversion.

The helper should retain the frame or surface, return from the callback, and perform SoftwareBitmap conversion and JPEG encoding on a dedicated MTA worker before notifying the existing result channel.

The validated probe used this structure and conversion completed successfully in about 12.9 ms while WGC continued producing valid frames.

This does not require switching to DispatcherQueue or replacing Windows.Graphics.Capture.

Additional information

Environment:

  • Windows 10 22H2, build 19045
  • Codex Desktop: 26.721.4979.0
  • Computer Use plugin: 26.721.41059
  • @oai/sky: 0.5.2
  • Native helper: x64 Rust/MSVC codex-computer-use.exe
  • Rust Windows bindings: windows 0.61.3, windows-core 0.61.2
  • GPU: AMD Radeon RX 6650 XT

Dynamic evidence for this helper build:

FrameArrived handler Invoke:        RVA 0xC17FC
valid Surface path:                 RVA 0xC1993
CreateCopy async operation created: RVA 0xC1D69
async completion registration:      RVA 0xC1F19
put_Completed call:                 RVA 0xC1F59
put_Completed return:               RVA 0xC1F5C
async completion handler Invoke:    RVA 0x1268BC
conversion result path:             RVA 0xC2053
result/channel notification:        RVA 0xC4CC0

Observed: put_Completed returns S_OK, but the completion handler, conversion result path, and result-channel notification are never reached.

Validated worker result:

WGC callback thread:     11656
conversion worker:       20544
conversion completed:    true
conversion latency:      12.865 ms
FrameArrived count:      240
valid frame count:       240

Suggested fix:

  1. Call TryGetNextFrame in the callback.
  2. Move Direct3D11CaptureFrame to a bounded worker queue.
  3. Return from FrameArrived immediately.
  4. On a dedicated MTA worker, obtain Surface, await CreateCopyFromSurfaceAsync, encode JPEG, and notify the existing channel.
  5. Preserve the current one-result guard, timeout, cancellation, and late-result handling.

zbw202301-droid avatar Jul 26 '26 07:07 zbw202301-droid

Fresh reproduction on Windows 10 with the current production build (2026-09-27).

Environment

  • Windows 10 Pro 22H2 x64, build 19045.7725
  • Codex Desktop: 26.924.22138, build 11645, production channel (update check reports up to date)
  • Store package: OpenAI.Codex_26.924.2738.0_x64
  • Bundled Codex CLI: 0.158.0-alpha.2.1

Reproduction

  1. Open a normal Notepad window.
  2. list_windows and window activation succeed.
  3. Accessibility-only get_window_state({ include_screenshot: false }) succeeds.
  4. get_window_state({ include_screenshot: true }) fails consistently with:

FrameArrived timed out: timed out waiting on channel

The same failure occurs when targeting an Unreal Editor / ASA DevKit window, so it is not application-specific.

The desktop Appshot path also logged:

IGraphicsCaptureItemInterop.CreateForWindow failed: E_INVALIDARG (HRESULT 0x80070057, facility 7, code 87)

Checks performed

  • Codex Repair and a full app restart did not resolve the problem.
  • Both the capture helper and target applications run in the same interactive Windows session.
  • No graphics-capture or AppPrivacy policy override was found.
  • No relevant Microsoft Defender block event was found.
  • The native helpers have valid OpenAI Authenticode signatures.
  • Swift helper SHA-256: 204EC0A55DCFF48A35EB2548D80382B13F7428A5E62FA94E5BFCBE2226E8580D
  • Legacy helper SHA-256: 8010E5ED48DFD9C06B73B564E020ED1CCE5914071A46725C8702360E4C71DD9C

This appears to be the same Windows 10 FrameArrived compatibility failure described here, still present in the current production build. The additional CreateForWindow / E_INVALIDARG Appshot error may be a second capture-path issue.

A Windows 10 fallback (for example, feature-detecting unsupported WGC functionality and using PrintWindow/BitBlt after WGC failure or timeout) would make Computer Use usable without requiring Windows 11.

Merlin-Hamburg avatar Sep 27 '26 14:09 Merlin-Hamburg

Additional Windows 10 reproduction on 2026-09-28

Submitted with the affected user's authorization following a controlled diagnostic session.

Environment

  • Date: 2026-09-28
  • Windows 10 Home 22H2, build 19045.7725, x64
  • Codex desktop 26.924.22138, build 11645, production channel
  • Built-in update check: up_to_date
  • Store package observed in local logs: OpenAI.Codex_26.924.2738.0_x64
  • Computer Use plugin: 26.924.22138
  • Bundled @oai/sky: 0.7.4
  • GPU: NVIDIA GeForce GTX 1070; driver 32.0.15.8228
  • Physical monitor and local interactive Windows session
  • Native helper: valid OpenAI Authenticode signature; 1,551,152 bytes
  • Native helper SHA-256: 8010E5ED48DFD9C06B73B564E020ED1CCE5914071A46725C8702360E4C71DD9C

Controlled reproduction

Using the supported @oai/sky API through node_repl:

  1. Launch a new, blank Microsoft Paint window.
  2. Select the unique returned window and activate it.
  3. Request accessibility text only: succeeds.
  4. Request a screenshot: fails after 2,047 ms: FrameArrived timed out: timed out waiting on channel
  5. Read accessibility text again: succeeds.
  6. Close the blank Paint window through press_key with Alt+F4: the call returns and a subsequent window enumeration verifies closure.

Earlier in the same session, screenshot requests also failed for Windows Calculator and djay Pro. A full desktop-app restart was performed, and new creation times for the app and capture-helper processes were verified. The failure persisted. Relaunching the target app and trying fullscreen also did not resolve capture.

Separate accessibility click/cache observation

After obtaining a fresh Paint accessibility tree, clicking its observed View ribbon tab by element_index failed:

element 1804 is not available in cached app state for mspaint.exe

A new text observation returned a new index, 2844. Retrying once with that freshly observed index produced the same class of error. No guessed coordinates were used. We have not established whether this is related to the screenshot failure; please treat it as a separate observation.

Interpretation and request

The OS build, app version, and helper SHA-256 match the September 27 reproduction in this comment. The native callback has not been instrumented locally, so the exact deadlock remains an inference from that match.

Please provide an official Windows 10 fix and validate the complete screenshot/input workflow, including fresh accessibility index handling.

No runtime binary, screenshot backend, app permission, security setting, or graphics-driver configuration was modified. No personal paths, account identifiers, screenshots, documents, or raw session logs are attached.

mattiaswretman avatar Sep 28 '26 06:09 mattiaswretman

Additional reproduction on Windows 10 (2026-09-28)

Submitted at the affected user's request. This is a separate machine from the reproductions above.

  • Windows 10 Pro 22H2, build 19045.6332, x64
  • Codex desktop Store package: OpenAI.Codex 26.924.2738.0
  • Computer Use plugin: 26.924.22138
  • GPU: NVIDIA GeForce RTX 5070, driver 32.0.16.1047
  • Two physical displays: 2560×1440 at 165 Hz and 1920×1080 at 75 Hz

Reproduction using the supported @oai/sky Computer Use API:

  1. list_windows finds the Steam window and get_window succeeds.
  2. After activating the window and refreshing its binding, get_window_state({ include_screenshot: true, include_text: false }) fails with FrameArrived timed out: timed out waiting on channel.
  3. Refreshing the window list and binding once more fails with window capture timed out: timed out waiting on channel.
  4. Earlier, attempting to capture the second monitor with Dota 2 produced IGraphicsCaptureItemInterop.CreateForMonitor failed: 0x80004005.

The failure is not limited to Dota 2 or the second display. A full Codex restart did not change it. Windows DISM RestoreHealth completed successfully, SFC found no integrity violations, and both displays/GPU are detected normally. No graphics driver, capture helper, Windows security/privacy settings, or application configuration was changed.

Could the team confirm whether this is the known Windows 10 capture-helper incompatibility in the current production build, and advise an official fix or safe supported workaround? No personal paths, account identifiers, screenshots, documents, or raw logs are included.

Rybka1910 avatar Sep 28 '26 09:09 Rybka1910

Windows Computer Use screenshot timeout

Observed environment:

  • Windows 10 Pro 22H2, build 19045.6466
  • Codex 26.928.20755, build 12246, production channel
  • App update check: up_to_date
  • @oai/sky 0.7.5
  • Helper SHA-256: ABDD75DF576B3CBCC7ED170DE1B4F27A65C81E25768A9B0B46D682FB586FB483

Reproduction:

  1. Enumerate a normal open window with sky.list_windows().
  2. Activate it and refresh its window object with sky.get_window().
  3. Call sky.get_window_state({ window, include_screenshot: true, include_text: false }).
  4. Capture fails with either: FrameArrived timed out: timed out waiting on channel window capture timed out: timed out waiting on channel

CapCut and Snipping Tool failures were observed in this chat. The user reports Notepad also failed earlier. The latest recorded attempt targeted Snipping Tool at 2026-09-30 00:57:29 America/New_York.

Windows CaptureService is running with exit codes zero. The checked recent Windows System events did not contain a relevant capture/display failure. Today's app logs did not expose native capture callback, bitmap-conversion, or result-delivery traces.

Possible related report: https://github.com/openai/codex/issues/35446 This report describes a frame successfully arriving, followed by blocked SoftwareBitmap conversion inside the callback. Its older helper reproduction does not establish the cause in this installation.

Requested investigation: Trace session startup, FrameArrived callback entry, TryGetNextFrame, SoftwareBitmap conversion completion, and result-channel delivery in the current native helper. If the reported conversion deadlock is reproduced, move conversion and encoding off the FrameArrived callback thread.

Community workaround compatibility: The inspected patch script at https://github.com/chen0416ccc-cpu/codex-windows-fast-patch-skill/blob/main/scripts/patch-computer-use-helper-win10.ps1 did not contain this installed helper's SHA-256 among its profiles. No community patch or system change was applied.

tainhandang-stack avatar Sep 30 '26 05:09 tainhandang-stack

I’m experiencing the same screenshot timeout symptoms on Windows 10 Home 19045.2846.

Codex: 26.924.22138 (build 11645) Computer Use: 26.924.22138 @oai/sky: 0.7.4 GPUs: Intel Iris Xe + NVIDIA GTX 1650

Capturing Notepad and Construct 2 fails with:

  • FrameArrived timed out: timed out waiting on channel
  • window capture timed out: timed out waiting on channel

Maximizing Notepad and keeping it in the foreground did not help. Window enumeration works, and accessibility-only reading of Construct 2 succeeds. The specific deadlock described here has not been confirmed on my machine.

Feedback submitted through the app. Feedback ID: 01a0ed52-3b0f-78f3-bab3-e360a091e099

Please advise how to collect a supported detailed capture trace.

Chykist99 avatar Sep 30 '26 06:09 Chykist99

Another Windows 10 (build 19045) reproduction on the current Codex Desktop generation: window enumeration succeeded, but sky.get_window_state failed twice with FrameArrived timed out: timed out waiting on channel. The user accepted the Computer Use permission prompt and saw a brief orange capture border, but no image was returned. The Computer Use session was restarted between attempts. The user reports that Computer Use has been unusable for months and does not recall it ever working reliably on this machine. We did not inspect the native callback, so we cannot confirm the internal cause reported in this issue. Please provide an official fix or supported diagnostic path for Windows 10.

NaturalMatchaKing avatar Sep 30 '26 15:09 NaturalMatchaKing

您的邮件我已收到。感谢您的来件。

lafaha avatar Sep 30 '26 15:09 lafaha

I can still reproduce this issue on a recent Codex Desktop build.

Environment:

  • Windows 10 Pro 22H2
  • OS build: 19045.5371
  • Codex Desktop: 26.928.31416
  • Build: 12553

This is not application-specific. I can reproduce it in:

  • Windows Notepad
  • Adobe Photoshop 2020
  • Adobe Photoshop 2024
  • other desktop applications

Computer Use can:

  • enumerate windows
  • read accessibility/UI text
  • send some keyboard commands
  • sometimes interact with UI through accessibility APIs

But screenshot/window capture repeatedly fails with:

  • FrameArrived timed out
  • window capture timed out

Mouse input then fails with:

  • coordinate input geometry is unavailable

I have already tried:

  • restarting Codex Desktop
  • resetting the Computer Use session
  • resetting/reinstalling the workspace
  • restarting the target applications

The issue still reproduces consistently.

This appears to affect the general Windows 10 capture/geometry path rather than a specific application.

Could you please confirm whether this is still actively tracked and whether an official Windows 10 fix is planned?

I would prefer an official fix rather than using unofficial or third-party patched binaries.

langshenzy avatar Oct 01 '26 14:10 langshenzy

Windows 10 build 19042: screenshot recovery verified with an adapted MTA callback workaround

Sharing a reproduction and successful local workaround at the affected user's request. Validation completed on 2026-10-02 (Europe/Paris).

Environment and failure

  • Windows 10 Education x64, build 19042
  • Installed Codex Store package: 26.928.3736.0 (package version, not the app's About-dialog release number)
  • Computer Use plugin: 26.928.31416
  • Bundled @oai/sky: 0.7.5
  • GPU: AMD Radeon Pro 560X; driver 27.20.14540.15002
  • Native codex-computer-use.exe: 1,551,152 bytes
  • Original helper SHA-256: 0D00DFDAEE0C1F04D16095228E07FFD091AC1A95EDC6F6CA4B4A316B39B6441A

Through the documented node_repl + @oai/sky API, window enumeration and accessibility reading worked, but screenshots of Task Manager and RustDesk repeatedly failed with:

FrameArrived timed out: timed out waiting on channel
window capture timed out: timed out waiting on channel

Restarting Codex, rebooting Windows, reinstalling the Computer Use plugin, and resetting the JavaScript session did not restore screenshots. A normal OS screenshot worked. The native helper and Node runtime matched their installed application-package copies byte-for-byte; the data-directory junction was valid. These checks did not establish reinstalling or moving application data as the cause.

Workaround actually applied

We reviewed only the Windows 10 screenshot patch and unwind test from this community revision; we did not install its full skill bundle:

The script's existing 0.7.5/ABDD75DF profile does not recognize our complete original helper hash. We therefore did not run it unchanged or merely bypass its hash guard.

For this exact binary, we independently checked the PE layout, callback entry, original patch-region bytes, import targets, candidate disassembly, and x64 unwind metadata. 11 of the 13 guarded regions matched that community profile; the differences were the PE checksum and bytes at the start of the Authenticode certificate overlay. The overlay was verified to start after the original sections' raw data.

An exact-original-hash-guarded local candidate was then generated. The patch redirects the callback delegate to a new wrapper that retains the delegate, starts an MTA worker, and returns promptly. The worker initializes WinRT, invokes the original callback, and releases the retained reference. The patch also preserves the one-result guard and adds x64 runtime-function/unwind entries for its wrapper and worker.

Relevant addresses checked for this binary only:

Item RVA
Original callback 0x42489
New wrapper / worker 0x17e000 / 0x17e080
CreateThread import 0x177018
CloseHandle import 0x176fd8
RoInitialize / RoUninitialize imports 0x176f30 / 0x176f38

Before replacement, the original file was backed up. Installation verified the full original SHA-256 and all 13 original regions, used an atomic replacement after stopping only the matching helper processes, and verified the final SHA-256. Unknown binaries are rejected by the local installer and rollback tool.

Patched helper SHA-256: DEDFAD7A5926EE9401FAF9BE942A3723C115B131FC4A6DD98FE75645F443102D

Validation

  • Private-image unwind/call validation passed: 2,836 runtime-function entries, 47 instruction boundaries, plus success, thread-creation failure, busy-return, and worker call paths.
  • Local-copy installation/rollback and unknown-hash rejection tests passed.
  • Official @oai/sky returned a real Task Manager screenshot.
  • A coordinate click using the returned screenshot ID opened the Performance tab; a fresh screenshot visibly confirmed the result.
  • F5 keyboard refresh worked.
  • Three subsequent performance screenshots showed different CPU graphs and running times: 0:00:22:31, 0:00:22:35, 0:00:22:39.
  • RustDesk's connected remote-desktop window screenshot succeeded.
  • After a JavaScript kernel reset and fresh import of the official package, the RustDesk screenshot succeeded again.

Seven actual screenshots succeeded. No custom helper protocol client or replacement capture API was used for this acceptance test. Whole-app restart and Windows reboot persistence after patching have not been tested.

Interpretation and limitations

The before/after result supports the Windows 10 callback-thread compatibility problem discussed in this issue. We did not instrument the original callback dynamically, so the exact internal deadlock on this machine remains inferred rather than independently traced.

This is a local, unofficial binary workaround. Modification invalidates Authenticode signing, so the candidate clears the certificate directory. An application update/runtime regeneration may overwrite it. These addresses and hashes must not be applied to other builds without fresh validation.

Please consider an official source-level fix that returns promptly from FrameArrived and performs conversion/encoding on an MTA worker, with correct lifetime, cancellation, one-result, and exception handling.

No patched executable, screenshots, credentials, remote-host identifiers, personal paths, or raw session logs are attached.

routerpipe-byte avatar Oct 01 '26 22:10 routerpipe-byte

Additional same-machine, same-window comparison on Windows 10

Test date: 2026-10-02 (Asia/Singapore).

Environment

  • Windows 10 22H2 x64, build 19045.
  • Codex Desktop 26.928.31416, build 12553.
  • Bundled @oai/sky 0.7.5.
  • NVIDIA GeForce GTX 1660.
  • Local physical desktop session; the user is not operating through a remote session.

Controlled comparison We compiled a small, independent C# diagnostic using the installed .NET Framework compiler and Windows metadata. It created its own 400 x 260 test window with known cyan, orange and white regions. It verified that the target HWND belonged to the diagnostic process and did not capture other applications.

Independent Windows.Graphics.Capture result:

  1. GraphicsCaptureSession.IsSupported returned true.
  2. CreateForWindow succeeded.
  3. Hardware D3D11 device creation succeeded (HRESULT 0x00000000).
  4. CreateFreeThreaded and StartCapture succeeded.
  5. FrameArrived delivered a valid frame and Direct3D surface.
  6. The callback handed the frame to an independent MTA worker without waiting for conversion.
  7. SoftwareBitmap.CreateCopyFromSurfaceAsync completed on that worker in 16 ms, producing a 406 x 289 Bgra8 bitmap.
  8. Pixel validation found the expected colors: 70,699 cyan pixels, 21,000 orange pixels and 20,727 white pixels.
  9. The capture resources were disposed. The same visible window remained open for 60 seconds for the official-tool comparison.

Official Computer Use result on that same window:

  1. sky.list_windows returned exactly one matching diagnostic window.
  2. sky.get_window and sky.activate_window succeeded.
  3. Accessibility-only sky.get_window_state succeeded.
  4. sky.get_window_state({window, include_screenshot: true, include_text: false}) failed in approximately 2.1 seconds with: FrameArrived timed out: timed out waiting on channel

The official capture was attempted after the independent capture session had been disposed, so the two captures were not running concurrently. An attempted follow-up refresh encountered a user-input notice; the test window then closed on its timer. No second screenshot result is claimed.

Earlier official-tool tests also failed on a blank Windows Notepad window after updating and restarting Codex. We did not change any graphics driver, security/privacy setting, Codex runtime file or capture backend, and did not install any third-party patch.

Interpretation This confirms that independent WGC frame delivery, off-callback SoftwareBitmap conversion and real pixel content work on this machine while the official Computer Use capture path still fails. It supports investigating the current Codex capture implementation or its compatibility with Windows 10. It does not establish the precise internal deadlock in the current helper, and does not prove that the older issue's native-code diagnosis applies unchanged.

Request Please investigate the active capture path in build 12553 and provide an official Windows 10 fix or a supported workaround. Useful diagnostic stages would include frame arrival, surface acquisition, SoftwareBitmap conversion completion and result-channel delivery. Please validate screenshot-backed coordinate input as well as screenshot creation.

This report contains no account identifiers, personal file paths, screenshots, application documents, raw session logs or access tokens.

AI-Coding-Lyj avatar Oct 02 '26 09:10 AI-Coding-Lyj

I encountered the same FrameArrived timed out: timed out waiting on channel error on Windows 10 22H2 (build 19045.7725). App discovery and text input worked, but screenshot capture failed in both Notepad and another app, even after restarting Codex and the capture helper.

After upgrading to Windows 11 25H2 (build 26200.9457), Computer Use now works in my Notepad test: screenshots, coordinate clicks, and Korean/English text input all succeeded, with the result verified in a fresh screenshot.

For context, the Computer Use plugin also changed from 26.928.21956 to 26.930.21537 between tests, so I cannot isolate the Windows upgrade as the sole cause. Sharing this as a working-environment data point.

Taeknology avatar Oct 02 '26 15:10 Taeknology

Additional reproduction on the current Windows 10 build, and a concrete native-helper fix request (2026-10-02).

Affected build and reproduction

  • Windows 10 Pro 22H2, build 19045, in a KVM guest with the QXL display driver.
  • Codex Store package: 26.930.2377.0.
  • Computer Use plugin: 26.930.21537.
  • @oai/sky: 0.7.5.
  • Original codex-computer-use.exe SHA-256: A06701CA9C60F1925F3A12F5D5CD609B555F1EFF85096CD6FA046A270D16F85B.

Using the official sky API, window enumeration and accessibility-only state requests succeeded. Screenshot-inclusive requests against Notepad and Qt Creator failed in the FrameArrived path. The inability to obtain screenshots blocks the normal Computer Use workflow even though window discovery works.

What needs to change

Please fix the Windows.Graphics.Capture screenshot implementation in the native Computer Use helper:

  1. Remove the synchronous wait for SoftwareBitmap.CreateCopyFromSurfaceAsync from the FrameArrived callback. The callback must return promptly so the capture machinery can continue running.
  2. Acquire the frame with TryGetNextFrame, transfer ownership of the frame (or retain the required surface and its lifetime) to a bounded work queue, then return from the callback.
  3. On an initialized MTA worker, perform surface-to-SoftwareBitmap conversion and JPEG encoding, and deliver the result through the existing result channel.
  4. Preserve the one-result/in-flight guard. Handle timeout, cancellation, worker failures and late completions without duplicate delivery; release frames and COM references on every path. Bound pending work and dispose capture resources when the request ends.

This calls for a change to callback scheduling and conversion, rather than additional mouse/keyboard permissions. In the older instrumented reproduction in this issue, frame delivery succeeded but conversion completion did not arrive while the callback remained blocked. Our guest reproduces the matching failure; we did not dynamically trace its original conversion operation.

Evidence from a local before/after check

On this exact helper, the callback entry was verified at RVA 0x42489. A local test modification retained the callback delegate, invoked the original handler from a separate MTA worker, and allowed the capture callback to return without waiting for conversion.

After restarting the affected helper, official sky calls through Desktop's native Computer Use pipe returned repeated JPEG screenshots. A new Notepad editor accepted a click and Russian text input, confirmed in refreshed accessibility state. A further click opened Format, Escape closed it, and subsequent requests returned screenshots. Qt Creator capture also succeeded.

dan0102dan avatar Oct 02 '26 16:10 dan0102dan

Additional symptom-level reproduction on a newer build: Codex 26.930.21537 (build 12776) with @oai/sky 0.7.5, tested October 3, 2026 (Europe/Moscow).

On Windows 10.0.19045.0, screenshot requests for both UpNote and Sublime Text fail with the exact FrameArrived timed out: timed out waiting on channel error from this issue. Discovery and activation work, and Sublime Text's accessibility-only state succeeds.

Scope: We have not instrumented FrameArrived or SoftwareBitmap.CreateCopyFromSurfaceAsync, so this is not proof that the internal deadlock described here is unchanged in this build. We also did not encounter SetIsBorderRequired errors or bypass any checks.

Environment

  • Codex desktop app: 26.930.21537, build 12776, production channel.
  • The app's built-in update checker reports up_to_date.
  • Bundled Computer Use plugin: 26.930.21537.
  • Bundled @oai/sky: 0.7.5.
  • Native Windows 10, OS version 10.0.19045.0, using PowerShell 7.6.6.
  • Tested in a fresh native Windows desktop chat with an existing Windows working directory.
  • komorebi is running. Both test windows were on the current workspace during capture tests; activation succeeded. No comparison without komorebi has been performed.

Observed results

Test Result
Normal node_repl MCP execution Pass
Variable persistence across calls, top-level await, node:path import Pass
await import('@oai/sky') Pass; target is windows
sky.list_apps(), sky.list_windows(), sky.get_window() Pass
Activating UpNote and Sublime Text Pass
UpNote text-only state Returns an accessibility tree of empty regions; no note text
Sublime Text text-only state Returns an accessibility tree (1,116 characters) and a focused element
Screenshot capture of UpNote Fails
Screenshot capture of Sublime Text Fails

The exact capture errors were:

FrameArrived timed out: timed out waiting on channel
window capture timed out: timed out waiting on channel

Refreshing the returned window reference and retrying did not help. Resetting the normal node_repl kernel, reimporting Sky, and resolving UpNote again also did not help.

The active configuration uses existing native Windows executable/module paths. Desktop logs mark both node_repl and cua_repl as ready for the fresh chat and report the Computer Use native pipe as ready. Both bundled Windows helper processes are running.

Supported API reproduction

Run through the bundled node_repl MCP tool, with exactly one matching Sublime Text window open:

const { sky } = await import('@oai/sky');
const matches = (await sky.list_windows())
  .filter(w => /sublime/i.test(w.app + ' ' + w.title));

if (matches.length !== 1) throw new Error('Expected one Sublime Text window');

const window = await sky.get_window({
  id: matches[0].id,
  app: matches[0].app
});

await sky.activate_window({ window });

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

// Fails with a capture timeout:
await sky.get_window_state({
  window,
  include_screenshot: true,
  include_text: false
});

The calls were tested separately so the text-only result could be confirmed before requesting a screenshot. No custom MCP client, alternative capture implementation, runtime patch, or configuration change was used.

This fresh native chat also rules out the earlier MCP startup failure seen in a separate migrated WSL chat with a nonexistent converted working directory: that startup problem is absent here, while screenshot capture still fails.

The same reproduction has been added to #49383: https://github.com/openai/codex/issues/49383#issuecomment-5962174180

Is there a supported diagnostic flag or a released fix for this Windows 10 capture path? No personal paths, app document contents, screenshots, credentials, or raw logs are included.

zg-alexey avatar Oct 02 '26 22:10 zg-alexey

Additional Windows 10 evidence from a real, bounded two-arm WGC conversion probe on 2026-10-03. The standalone callback wait failure reproduced and the worker version succeeded; this is not a dynamically proven root cause in the installed native helper.

Environment:

  • Windows 10 Pro x64, build 19045.
  • Codex desktop package 26.930.3930.0; installed @oai/sky 0.7.5.
  • Signed legacy codex-computer-use.exe: 1,551,152 bytes, SHA-256 6EEAF314A15936E549E47532E8DC62A01920BD38D65E7797E1C812E62199A741.
  • Fresh visible non-elevated blank Paint on the active unlocked desktop. Both arms used the same target; HWND/PID ownership was rechecked immediately before CreateForWindow and remained stable.

The C++17 probe explicitly used Windows.Graphics.Capture, CreateForWindow, a hardware D3D11 BGRA device, CreateFreeThreaded, and SoftwareBitmap.CreateCopyFromSurfaceAsync. Both arms used the same conversion overload once, retained the frame/Surface through async completion, and had a separate six-second outer conversion wait plus a 25-second host bound.

Observation Wait inside FrameArrived Separate MTA worker
CreateForWindow / pool / session / StartCapture HRESULT All S_OK All S_OK
FrameArrived count; valid frame and Surface 19; yes 17; yes
Two-second conversion wait WAIT_TIMEOUT Succeeded
Completed-handler entry after invocation 2047.526 ms 18.151 ms
Completed-handler entry after recorded callback exit 33.278 ms 18.175 ms
GetResults; valid bitmap S_OK; yes, eventually S_OK; yes
Outer wait; cleanup Succeeded; complete Succeeded; complete

In the worker arm, conversion invocation began 24 microseconds after the recorded callback-exit marker on a distinct MTA thread. Both processes exited normally; no cancellation or watchdog termination was needed. One comparison ran, with two arms; 23 metadata/lifecycle checks passed, zero failed. Final build emitted zero warnings/errors.

Timing limitation: the completion timestamps measure entry into the Completed handler, not an independent observation of the underlying async state transition. The callback-exit marker is scope-exit bookkeeping. These results demonstrate an in-callback wait timeout followed by delayed completion notification; they do not distinguish delayed copying from delayed notification dispatch.

The prototype repair pattern is to retain the frame and Surface, return from FrameArrived, then initiate/observe conversion on a separate MTA worker while preserving capture resource lifetime until async completion and handler drain. No pixels were inspected, rendered, encoded or saved; the only image copy was the temporary RAM SoftwareBitmap conversion.

Installed capture still fails in the previously observed Codex path. Current-app logs show native-pipe startup readiness followed by an Appshot capture deadline. An older service_info timeout was from a different app start and is not treated as a proven causal chain. The Swift Appshot helper is also a distinct path, so this probe cannot attribute its timeout to the legacy helper.

No native patch was installed. The available community profile's full-file hash does not match this helper; 12/13 sampled guards match, but checksum-only normalization still does not recover its expected whole-file hash. That does not establish compatibility. Applying that binary patch would invalidate the helper's existing signature.

Could maintainers validate/instrument this exact helper build and ship a supported worker-conversion fix if applicable? The local probe source and metadata reports are retained for follow-up.

JOJOE1223 avatar Oct 03 '26 14:10 JOJOE1223

Could maintainers point to an official source repository and build instructions for the native Windows capture component bundled with @oai/sky 0.7.5? The goal is to inspect and fix the FrameArrived / SoftwareBitmap conversion path in the existing Computer Use component, rather than replace it with a separate automation stack.

If that component's source is not publicly available, could you provide an official supported fixed build, diagnostic build, or documented workaround for this Windows 10 issue? Please also clarify whether a source-access route exists for contributors who want to implement and validate a fix.

This is a request for source/build or official repair resources; no local logs, screenshots, personal paths, or session content are attached.

drlingyu-ui avatar Oct 06 '26 09:10 drlingyu-ui

Reproduced on 2026-10-07 with the current Codex Desktop production build.

Environment:

  • Windows 10 Pro 22H2, build 19045 (x64)
  • Codex Desktop 26.1002.52244, build 13536; built-in updater reports up_to_date
  • Bundled core codex-cli 0.162.0-alpha.2
  • Computer Use skill/plugin 26.1002.52244
  • Native capture helper SHA-256: 63C98C4DD5D707DF3240A04DA1FBF7FE47FF0622CF757EE886EEE96434D4E17A (Authenticode signature Valid)

Observed using the supported @oai/sky API:

  1. list_apps() succeeds and identifies the running DaVinci Resolve Studio 21.1.1.10 window.
  2. get_window_state({window, include_screenshot:false, include_text:true}) succeeds and returns the accessibility tree.
  3. get_window_state({window, include_screenshot:true, include_text:false}) fails with "FrameArrived timed out: timed out waiting on channel".
  4. Activating/reselecting the window also produced "window capture timed out: timed out waiting on channel".
  5. Resetting the JavaScript kernel, importing @oai/sky again, and rediscovering Resolve still reproduces the FrameArrived timeout.
  6. A full Windows shutdown/reboot did not resolve the failure.

Resolve's own scripting API works; the failure prevents visual evaluation of scopes and shot matching. No native-helper binary patch was applied.

A separate elevated-sandbox initialization blocker matching #51613 was isolated first: MAXIMUM_ALLOWED open returned Win32 error 32 on active runtime files while READ_CONTROL | WRITE_DAC succeeded. A reversible per-file data-write/append deny compatibility workaround restored ordinary sandbox command execution without disabling elevated sandbox or changing binary contents. Commands continue to work after the native helper starts, but the independent capture timeout remains.

Request: please provide a signed, Windows 10 compatible helper/update or a supported capture recovery path. The matching error suggests the issue described here may remain present in the current production helper; we have not traced this build's internal callback to prove the same deadlock.

couderkirk avatar Oct 07 '26 20:10 couderkirk

Thank you for the detailed reproduction. The separation between the sandbox initialization problem and the continuing FrameArrived screenshot timeout is especially helpful. My earlier checks also narrowed the failure to native capture, but did not establish the current helper's internal root cause.

Could a Codex maintainer advise whether there is a supported Windows 10 fix, diagnostic build, or recovery procedure for this capture timeout? If additional diagnostics from my machine would help, please specify which information to collect and how to share it safely.

Thanks, Kobus

On Wed, 07 Oct 2026 13:47:56 -0700, couderkirk @.***> wrote:

couderkirk left a comment (openai/codex#35446) Reproduced on 2026-10-07 with the current Codex Desktop production build. Environment: - Windows 10 Pro 22H2, build 19045 (x64) - Codex Desktop 26.1002.52244, build 13536; built-in updater reports up_to_date - Bundled core codex-cli 0.162.0-alpha.2 - Computer Use skill/plugin 26.1002.52244 - Native capture helper SHA-256: 63C98C4DD5D707DF3240A04DA1FBF7FE47FF0622CF757EE886EEE96434D4E17A (Authenticode signature Valid) Observed using the supported @oai/sky API:

  1. list_apps() succeeds and identifies the running DaVinci Resolve Studio 21.1.1.10 window. 2. get_window_state({window, include_screenshot:false, include_text:true}) succeeds and returns the accessibility tree. 3. get_window_state({window, include_screenshot:true, include_text:false}) fails with "FrameArrived timed out: timed out waiting on channel". 4. Activating/reselecting the window also produced "window capture timed out: timed out waiting on channel". 5. Resetting the JavaScript kernel, importing @oai/sky again, and rediscovering Resolve still reproduces the FrameArrived timeout. 6. A full Windows shutdown/reboot did not resolve the failure. Resolve's own scripting API works; the failure prevents visual evaluation of scopes and shot matching. No native-helper binary patch was applied. A separate elevated-sandbox initialization blocker matching #51613 was isolated first: MAXIMUM_ALLOWED open returned Win32 error 32 on active runtime files while READ_CONTROL | WRITE_DAC succeeded. A reversible per-file data-write/append deny compatibility workaround restored ordinary sandbox command execution without disabling elevated sandbox or changing binary contents. Commands continue to work after the native helper starts, but the independent capture timeout remains. Request: please provide a signed, Windows 10 compatible helper/update or a supported capture recovery path. The matching error suggests the issue described here may remain present in the current production helper; we have not traced this build's internal callback to prove the same deadlock. -- Reply to this email directly or view it on GitHub: https://github.com/openai/codex/issues/35446#issuecomment-6046553578 You are receiving this because you commented. Message ID: @.***>

JOJOE1223 avatar Oct 07 '26 21:10 JOJOE1223

Windows 10 screenshot timeout on Codex 26.1007.21434 / @oai/sky 0.7.6

Observed on 2026-10-10. Additional symptom-level reproduction related to https://github.com/openai/codex/issues/35446.

Environment

  • Windows 10 Pro 22H2 x64, build 19045.3803, physical local console session.
  • Codex desktop 26.1007.21434, build 13901, production channel. Built-in updater reports up_to_date.
  • Store package 26.1007.2314.0; Computer Use plugin 26.1007.21434; bundled @oai/sky 0.7.6.
  • NVIDIA GeForce RTX 4090, driver 32.0.15.8129; physical display 2560 x 1440.
  • Native helper has a valid OpenAI Authenticode signature.
  • Helper SHA-256: 58FFF5E2359AA09528F48EF37651B9013B204F99E2FD381F0D3D980CF9D2E88D.

Supported API reproduction

  1. Run Computer Use via the bundled node_repl and @oai/sky.
  2. Resolve the single returned Jianying Pro 11.5.0.14471 main window using list_windows and get_window.
  3. Text-only get_window_state succeeds and returns the window accessibility tree.
  4. Screenshot-enabled get_window_state fails with: FrameArrived timed out: timed out waiting on channel
  5. Refreshing the returned window and retrying has also returned: window capture timed out: timed out waiting on channel
  6. The user manually maximized and foregrounded Jianying; screenshot requests still failed. Earlier screenshot tests of a blank Notepad window also failed. A later text-only Notepad test correctly reported that the window had been minimized, so that later minimized-window result is not used as evidence of a capture failure.

Local checks and attempted repairs

  • CaptureService is running; helper and target app are in the same interactive session.
  • A read-only independent initialization probe returns CreateForMonitor=0x00000000 and creates a capture item. It does not start capture or read pixels.
  • An authorized Windows in-place repair changed build 19045.3570 to 19045.3803 and eliminated an earlier CreateForMonitor 0x80004005 failure; complete Computer Use screenshots still time out.
  • Post-install DISM ScanHealth completed successfully with no component-store corruption detected. SFC verify-only reported integrity conflicts; SFC scannow subsequently reported successful repair. Screenshot requests still timed out afterward.
  • Terminated the two exact stale helper processes from this diagnostic session, reset node_repl, and let the supported API start a fresh helper. The same screenshot failure reproduced.
  • Temporarily disabled GameViewer and ToDesk virtual display adapters while keeping the physical NVIDIA adapter enabled, then retested with a fresh helper. The same timeout reproduced. Both virtual adapters were restored and verified healthy afterward.
  • No relevant recent display-driver fault was found in the checked System event log. The checked helper module list contained no non-Windows module other than the helper itself.

Interpretation and request This matches the externally visible Windows 10 timeout symptoms, but FrameArrived and SoftwareBitmap conversion were not instrumented locally. This does not prove that the specific internal deadlock described in #35446 is the cause in this newer build.

Please provide a fix for this current signed helper, or a supported diagnostic trace that distinguishes frame arrival, bitmap conversion, encoding, and result delivery. No community binary patch was applied; the inspected patch profiles do not include this complete helper hash.

This draft contains software/hardware versions, a program file hash, error messages and summarized test results. It contains no screenshots, project contents, personal paths, account identifiers or raw session logs.

lasvegas159357-dot avatar Oct 10 '26 04:10 lasvegas159357-dot

Fresh current-build evidence, 10 October 2026: the standalone callback-context conversion stall reproduced, and an explicit-MTA-worker comparison succeeded. The installed helper remains unfixed; its actual reached stage was not dynamically instrumented.

Environment: Windows 10 Pro 22H2 build 19045.7725; Codex desktop 26.1007.21434 build 13901; @oai/sky 0.7.6; NVIDIA GTX 1070 Ti with driver 582.66. The updater reports current. The native helper has a valid OpenAI signature and SHA-256 58FFF5E2359AA09528F48EF37651B9013B204F99E2FD381F0D3D980CF9D2E88D.

An owned, static synthetic WinForms window was used by two fresh conversion-probe processes, followed by the supported Sky API against that same window lifetime. Both independent runs used hardware D3D11/BGRA, a free-threaded two-buffer frame pool, default SoftwareBitmap::CreateCopyFromSurfaceAsync(surface), one completion handler, and a finite five-second completion-event wait. Frames, surfaces and async operations were retained throughout conversion.

Test Result
Independent frame-only CreateForWindow Valid frame/surface; first frame after 13.189 ms
Independent frame-only CreateForMonitor Valid frame/surface; first frame after 11.744 ms
Conversion waited inside FrameArrived Async initially Started; event wait timed out after 5,010.358 ms; async still Started at the wait boundary
Late observation after callback scope-exit marker Completion handler entered 29.674 ms later; late bitmap retrieval succeeded
Conversion on separate explicit-MTA worker Completion handler entered 16.679 ms after conversion began; bitmap retrieval succeeded
Supported Sky screenshot on the conversion-test window afterward FrameArrived timeout after 2,096 ms; accessibility reads before/after succeeded

Both independent conversion processes settled and released their operations, drained work, closed frame/session/pool resources and exited without watchdog termination or stderr. The fixture closed on its own timer. No image pixels were inspected, displayed, encoded or persisted. The separate monitor test was frame-only and acquired a GPU surface internally without conversion.

No driver, RTSS, Windows setting or installed helper was changed. RTSSHooks64.dll was observed in both independent probe processes and is also present in the installed helper. This remains a context factor, not an established cause. Package/hash/signature checks found no damaged installed program files.

The callback used implicit MTA and the worker explicitly initialized MTA, so the comparison establishes context-sensitive behavior rather than isolating thread identity or a Windows internal lock as the unique cause. The finite wait differs from the installed helper's infinite wait. Callback scope-exit and completion-handler entry are timestamps, not direct observations of native return or the async state transition. Encoding and production monitor-cache behavior remain untested by the conversion comparison.

Read-only inspection of the exact current helper identifies conversion and an infinite event wait inside the FrameArrived handler. Combined with these fresh runtime results, this strengthens the proposal to retain the selected frame/surface, return promptly from FrameArrived, then perform conversion/encoding/result delivery on an owned MTA worker with coordinated cancellation and cleanup. It does not prove that this installed helper stalled at that instruction during its failed request.

A buildable standalone reference reproducer with callback/worker modes and metadata reports is available. This is a tested implementation approach, not an applicable patch against unavailable production source, and no unsigned replacement was installed.

Could maintainers provide a signed fixed helper, supported stage tracing, or matching native source/build access so this proposal can be integrated and verified against the production window/monitor/cache paths?

JOJOE1223 avatar Oct 10 '26 17:10 JOJOE1223

Additional supported-API reproduction on 2026-10-11; screenshots still fail on Windows 10 with the current production build.

Environment:

  • Windows 10 Pro 22H2, build 19045, x64, local interactive console session.
  • Installed Codex: 26.1007.21434, build 13901, production channel. Built-in update check returns up_to_date.
  • Store package: 26.1007.2314.0; Computer Use plugin: 26.1007.21434.
  • NVIDIA GeForce RTX 3060, driver 32.0.16.1714, one physical 2560×1440 display.
  • Targets: Photoshop 2020 21.0 and Adobe Bridge 2020 10.0.0.124; both explicitly approved by the user.

Supported @oai/sky reproduction via node_repl:

  1. list_apps / list_windows / get_window succeed; text-only get_window_state returns accessibility state.
  2. Photoshop screenshot fails with FrameArrived timed out: timed out waiting on channel.
  3. Reselecting/activating the window and testing Bridge produces window capture timed out: timed out waiting on channel.
  4. A supported JavaScript runtime reset cleans up this session's helper connection. Fresh initialization and rediscovery reproduce both screenshot errors.
  5. Some keyboard input works: Photoshop's Open As shortcut opens a dialog; Escape closes it, and subsequent accessibility reads confirm closure.
  6. Mouse input reports coordinate input geometry is unavailable. A current text-observed filename combo index also reports that the element is unavailable in cached app state; one refreshed-index retry reproduces that error. Earlier filename edit set_value reported that the element was not settable.

Read-only checks: input desktop is Default; helper and targets are in the same session at Medium integrity. Both target windows are visible, not minimized, not DWM-cloaked, with display affinity 0. CaptureService is running. Checked capture/privacy policy locations contain no override. GPU reports OK. No Windows Update or CBS reboot-required key was present.

This matches the externally visible symptoms in #35446, including a same-build report from 2026-10-10. The native callback was not instrumented, so the exact internal deadlock is unconfirmed on this machine. Please provide a signed compatible fix or a supported diagnostic/recovery path for this build, and validate both capture and fresh accessibility-index input.

No native binary patch, alternate screenshot backend, driver/security change, app reinstall, or OS upgrade was performed. No screenshots, personal paths, account/chat identifiers, user documents, or raw session logs are included. Submitted with the affected user's explicit authorization.

wangsunqi avatar Oct 11 '26 02:10 wangsunqi