Windows Computer Use reuses a stale node_repl exec context across JS calls
Summary
On Codex Desktop for Windows, the bundled Computer Use client works only while all @oai/sky calls remain inside the same node_repl/js execution.
After the first JS execution finishes, the next node_repl/js call reuses the same @oai/sky Windows helper transport but fails with:
Error: node_repl exec context not found
This prevents the documented safe observe-then-act workflow, which requires observing the window in one JS call and acting from a later JS call.
Environment
- Codex Desktop AppX:
26.730.7989.0(x64) - Bundled Computer Use plugin:
26.730.61309 - Bundled
@oai/sky:0.6.2 - Windows 11 Home x64, version/build
10.0.26200 - Native Windows agent using PowerShell
- Computer Use plugin installed and enabled
Deterministic reproduction
Start with a fresh Node REPL kernel.
First node_repl/js call:
if (!globalThis.sky) {
const { sky } = await import("@oai/sky");
globalThis.sky = sky;
}
globalThis.windows = await sky.list_windows();
globalThis.target = windows.find(
(window) => /\\explorer\.exe$/i.test(window.app || ""),
);
globalThis.firstState = await sky.get_window_state({
window: target,
include_screenshot: false,
include_text: true,
});
nodeRepl.write(JSON.stringify({
ok: true,
hasAccessibility: !!firstState.accessibility,
}));
Result:
{"ok":true,"hasAccessibility":true}
Second node_repl/js call, reusing the returned window exactly as instructed by the Computer Use skill:
try {
globalThis.secondState = await sky.get_window_state({
window: target,
include_screenshot: false,
include_text: true,
});
nodeRepl.write(JSON.stringify({ ok: true }));
} catch (error) {
nodeRepl.write(JSON.stringify({
ok: false,
message: error?.message,
stack: error?.stack,
}));
}
Result:
Error: node_repl exec context not found
The stack ends in:
@oai/sky/dist/project/cua/sky_js/src/targets/windows/internal/helper_transport.js:1:8940
Resetting the Node REPL kernel and repeating the same two calls produces the same result.
If list_windows() and get_window_state() are both performed inside the first JS execution, the state read succeeds. Moving the state read to the next JS execution makes it fail.
Local integrity checks
The following files have identical SHA-256 hashes between the installed AppX resources and the extracted local cua_node runtime:
node_repl.exe@oai/sky/package.jsonhelper_transport.js
This rules out a stale or corrupted extracted runtime.
The bundled implementation also keeps a shared WindowsHelperTransport in a module-level map, while node_repl.exe validates operations against the currently active per-execution context. The same-execution success and next-execution failure are consistent with a helper/native-pipe connection retaining a stale execution context.
Expected behavior
A window returned from one node_repl/js observation should remain usable in the next JS call, as required by the Computer Use skill's two-cell observe/action workflow.
The persistent @oai/sky client should refresh or rebind its native-pipe execution context for each node_repl/js invocation without losing the window/screenshot/action state required for safe follow-up input.
Actual behavior
The first JS execution can enumerate and inspect the target window. Every later Computer Use state or input call through the reused client fails before interaction with node_repl exec context not found.
Restarting Codex, resetting the Node REPL kernel, and verifying the installed runtime against the AppX copy do not resolve it.
21 Comments
Confirming this is still reproducible on Codex App 26.730.8199.0, bundled Computer Use plugin 26.730.61639, @oai/sky 0.6.2, and Windows 10.0.26200 x64. The first Computer Use call succeeds, while the second separate node_repl/js call fails with
node_repl exec context not found. Restarting Codex or resetting the JavaScript kernel only restores one successful call before the failure returns. I reproduced it across multiple Windows applications, so it does not appear app-specific.I’m experiencing the same issue on Windows. Computer Use used to work, but now it can detect open apps without being able to interact with any of them.
Error: node_repl exec context not found
Codex: 26.730.8199.0
Computer Use plugin: 26.730.61639
@oai/sky: 0.6.2
Resetting the Computer Use session did not help.
Tried this on three PCs on Dektop app and CLI, after the first calls, it doesn't survive screenshot and follow up calls. The problem as described is exact and precise.
Update from another Windows task on the same build family: trying to open NetEase Cloud Music through Computer Use failed before reliable desktop interaction with a
spawn EPERMerror. Retrying and resetting the Computer Use session did not recoversky.list_apps()orsky.list_windows(). This appears to be a separate earlier-stage failure in the Windows helper/runtime path, alongside the stale execution-context failure reported here. Environment: Codex Desktop 26.730.8199.0, Computer Use plugin 26.730.61639, @oai/sky 0.6.2, Windows x64.Result: succeeds and returns four real desktop windows.
Second independent node_repl/js call:
Result:
This remains reproducible after full app restarts and JS kernel resets. It was also reproduced under frontend Full access and in both projectless and explicit-project tasks, so project membership and sandbox mode are not the root cause.
Two narrow local experiments binding request callbacks to the current Node async context did not fix the behavior and were fully reverted. No local runtime modifications remain.
Additional update from the same Windows machine after the 26.803 desktop update (2026-08-07).
Environment
26.803.5235.0x6426.803.41515@oai/sky:0.6.2cua_node/f1bf3cd3a5929acd10.0.26100x64helper_transport.jsSHA256:6423BA834F18139D55CDAC2290C91CD9B24B568332B07CDDD2A7EDA043702B7Cnode_repl.exeSHA256:BE16C6AF53036D5EAB127C74C726C2513CC66D5584A9EBF4F87909A59338D965The desktop app and
node_repl.exechanged in 26.803, but@oai/sky 0.6.2and the helper transport hash are unchanged from the failing 26.730 setup.Fresh minimal reproduction
node_repl/jscall imports@oai/skyand runssky.list_windows(): succeeds and returns 12 real desktop windows.node_repl/jscall selects exactly one normal non-Codex desktop window returned by step 2 and calls read-onlysky.get_window_state(...).No click, typing, launch, or other side-effecting action was attempted.
Permissions, approvals, sandbox, and path cross-check
sandbox_mode=workspace-write,approval_policy=never, native Windows sandboxunelevated; the explicit project is trusted.node_repl.exeandcodex-computer-use.exehave valid OpenAI Authenticode signatures.CODEX_HOME,node_repl, and the CUA runtime are all onC:. Only project files are on another local drive;CODEX_HOMEis a normal directory, not a junction or symlink.This makes project membership, project drive, approval policy, filesystem ACLs, and sandbox level unlikely root causes. The evidence still points to the long-lived Windows helper transport retaining an exec context that becomes invalid when the first
node_repl/jscall ends.Could the maintainers confirm whether a fix is planned in
@oai/sky/ the Windows helper transport, and which desktop or plugin build will contain it? I can retest the two-call regression gate immediately when a new build is available.Me Too
Additional independent reproduction on Windows after a full Codex restart on 2026-08-07. This is blocking a real Computer Use workflow and still reproduces after local configuration issues were corrected.
Reproduction observed
list_windows()succeeds and finds the unique window.get_window_state()succeeds and returns a valid screenshot.node_repl exec context not founderror. Because the call does not return, the input result has to be treated asUNKNOWNand no retry is performed.This reproduces the exact cross-execution observe → act failure described in this issue.
Isolation already completed
codex.exe,node_repl.exe, Computer Use helper, and native pipe were created.nodeRepl.writesucceeds.nodeRepl.emitImagesucceeds.transport.close()workaround, or blind single-execution interaction was used.Impact
This makes the documented safe Computer Use pattern unusable on Windows for stateful GUI work: observe in one execution, stop, act in the next execution, then observe again. The failure occurs at the Computer Use /
@oai/skyexecution-context lifecycle boundary before reliable input confirmation, so destructive/editor workflows cannot safely continue.For this reproduction the final state is effectively:
A fix that refreshes/rebinds the Windows helper/native-pipe exec context for every
node_repl/jsexecution while preserving the target window state would unblock the workflow.Thanks — this is currently a complete blocker for Windows Computer Use automation, and a fix would be greatly appreciated.
Local prototype fix: successful end-to-end validation
I tested a prototype fix locally on Computer Use plugin
26.803.41515,@oai/sky 0.6.2, runtimecua_node/f1bf3cd3a5929acd.The failure appears to occur because the module-level Windows helper transport dispatches later responses under the async context in which the long-lived helper/stdout listener was originally created. Once that first
node_repl/jsexecution ends, approval or response handling re-enters a stale context.The working prototype does more than bind the shared callback:
AsyncResourceinside eachsendRequest();responseResource.runInAsyncScope(...);void;emitDestroy()exactly once on success, rejection, timeout, helper exit, and stdin-write failure.This preserves the context captured when the request was submitted. It does not disable the active-execution guard, substitute the newest execution ID, or bypass approval.
End-to-end result
After patching only the extracted per-user
helper_transport.jsand resetting the JavaScript kernel:@oai/skyand calledlist_apps().launch_app()for Gira HS+FS Experte 4.9. The request reached the approval UI, continued after approval, and returned the real launch result. It did not thrownode_repl exec context not found.Alt+Tabbrought the running Gira application to the foreground and another screenshot succeeded.Before this change, step 2 failed while handling the helper response/approval in the stale execution context. A reduced
AsyncLocalStorageharness also reproduces the failure and passes with the per-requestAsyncResourceimplementation.One separate limitation remains: Gira launches and is visible in desktop screenshots, but its legacy top-level window is not returned as a directly targetable Computer Use window. Explorer remained targetable, so it was used for the harmless input test. That looks separate from this issue because the cross-execution helper, approval, response, screenshot, and input pipeline now completes.
For integrity, the original helper SHA-256 was
6423BA834F18139D55CDAC2290C91CD9B24B568332B07CDDD2A7EDA043702B7C; the patched local file is1CB26AACE11DC292F5968F93385E27A35AD5F2840ECE91068C3FE2A40884ED27. The signed executable and AppX payload were not modified.I can provide the prototype diff and reduced regression harness if useful. An upstream source implementation should add regression coverage for cross-execution observation, approval, input, timeout, helper-exit, rejection, and user-decline paths.
Independent reproduction with additional repair/restart exclusion on the current Store build.
Environment
OpenAI.Codex 26.803.5235.026.803.415150.147.0Repair paths tested before reproduction
9PLM9XGG6VKSrecognized the existing package and reported no newer package available.codex plugin remove computer-use@openai-bundled, thencodex plugin add computer-use@openai-bundled.26.803.41515; all 6 cache files matched the bundled source snapshot byte-for-byte by SHA-256.OpenAI.Codex_26.803.5235.0_x64__2p2nqsd0c76g0Store package directory, then relaunched the registered app.Post-restart result
A plain Node REPL global persisted across separate executions in the control test. No file contents were changed.
This confirms the defect survives a supported plugin cache rebuild plus complete Store-package process replacement. It does not appear to be stale plugin registration, corrupt cached plugin files, or an incomplete desktop-app restart. The one-execution-only behavior remains deterministic on
26.803.5235.0/26.803.41515.Additional reproduction on Windows 11 ARM running in Parallels, after a full Codex Desktop restart on 2026-08-09.
Environment:
Reproduction:
Error: node_repl exec context not found
This remains reproducible after the full Codex restart and a JavaScript-kernel reset. The same action-bridge error was also observed with File Explorer, so it does not appear app-specific. The initial list_apps/current-path window mismatch was corrected by using the exact window returned from list_windows(), but the context error remained. No UAC/admin prompt appeared and no files were modified.
Impact: the documented safe observe -> act workflow is blocked before reliable desktop interaction.
Confirming this is still reproducible on the current Windows build, with additional approval-path isolation and an internal feedback upload.
Environment
A full Codex restart and uninstall/reinstall of the Computer Use plugin did not change the failure. The cached and AppX-bundled CUA runtimes were also byte-identical.
I independently traced the approval-specific path:
A reduced regression test using the real WindowsHelperTransport plus a fake helper fails before a local workaround: the first approved request succeeds, but the second same-app request rejects because another elicitation cannot be created from the stale context. A transport-local workaround that remembers the approved app only after the user accepts and the approved retry succeeds makes that same-app test pass.
Real validation also succeeds across separate executions after the workaround: activate Edge in one execution, then send Ctrl+L in a later execution without the context error.
This workaround is intentionally narrower than an upstream fix and does not address all cross-app, rejection, timeout, or helper-exit paths. The per-request AsyncResource approach described above appears to be the correct general fix. Please correlate this report with the internal Feedback ID above; the local runtime workaround will otherwise be overwritten by the next app/plugin upgrade.
Independent reproduction on Windows confirming this is not Calculator-specific.
Observed behavior
sky.list_apps().``
text
``Error: node_repl exec context not found
sky.launch_app({ app: "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" })sky.launch_app({ app: "C:\\Windows\\System32\\calc.exe" })get_window()can return the exact window, butactivate_window()andget_window_state()fail before any UI interaction.Environment and recovery attempts
26.803.41515The failure remained unchanged after all of the above.
The installed skill also requires
sky.documentation("guidance"), but the loadedskyobject has nodocumentationmethod (sky.documentation is not a function), which may indicate skill/runtime version skew.OpenAI Feedback ID:
019fea9b-4c51-7940-be6e-39371f00872dNo personal paths, credentials, or application contents are included in this report.
Correction — current cross-device result (2026-08-10):
The earlier version of this comment incorrectly treated prior successful use on the second Windows PC (“Gigabyte”) as evidence that Computer Use was still working there.
A fresh test on that PC now also fails: the Computer Use graphical environment does not open at all. Therefore:
node_repl exec context not found.The exact app/plugin/Windows versions and any error output from the Gigabyte PC have not yet been captured, so I am not claiming that both symptoms have the same root cause.
Apologies for the earlier overstatement; this comment has been corrected to reflect the current verified result.
Correction to my earlier cross-device comparison: a fresh test on the second Windows PC (“Gigabyte”) now fails as well—the Computer Use graphical environment does not open, so there is no currently confirmed working comparison machine. I have edited my earlier comment to remove the unsupported host-specific conclusion. The two PCs may still be failing at different stages, and the Gigabyte versions/error details have not yet been captured, so I am not claiming a shared root cause yet.
Successful local validation of the per-request
AsyncResourceapproach on Windows 11 ARM under Parallels.Environment:
26.803.5235.0ARM6426.803.41515@oai/sky:0.6.2cua_node/0daac45fe5a0ff40helper_transport.jsSHA-256:6423BA834F18139D55CDAC2290C91CD9B24B568332B07CDDD2A7EDA043702B7CBaseline was deterministic after a fresh JS kernel:
list_windows()andget_window()succeeded.get_window_state()failed immediately withnode_repl exec context not found.I patched only the extracted per-user
@oai/skyJavaScript helper to:AsyncResourceper request;runInAsyncScope(...);emitDestroy()once on success, rejection, timeout, helper exit, and stdin-write failure.The active-execution guard and approval flow were not bypassed. Signed executables and the AppX payload were untouched. Patched helper SHA-256:
49AD10E22F755CC4103CB4E9DA50C3F8EE4CF0D304CCD681C041B5066A4823A6.Post-patch regression:
README.md, opened its F5 copy dialog, entered a dedicated destination, and completed the copy.0BF9B7586D7688D2EF43B49B1D56EFDF080E1C1C48294BC738AC687C7048BDD6.A separate screenshot/WGC attempt returned
FrameArrived timed out: timed out waiting on channel, while accessibility-based state and input continued to work. That appears independent of the stale exec-context defect.This is still a local extracted-runtime patch and may be overwritten by an app/runtime update, but it confirms the per-request
AsyncResourcedesign fixes the real cross-execution Computer Use flow on ARM64 as well.Update after installing the newer Windows Store build: the stale cross-execution context defect appears fixed on this machine.
Environment
26200.8973OpenAI.Codex 26.803.8161.0(Status: Ok)26.803.61601@oai/sky:0.6.60.147.0helper_transport.jsSHA-256:7BC54C5BB7F49661FB1F501C6832F5490620501464D3F1593A361A85C7F66B39For comparison, my earlier deterministic reproduction was on Desktop
26.803.5235.0, Computer Use26.803.41515, and@oai/sky 0.6.2.Cross-execution regression result
I reused the existing
@oai/skysession without resetting the JavaScript kernel. The session and ordinary variables survived an actual user reply, which covers the post-user-turn reacquisition case that previously remained unverified.I then ran dozens of independent
node_repl/jsexecutions, including a dedicated 12-call repeatedget_window_state()stress sequence. The separate calls successfully completed:list_apps()/list_windows()get_window()rebindingactivate_window()press_key()andtype_text()launch_app(), rediscover, recapture, and close againThere were zero occurrences of:
This includes the exact previously failing pattern: observe in one execution, act in later executions, and refresh/verify in still later executions. The Store update changed the helper hash from the earlier baseline, although the new minified helper does not contain the prototype
AsyncResourcemarker strings, so I am not inferring the exact upstream implementation.Separate remaining defects/limitations
These did not reproduce the stale-context error and appear independent of this issue:
sky.documentation("guidance"),("api"), and("confirmations"), but live@oai/sky 0.6.6still has nodocumentationmember.set_value()failed twice on a standard WinForms text box with:``
text
``read UIA value read-only state: Requested property was not in the CacheRequest (0x80070057)
Element click +
Ctrl+A+type_text()worked, and an independent harness state file verified the exact typed value.get_window_state()returned accessibility index2315for a visible list item, but using that index in the next execution failed with:``
text
``element 2315 is not available in cached app state for ComputerUseHarness.exe
Using a high returned index within the same execution worked, and a coordinate click from the prior screenshot also worked across executions.
Conclusion
On
26.803.8161.0/@oai/sky 0.6.6, the original stalenode_replexecution-context defect is no longer reproducible in same-turn, multi-call, app lifecycle, or post-user-reply testing. This is strong evidence that the fix for #37013 shipped in this update. The remaining items above look suitable for separate follow-up issues rather than reasons to keep classifying the original transport bug as present.Upgrading to the windows version posted today fixed this issue for me.
Following up on my two earlier reports in this thread — both the stale exec-context failure and the
spawn EPERMobservation are gone on the current build.Environment
@oai/sky: 0.6.6cua_node/23828fd353da361d, freshly extracted by the updatehelper_transport.jschanged| build | size | SHA-256 |
|---|---|---|
| 0.6.2 | 9305 |
6423BA834F18139D55CDAC2290C91CD9B24B568332B07CDDD2A7EDA043702B7C|| 0.6.6 | 9182 |
7BC54C5BB7F49661FB1F501C6832F5490620501464D3F1593A361A85C7F66B39|The extracted runtime matches the AppX copy byte for byte, so this is a stock install with no local modifications.
Regression gate passes
Fresh JS kernel, three strictly independent
node_repl/jscalls:list_windows()-> pick a normal desktop window ->activate_window->get_window-> store onglobalThis. Result:{"found":true}get_window_state(..., include_screenshot: true)on the window from call 1. Result:["window","screenshots","accessibility"]sky.click()referencing thescreenshotIdproduced in call 2. Result:{"clicked":true,"screenshotId":"screenshot-0","x":347,"y":449}No
node_repl exec context not foundat any point.The
spawn EPERMI reported on Aug 6 is also gone. A cold start of the same application now returns{"launched":true}, and a separate independent call afterwards returns{"appCount":40,"windowCount":6}—list_apps()andlist_windows()both work, which they did not after the failure I originally described.One detail worth highlighting for anyone verifying this themselves
The screenshot id created in call 2 is still valid in call 3. A fix that merely tears down and respawns the helper per execution would pass the original two-call gate but fail here, because the screenshot registry lives in the helper process. This build preserves it, so the documented observe-then-act workflow works end to end.
Update and guarded recovery reference: I published an audit-first, exact-fingerprint kit here:
https://github.com/fyliuuuuuu-dev/codex-windows-computer-use-recovery
Use the security-hardened release: https://github.com/fyliuuuuuu-dev/codex-windows-computer-use-recovery/releases/tag/v1.0.1 (
v1.0.0is superseded).Current local result on 2026-08-11: stock AppX
26.803.8161.0, Computer Use26.803.61601,@oai/sky0.6.6, helper SHA-2567BC54C5BB7F49661FB1F501C6832F5490620501464D3F1593A361A85C7F66B39passed separate window/state calls, a cross-executionscreenshotIdclick, post-action refresh, and five further independent state reads with zeronode_repl exec context not founderrors.Important boundary: the repository treats
0.6.6as an upstream-fix candidate and does not patch it. The legacy workaround is available only for the exact live-runtime@oai/sky@0.6.2helper/package fingerprint, after full quit, dry run, signed-runtime verification, and backup; unknown builds and untrusted paths are refused. It includes no complete bundled OpenAI helper file or binary.@netman2048 @jiangyuShiro, you recently reported the same symptom or update result in this thread. Sharing this only as a diagnostic and rollback reference. On current
0.6.6builds, please use the inspector/regression gate and do not apply the legacy patch.This issue is still open, so the repository describes community evidence rather than maintainer-confirmed guidance. The missing
sky.documentation()API on0.6.6is recorded as a separate defect.Follow-up to my earlier report in https://github.com/openai/codex/issues/37013#issuecomment-5237481370: the issue is now resolved on this Beelink after installing the current Microsoft Store update.
Working environment
OpenAI.Codex 26.803.10989.026.803.81509Verification
Computer Use successfully completed the previously failing observe-then-act workflow across separate
node_repl/jsexecutions:C, then entered7 × 8 =.56.There were no occurrences of
node_repl exec context not found.Calculator was only the simple test target: the original failure prevented interaction with Windows applications generally. Uninstalling/reinstalling the Computer Use plugin and restarting the desktop app had not fixed the earlier build; updating the desktop app through Microsoft Store did.
OpenAI Feedback ID:
019fea9b-4c51-7940-be6e-39371f00872d