Repository navigation
Windows sandbox provisioning fails with os error 32 when any runtime file is in use (0.162.0-alpha.2 regression) #51634
Description
Windows sandbox provisioning fails with os error 32 when any runtime file is in use (regression in the 0.162.0-alpha.2 helper)
Summary
On Windows, codex-windows-sandbox-setup.exe aborts provisioning with
helper_unknown_error: setup refresh had errors whenever any file in the
cua_node runtime tree is currently open by a running process. The desktop app
keeps codex-computer-use-swift.exe and the node MCP hosts running from that
same tree, so from the moment the app is up every sandboxed command is rejected.
The step that fails (runtime read/execute validation) does not exist in older
helpers; it appears together with the helper shipped in build
0.162.0-alpha.2.
Environment
- Codex desktop app:
OpenAI.Codex26.1002.6548.0 (MSIX), Windows x86_64, zh-CN - CLI / sandbox helper:
0.162.0-alpha.2, binary dir979a96ce184041d1 - Config:
[windows] sandbox = "elevated" - Sandbox accounts:
CodexSandboxOffline,CodexSandboxOnline(groupCodexSandboxUsers)
Symptom
codex doctor --summaryreports:
✗ sandbox elevated Windows sandbox provisioning recorded a structured failure- Any sandboxed command fails with:
windows sandbox failed: helper_unknown_error: setup refresh had errors %USERPROFILE%\.codex\.sandbox\setup_error.jsoncontains:
{"code": "helper_unknown_error", "message": "setup refresh had errors"}
Root cause / evidence
From %USERPROFILE%\.codex\.sandbox\sandbox.<date>.log:
START: cmd /c echo SANDBOX_OK
setup refresh: spawning ...\codex-windows-sandbox-setup.exe (cwd=..., payload_len=5160)
failed to grant non-inheriting read-attributes ACE on user profile C:\Users\<user>:
open ACL target for root-only update: <another process is using this file> (os error 32); continuing setup
runtime read/execute validation failed: validate runtime read/execute access on
C:\Users\<user>\AppData\Local\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node_repl.exe:
open ACL target for root-only update: <another process is using this file> (os error 32)
setup refresh completed with errors: [...]
setup error: setup refresh had errors
os error 32=ERROR_SHARING_VIOLATION.- Ending every
node_repl.exeprocess does not help: the failure simply moves to
the next in-use file, e.g.
...\runtimes\cua_node\<hash>\bin\node_modules\@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll. - The app immediately respawns the holder:
codex-computer-use-swift.exewas
recreated within ~0.4 s of being stopped, and the refresh failed again on the
same DLL. So a quiescent runtime tree cannot be reached while the app runs. - Pre-granting permissions does not help. Explicit
(RX)ACEs for
CodexSandboxUsers,CodexSandboxOfflineandCodexSandboxOnlinewere applied
recursively to the whole runtime tree (2702 files,icacls ... /T), and the
failure was byte-for-byte identical. Helper-managed files
(e.g.%USERPROFILE%\.codex\.sandbox-bin\codex.exe) also carry only
inherited ACEs, so the validation is not about the resulting ACE shape - it is
about being able to open the target at all.
Regression evidence
Occurrences of runtime read/execute in the sandbox logs on the same machine
with the same configuration:
| Date | Helper build in use | runtime read/execute occurrences |
|---|---|---|
| 2026-09-29 | faa963e871dd422c |
0 |
| 2026-09-30 | c6fe824d725f02d7 / ca9abb0b4d8ac692 |
0 |
| 2026-10-02 | c6fe824d725f02d7 |
0 |
| 2026-10-05 | be3fd7e5c1969ff6 |
0 |
| 2026-10-07 | 979a96ce184041d1 (new) |
156 |
The step appears only with the new helper. On 2026-10-07 the new runtime
directory was materialized at 14:56:08 and the first failure occurred at
14:57:44, i.e. 96 seconds later. Before that the sandbox had worked continuously
for a week.
Suggested fix
- Tolerate
ERROR_SHARING_VIOLATION(os error 32) for the runtime ACL step the
same way the profile-ACE step already does (it logscontinuing setupinstead
of failing). Skip in-use files rather than failing the whole provisioning. - Or validate runtime access read-only (
AccessCheck, or compare the effective
ACEs) instead of opening the target for an ACL update. - Or defer the runtime validation until no process is running from the runtime
tree, and cache the result so it is not re-attempted on every command.
Impact
The Windows sandbox is unusable whenever the desktop app is running, which is
always during normal use. Running commands escalated/unsandboxed is the only
workaround, and that can itself be refused by a granular approval policy
(you cannot ask for escalated permissions if the approval policy is Granular(...)).
Additional impact: Computer Use / Browser automation is blocked as well
The same provisioning failure also prevents the node_repl kernel from
starting, which takes down the whole automation stack built on it (Browser
plugin, Computer Use, unified-computer-use). A cua_repl call fails with:
node_repl kernel exited unexpectedly
node_repl diagnostics: {"kernel_pid":...,"kernel_status":"exited(code=1)",
"kernel_stderr_tail":"windows sandbox failed: helper_unknown_error: setup refresh had errors",
"reason":"stdout_eof","stream_error":null}
So the regression is not limited to shell command execution: it also disables
browser and desktop automation features, because their runtime kernel is
launched through the same sandbox provisioning path.
Activity
github-actions commentedon Oct 7, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
smmisha commentedon Oct 7, 2026
Additional reproduction with a root-cause check against the source (Windows 11 Pro 10.0.26300, MSIX
26.1002.7124.0, bundledcodex-cli 0.162.0-alpha.2,[windows] sandbox = "elevated").Access-mask comparison
I opened the files with
CreateFileW, usingFILE_FLAG_BACKUP_SEMANTICSand share modeREAD|WRITE|DELETE. Each handle was opened and closed with no changes. Targets:cua_node\<hash>\bin\node_repl.exenode_repl.exe%USERPROFILE%MAXIMUM_ALLOWEDREAD_CONTROL | WRITE_DACREAD_CONTROL | WRITE_DAC | WRITE_OWNERFILE_WRITE_DATADELETEFor the owner,
MAXIMUM_ALLOWEDexpands to include write and delete access:FILE_WRITE_DATAconflicts with the mapped image section of a running EXE or DLL.DELETEconflicts with any open handle on the profile directory that lacksFILE_SHARE_DELETE.Opening with only
READ_CONTROL | WRITE_DACis enough forGetSecurityInfo/SetSecurityInfo, and no sharing violation occurs.Code path
setup_runtime_bin.rs::ensure_runtime_tree_readablewalks every file underruntimes\and callsgrant_read_execute_aces(path, .., 0)for each one.inheritance == 0,acl.rs::ensure_allow_mask_aces_with_inheritance_implopens the target with.access_mode(MAXIMUM_ALLOWED)unconditionally. This happens beforedacl_allow_mask_needs_refreshruns.As a result, the refresh fails even when nothing needs to change. In my case
CodexSandboxUsersalready had inherited(RX)onnode_repl.exe. The refresh runs before every sandboxed command, and the app keeps the runtime processes alive, so every command fails.acl.rsandsetup_runtime_bin.rsonmainare still identical torust-v0.162.0-alpha.2.Confirmation: with the app fully exited (no runtime processes running),
codex sandbox -- cmd /c echo okin elevated mode succeeds, and the refresh logserrors=[].Suggested fix: open with
READ_CONTROL | WRITE_DACinstead ofMAXIMUM_ALLOWED. Alternatively, read the DACL and checkneeds_refreshbefore requesting a write handle.Workaround verified here
Setting
[windows] sandbox = "unelevated"and fully restarting the app works. With the runtime processes running, all of these succeed without escalation:node_replevaluationexample.comcua.getState()sfdevlin43 commentedon Oct 7, 2026
Reproduced on another Windows installation:
up_to_date.cua.getState()attempt exits withnode_repl kernel exited unexpectedly; stderr reportswindows sandbox failed: helper_unknown_error: setup refresh had errors.Get-Locationalso fails before starting with the same setup-refresh error. The same read-only command succeeds through an approved elevated execution path, isolating the failure to sandbox startup.runtime read/execute validation failedon%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node_repl.exe:open ACL target for root-only update: The process cannot access the file because it is being used by another process. (os error 32). It then recordssetup refresh completed with errors. An October 5 log on this machine recorded successful refreshes witherrors=[].node_repl.exeinstances from that runtime path.Please advise a supported fix that restores sandboxed execution and Browser/Computer Use while preserving local files, conversations, and sandbox protections.
rbrazier69 commentedon Oct 7, 2026
Additional affected Windows desktop user report, submitted with the user's explicit permission to publish anonymized diagnostics on this public GitHub issue (October 7, 2026).
Verified bundled backend:
codex-cli 0.162.0-alpha.2. Desktop app version and Windows release were not verified.Desktop Chrome is running. Read-only browser discovery through
mcp__cua_repl.jswithawait cua.getState()fails before any browser or tab inventory is returned. Explicitly mentioning @chrome does not change the failure.Observed tool errors:
Ordinary sandboxed shell commands also fail before process creation with
helper_unknown_error: setup refresh had errors. Separately approved execution outside that sandbox succeeds for read-only diagnostics.Anonymized fatal log entry:
Recovery attempts did not fix it: control-kernel reset, desktop app restart, and user-performed Task Manager cleanup followed by app restart. After the cleanup, read-only process inventory confirmed the previously observed older Codex/node_repl processes were gone; only newly started Codex and node_repl processes remained. The fatal log nevertheless reproduced at 10:22 EDT. This supports recurrence with new processes rather than only stale helpers. Which handle causes the failure has not been established.
Impact: the user cannot inspect an existing desktop Chrome tab, even with the browser plugin explicitly selected. No browser/account actions were taken, and no cloud-browser fallback was used. No sandbox configuration, ACLs, credentials, or runtime files were changed. Please provide a supported repair or fixed build that preserves sandbox protections.
LFwinds commentedon Oct 7, 2026
Additional confirmation from a Windows 10 machine, with a deterministic minimal reproduction and an interim mitigation that does not disable any feature. Diagnostics were collected on the owner's machine and posted with their approval.
Environment
OpenAI.Codex_26.1002.7124.0_x640.162.0-alpha.2, helper bin dir9691020b546a15b2%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c[windows] sandbox = "elevated"Deterministic minimal reproduction
Holding a single handle is enough to break every command:
...\runtimes\cua_node\<hash>\bin\node_repl.exefor read access with share mode read only (i.e. deny write sharing; this is what the loader's own handle looks like).helper_unknown_error: setup refresh had errors, andsetup_error.jsonreappears.setup refresh: processed 3 write roots ...; errors=[].The same holds for any process whose image lives in the runtime tree. Starting
node.exefrom that tree (node.exe -e "setTimeout(function(){},60000)") is sufficient to reproduce; the first fatal target is whichever mapped file the walk reaches first (bin\node.exe, thenbin\node_repl.exe, thenbin\node_modules\@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll, loaded bycodex-computer-use-swift.exe).Consistent with the
MAXIMUM_ALLOWEDanalysis aboveicacls "<running exe>" /grant <sandbox group>:(RX)still succeeds (exit 0) — as doesicaclson the runningVCRUNTIME140_1.dll. So an open requestingREAD_CONTROL | WRITE_DACis fine against a running image; only the helper's open fails. This matches the access-mask matrix already posted.(RX)ACEs forCodexSandboxUserswere applied recursively to the whole runtime tree (2702 files,icacls /T, 0 failures) and the next refresh failed byte-for-byte identically on the same file. The refresh is unconditional, not a missing-ACE check.node_replMCP host andcodex-computer-use-swift.execome back without an app restart), so a quiescent runtime tree is not reliably reachable while the app runs. A full reboot reproduces the failure within ~30 seconds of app start.Interim mitigation that keeps all features enabled
Rather than changing configuration, we run a small background watcher (a per-logon scheduled task, no network, read-only, touches no app files). It acts only while
%USERPROFILE%\.codex\.sandbox\setup_error.jsonexists: it terminates processes whose image lives underruntimes\cua_node\, and then leaves them alone.errors=[], so the sandbox is provisioned cleanly.node_repland Computer Use still work: the app re-spawns those helpers on demand (verified — a killedcodex-computer-use-swift.exereappeared within ~12 s, and the node_repl MCP host was relaunched later in the same session).For reference, the
[windows] sandbox = "unelevated"workaround mentioned earlier looks like the cleaner interim fix for users who can restart the app; we have not applied it here, so this machine continues to exercise theelevatedpath.youseemenot commentedon Oct 7, 2026
Additional reproduction on Windows 10 Pro x64 build 19045, plus a candidate patch that preserves directory ACL propagation semantics.
Environment: desktop reports
26.1002.52244(build 13536), bundled CLI/helper0.162.0-alpha.2,[windows] sandbox = "elevated". Source inspected and patched at tagrust-v0.162.0-alpha.2, commit74e804deeb1241d5fe699b31fb319f7d46454c42.The fatal runtime validation fails on running
node_repl.exe,node.exe, or loadedVCRUNTIME140_1.dllwithopen ACL target for root-only update ... (os error 32). The affected shared runtime also hosts code-review and codex-app-tools, so disabling Computer Use alone does not remove all holders.A live
CreateFileWprobe on the same runningnode_repl.exe, usingFILE_FLAG_BACKUP_SEMANTICSand share mode READ|WRITE|DELETE, confirmed:MAXIMUM_ALLOWED(0x02000000)READ_CONTROL(0x00020000)This probe only opened and closed handles; it did not modify ACLs. The sandbox group already had read/execute access. Stopping runtime helpers temporarily allowed provisioning, but automatic startup reproduced the failure.
Important constraint on the fix
A blanket replacement of
MAXIMUM_ALLOWEDfor directories can change behavior: SetSecurityInfo documents that this access mode suppresses ACE propagation to children. The existingnoninheriting_read_attributes_preserve_unprotected_child_daclregression test protects that behavior.The candidate below preserves the original successful path. Only on sharing violation does it retry with
READ_CONTROL | WRITE_DAC, and only accepts the retry when metadata from the opened handle identifies a regular file. It retains that same handle for reading and updating the DACL. Directory behavior, existing grant/deny/null-DACL checks, and network/firewall code are unchanged.Validation limits
git diff --checkpassed.elevated; the issue remains unresolved locally.Candidate patch against rust-v0.162.0-alpha.2 (uncompiled)
genchbench76 commentedon Oct 7, 2026
Same issue on 26.1002.6548.0 and 26.1002.7124.0. Clean reinstall (removed .codex, %LOCALAPPDATA%\OpenAI\Codex,
.cache\codex-runtimes; reboot; Store reinstall) reproduces it. On 6548.0 the locked file was also
cua_node...\swift\x64\VCRUNTIME140_1.dll (codex-computer-use-swift.exe); on 7124.0 it is bin\node_repl.exe.
JScottHenderson commentedon Oct 8, 2026
Additional reproduction: Dot local execution fails; unsandboxed local execution succeeds
Observed October 7, 2026. Adding a correlated sandbox log and Process Monitor capture to this existing report instead of creating a duplicate.
Environment
Reproduction and impact
Expected: authorized local tasks initialize successfully and run hostname without changing security settings or requiring the runtime processes to be stopped.
Actual: sandbox setup exits 1; the requested command and downstream SSH test do not execute through the Dot path.
Timeline
All times below are America/Los_Angeles (UTC-07:00) on October 7, 2026.
Correlated Process Monitor evidence
The failing process is codex-windows-sandbox-setup.exe, PID 40428. %USERPROFILE% replaces the personal profile path. Timestamps and event details are preserved.
Sanitized sandbox log excerpt
Interpretation and limits
The capture confirms a sharing conflict during sandbox setup. Metadata opens succeed, while the open requesting Maximum Allowed fails. The successful and failing opens also differ in Open Reparse Point, so this capture alone is not a controlled access-mask experiment. This is consistent with other reports here, but we did not independently validate the source-level root cause or regression range.
Existing node_repl processes were present, but this capture does not identify a specific conflicting handle or prove which process causes the conflict. It does not establish antivirus responsibility. A separate helper exiting 0 does not reverse the main setup failure. No ACL changes, sandbox-setting changes, process termination, file deletion, runtime replacement, or third-party patches were performed in this coordinated investigation.
Please investigate the runtime ACL validation/open path and provide an official fix that preserves sandbox protections.
Privacy / evidence handling
The original sandbox log and approximately 440 MB Process Monitor CSV remain local. This report includes the relevant sanitized evidence only. Personal names, hostnames, network addresses, private repositories, organization-specific paths, task/conversation identifiers, unrelated process activity, and credentials are excluded. Raw captures and full conversation transcripts are not uploaded.
SebastianKohler commentedon Oct 8, 2026
Same issue, there is also a thread about this on the OpenAI Developer Community: https://community.openai.com/t/windows-desktop-app-has-broken-sandbox-after-the-latest-update/1403995
fjsxcsh0525-spec commentedon Oct 8, 2026
Additional reproduction on Windows: after a normal desktop restart, the same setup-stage error 32 recurred, but the failing target changed from node_repl.exe to the active CUA runtime's VCRUNTIME140_1.dll.
Environment
Reproduction
Get-LocationGet-Date -Format oexec-server rejected request (-32603): helper_unknown_error: setup refresh had errorsPost-restart evidence
Relevant entries from sandbox.2026-10-08.log, all times UTC on October 8:
Sanitized failing path:
%USERPROFILE%\AppData\Local\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_modules\@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dllThe log operation is
open ACL target for root-only update, followed by the localized Windows message meaning “The process cannot access the file because it is being used by another process” (os error 32).Before/after comparison and limits
Important control qualification
Read-only commands succeed in the existing manual desktop Codex session. That session uses pre-existing full-access configuration, while the delegated request goes through sandbox setup. This is not a same-permission-mode comparison and does not prove sandboxed execution works.
No ACL/owner changes, sandbox/proxy changes, runtime deletion, force termination, helper replacement or further restart were performed. A separate existing-thread placement-format/NOT_FOUND problem is being kept separate.
Please investigate the runtime validation file-open/access/share behavior and advise a supported fix preserving sandbox protections. The source-level cause and an effective fix on this installation remain unconfirmed.
sungmichael22-BHF commentedon Oct 8, 2026
Additional confirmed reproduction from ChatGPT Desktop Work / Computer Use on Windows.
Symptoms:
windows sandbox failed: helper_unknown_error: setup refresh had errors.Confirmed sandbox log cause:
Troubleshooting already performed:
cua_node\3dd31cfff853001cruntime directory so the app had to recreate it.%USERPROFILE%\.codex\.sandbox\setup_error.json.After relaunch, the runtime was freshly recreated under the same runtime ID and the exact same failure reproduced. The log shows
node.exestarting immediately before two sandbox setup-refresh launches; those setup-refresh attempts then fail on the newly recreatednode_repl.exewith error 32.This strongly suggests a startup/order race in which the app starts the Computer Use runtime before the sandbox refresh finishes validating/updating ACLs.
Impact:
Submitted with the affected user's explicit permission. User/profile names and private project content are intentionally omitted.
11 remaining items
ixaelo commentedon Oct 9, 2026
Confirming the same
os error 32regression on another Windows installation with the bundled Codex CLI0.162.0-alpha.2.A minimal
Get-Locationfails before PowerShell actually runs:The sandbox log shows the same underlying failure reported in this issue:
One detail that may help confirm the race described here:
node.exe/node_repl.exeprocesses.node.exe, severalnode_repl.exeinstances, andcodex-computer-use-swift.exe.node_repl.exe.I also checked the relevant project/workspace ownership and ACLs. The directories are owned by my normal Windows account, and
CodexSandboxUsershas access, so this does not appear to be a workspace ownership or.gitACL problem.There is also a potentially relevant earlier sandbox failure on the same machine. Before reaching the
os error 32failure, this file:had become exactly 22 bytes of NUL (
0x00) data rather than valid JSON. That produced the separate:failure. Moving the corrupted state file out of the active path changed the failure from the deny-read ACL parse/setup path to the
runtime read/execute validation/os error 32failure described in this issue.This 22-NUL-byte state-file corruption has already been reported independently in:
I do not know whether the state-file corruption and the runtime sharing violation have the same root cause, so I am not asserting that they do. But on this installation they occurred consecutively in the same Windows sandbox provisioning subsystem, and fixing/bypassing the first immediately exposed the second.
This looks consistent with the app starting processes from the
cua_noderuntime tree before the elevated sandbox refresh has finished validating/updating access to that same tree.Is there a fixed build available to test, or a supported workaround that preserves the elevated sandbox?
pnmcguire480 commentedon Oct 9, 2026
Additional confirmation on Windows 10 Home, x64, build 19045.
Environment:
[windows] sandbox = "elevated".Every normal sandboxed command fails before PowerShell starts with
helper_unknown_error: setup refresh had errors. Explicitly approved read-only diagnostics outside the sandbox work. Codex Doctor passes authentication, desktop app-server initialization, HTTP/WebSocket connectivity, and database integrity;sandbox.helpersfails.Sanitized error:
Windows event logs establish this timeline on October 8, 2026 (EDT):
The validation error does not appear in any of the 51 earlier sandbox log files inspected. SHA256 comparisons confirm that the copied core, sandbox setup helper, and node_repl.exe match their originals in the installed MSIX package.
Stopping the identified Node helpers moves the failure to VCRUNTIME140_1.dll, loaded by Codex's Swift helper. Codex recreates these helpers, and the executable error returns. Restarting Codex and rebooting did not resolve it. No manual ACL changes or persistent sandbox bypass were applied during this investigation.
This matches the problem addressed by merged PR #51822. Which supported Windows desktop release includes that fix? Microsoft Store update eligibility could not be determined by the app's read-only update check.
liee23 commentedon Oct 9, 2026
Additional Windows reproduction: sandbox setup fails with
os error 32onnode_repl.exeI am experiencing the same Windows sandbox initialization failure and would like to provide an additional reproduction with diagnostic evidence.
Environment
26.1002.7124.026.1007.11041Issue
Codex receives prompts normally, but any attempt to execute a command in the normal sandbox fails before the shell process starts.
Error:
The sandbox log repeatedly reports:
Timeline and troubleshooting
26.1007.11041, but the failure persists.node_repl.exesharing violation at approximately 10:10 and 10:12 China Standard Time.Several
node_repl.exeprocesses were observed under the Codex process tree, but I have not confirmed which process, if any, is responsible for the conflicting file access.I have not modified ACLs, deleted runtime files, disabled sandbox protections, or reinstalled the workspace dependencies.
Expected behavior
Simple read-only commands such as
Get-Locationshould execute successfully inside the normal Windows sandbox.Actual behavior
Sandbox initialization fails before any command is executed. This blocks ordinary local file inspection and development tasks.
Questions
I can provide additional sanitized sandbox logs if needed. Thank you for investigating.
uropb9h-dot commentedon Oct 9, 2026
Confirmed on Windows 10 Pro 22H2, build 19045.6466, with ChatGPT/Codex app 26.1002.52244 (build 13536), MSIX package 26.1002.7124.0, and bundled codex-cli 0.162.0-alpha.2.
With windows.sandbox = "elevated", browser runtime initialization fails. Resetting the browser runtime alone does not help. The fresh sandbox log reports a sharing violation on node_repl.exe (os error 32), followed by "setup refresh had errors".
Changing only windows.sandbox to "unelevated" and resetting the browser runtime restores Chrome page reading. Restoring "elevated" reproduces the failure; switching back to "unelevated" restores page reading again.
No manual Windows ACL changes or runtime-file deletions were made. This is a temporary workaround with weaker isolation. Which supported Windows desktop release includes the fix from PR #51822?
suinian0309 commentedon Oct 9, 2026
Independent confirmation from another Windows desktop installation.
Environment:
26.1002.52244(build13536, production)26.1002.7124.0elevatedEvery sandboxed command fails before the shell starts with:
The sandbox log first points to
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<runtime-id>\bin\node_repl.exewithos error 32. Restart Manager identified two livenode_repl.exeholders under the Codex/CUA process tree. After terminating both, the next refresh advanced to@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll; module inspection showed that DLL loaded bycodex-computer-use-swift.exe, which the desktop app immediately respawned after termination.A full Windows reboot did not help. Temporarily disabling the CUA/Node entries in
config.tomlalso did not help: after restart the desktop app regenerated the runtime entries and started those helpers before the sandbox refresh. Approved unsandboxed execution succeeds, which isolates the failure to elevated sandbox provisioning.This is consistent with the root cause fixed by merged PR #51822. Please publish which Windows desktop build first includes the fix; affected users currently need either an unsandboxed/full-access session or the weaker
unelevatedsandbox workaround.lluo-octet commentedon Oct 9, 2026
confirmed having the issue on windows wiht 0.162.0
alecwardd commentedon Oct 9, 2026
Adding a few data points from a single Windows 11 machine (build 26200) that I haven't seen in this thread yet. Desktop is 26.1002.7124.0, which bundles CLI 0.162.0-alpha.2.
1. Which builds contain the fix (PR #51822)
Several people asked which build has the fix. I checked the release tags. The fix commit (dd12f89, which adds
inspect ACL target {}inwindows-sandbox-rs/src/acl.rs) is:rust-v0.162.0-alpha.20andrust-v0.163.0-alpha.2;rust-v0.162.0-alpha.2, which is what desktop 26.1002.7124.0 bundles;rust-v0.162.0either.So a desktop build that bundles 0.162.0-alpha.20+ or 0.163.x should be the first desktop build with the fix. Stable 0.162.0 still has the bug.
2. Same machine, same conditions: CLI 0.156.1 passes and 0.162.0-alpha.2 fails
I ran the standalone npm CLI 0.156.1 with
codex sandbox -P :workspace -C <new empty folder> -- powershell.exe ....codex-computer-use-swift.exealive and holdingVCRUNTIME140_1.dll, and the desktop app running.granting write ACE to <new folder>, thenprocessed 2 write roots; errors=[], thensetup binary completed, and the command ran.3. The swift helper runs even with every Computer Use setting disabled
In my
config.toml, these are allenabled = false:computer-use@openai-bundledunified-computer-use@openai-bundledchrome@openai-bundled[mcp_servers.cua_repl]codex-computer-use-swift.exe --parent-pid <desktop pid>still starts with the app. It also survives a backend restart.So even after node_repl is gone, the swift DLL keeps the 0.162.0-alpha.2 validation failing, and turning off Computer Use doesn't help. (Settings → Plugins → MCP servers → node_repl off does stop node_repl.exe from spawning. It restarts the app-server and the exec-server.)
Process data comes from the Restart Manager API (
RmGetList). Before and after each failure, the only holders of the failing file were node_repl.exe helpers, or for the DLL, the swift helper.dede383 commentedon Oct 9, 2026
Additional reproduction: elevated Windows sandbox fails with os error 32 after reinstall
I am experiencing the same Windows sandbox provisioning failure described in this issue.
Environment
OpenAI.Codex26.1002.7124.00.162.0-alpha.2sandbox = "elevated"Error
The failing runtime file is:
The sandbox setup also reports
os error 32when attempting to grant a read-attributes ACE on the user profile directory.Troubleshooting already performed
codex-windows-sandbox-setup.exeencountersSHARING VIOLATIONwhile openingnode_repl.exe.None of these steps resolved the
elevatedsandbox failure.Important comparison
elevated: sandbox provisioning fails.unelevated: a simple PowerShell command executes successfully.This strongly suggests that the issue is specific to the elevated sandbox provisioning path.
I understand that PR #51822 addresses the runtime ACL sharing violation. Could a maintainer confirm which Windows desktop build first includes this fix and how affected users can obtain it?
I would like to restore the normal
elevatedsandbox rather than rely on a weaker sandbox mode or unsandboxed execution.he862195343-sys commentedon Oct 9, 2026
Additional Windows 10 reproduction with before/after update timeline (October 9, 2026)
I am reporting an independently observed work-blocking regression on behalf of an affected Codex Desktop user. This supplements #51634 rather than opening a duplicate. Local usernames, private project names, and absolute workspace paths have been redacted.
Environment
BROWSER_USE_CODEX_APP_VERSIONin the local config; About dialog / installed MSIX version not independently read).sandbox_mode = "workspace-write",[windows] sandbox = "elevated".%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\.Get-DateandGet-Locationfail before the shell process is created.Exact error, anonymized
Later failures point to the bundled Swift helper's
node_modules\@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dllinstead ofnode_repl.exe. In the latest available log, the 21:08:44 and 21:14:29 failures on October 9 both target that DLL.Read-only ACL setup is logged as successful (
read-acl-only mode: applying read ACLs;read ACL run completed); failure occurs in the subsequent runtime read/execute validation step. This is ERROR_SHARING_VIOLATION (32), not evidence of incorrect workspace ownership or a general ACL permission denial. Runtime processes/modules associated with CUA/Swift were observed, but the precise incompatible file-handle owner PID has not been independently established.Strong local regression timing
A scan of 47 daily sandbox logs found:
runtime read/execute validation failedoccurrences in 40 logs; setup refresh was active on those dates.On October 7 at 18:02:39, setup with helper directory
Codex\bin\5ea220ae823df3d7succeeded (processed 3 write roots ... errors=[]). A different helper directory,Codex\bin\9691020b546a15b2, was materialized around 21:05:48, followed by the first observed runtime validation sharing violation at 21:18:32. This is strong evidence of a regression coinciding with the installed binary change, though not a controlled A/B test.Impact and attempted recovery
Request to maintainers
helper_unknown_error.This failure has interrupted the user's daily development workflow since the October 7 update. Thank you for prioritizing a supported production fix.
CelsoTeixeira commentedon Oct 9, 2026
Same failure with the standalone npm CLI, no desktop app running, on stable 0.162.0.
Environment
@openai/codexinstalled globally via npm;codex-cli 0.162.0[windows] sandbox = "elevated"Version check (same machine, same config)
runtime read/execute validationstep, and refresh ends witherrors=[]Repro, no model involved
codex doctor --summary:✗ sandbox elevated Windows sandbox provisioning recorded a structured failure~/.codex/.sandbox/setup_error.json:{"code": "helper_unknown_error", "message": "setup refresh had errors"}Sandbox log (
~/.codex/.sandbox/sandbox.2026-10-09.log). The Windows message is pt-BR for "The process cannot access the file because it is being used by another process".What holds the lock: the CLI's own
codex app-serverThe desktop app was not running. Every session the npm app-server serves starts
node_repl.exefrom thecua_noderuntime, both directly and throughcua-repl.mjs:There were 8 such processes at repro time, all
...\cua_node\3dd31cfff853001c\bin\node_repl.exe. Once one app-server session has started, sandbox setup fails for that server and for every othercodex execorcodex sandboxon the machine.codex exechides the failureOn 0.161.0,
codex execexits 0 even when everyexec_commandwas rejected. The log repeats:Then the agent writes a final message saying it couldn't run anything, and the process exits 0. Scripted callers can't detect the failure without parsing logs. A non-zero exit, or aborting early when the sandbox can't be set up, would help.
Workaround:
npm i -g @openai/codex@0.160.1irat25 commentedon Oct 9, 2026
Update: partial MXC workaround; browser access is still broken
Follow-up to my reports #6058169335 and #6059452056, posted at the affected user's request.
Verified environment: installed MSIX
OpenAI.Codex 26.1002.7124.0(package inspection, rather than the earlier updater version marker), bundled CLI0.162.0-alpha.2, Windows 1126200.9457. The original elevated sandbox log recordsos error 32during runtime ACL validation of an in-usenode_repl.exe.Partial workaround tested on this installation: switch to
mxcand use a named profile that inherits workspace permissions but removes broad root reads. The actual configuration below is anonymized; replace<user>with the local profile directory and adapt runtime paths to the installation. Back up the existing config and preserve unrelated settings.The ordinary broad
:workspaceMXC probe did not finish within the test window. Some mapped network drives are unavailable; their involvement is a hypothesis, not a confirmed cause of the browser failure.Results, including after a full desktop-app restart:
codex doctor --json:sandbox.helpers=ok, backendmxc, filesystem/network restricted; overall result remainswarning. The helper check reports “sandbox configuration is readable.”codex sandbox --include-managed-config --permission-profile mxc-workspace-recovery -- cmd.exe /d /c echo AFTER_RESTART_MXC_OKand a plain bundled Node executable. This is not a successful
node_replor browser-tool test.InitializeDefaultDrives.cua.getState()timed out after 30 seconds; after an explicit kernel reset, another attempt timed out after 60 seconds. No tab or page state was returned.This only restores the tested CLI execution path. It does not restore browser automation, and the issue is not resolved for this user. We have not established the remaining browser failure's cause. Could a maintainer provide supported browser-recovery steps or identify the Windows desktop build that fixes this path?
yamayamashi1031-hub commentedon Oct 10, 2026
Still reproduces on codex-cli 0.162.1 (stable, npm) with desktop app runtime
cua_node\3dd31cfff853001c(installed by the 26.1002.52244 auto-update), Windows 11 Pro 26200.codex exec -s workspace-writethat runs any shell command fails withsetup refresh had errors; the sandbox log showsruntime read/execute validation failed ... node_repl.exe ... (os error 32). It fails even when no other Codex process is running beforehand: the run's ownnode_repl.exeis enough to trigger it.danger-full-accessruns are unaffected.enabled = falseunder[mcp_servers.node_repl]in~/.codex/config.toml(browser/computer-use is lost). We re-test automatically whenever the CLI version or the runtime path changes, and re-enable once the test passes.franklin202204-hub commentedon Oct 10, 2026
Independent reproduction on a different machine (confirms #51634)
Adding a second data point with a different helper build and a few findings that may help narrow the fix.
Environment
OpenAI.Codex 26.1002.7124.0(MSIX)codex-cli 0.160.09691020b546a15b2(materialized 2026-10-08 19:55)%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c[windows] sandbox = "elevated",sandbox_mode = "workspace-write"codex doctor)Regression is visible locally too
Same machine, same config,
.codex/.sandbox/sandbox.<date>.log:errors=[]setup errorruntime read/executeoccurrencesThe failing step simply does not exist in the pre-0.162 helper — matching #51634's finding.
Failure target moves with whichever helper is alive
Distinct targets observed in one day:
Holders (all launched by the desktop app):
Killing the holder does not help:
codex-computer-use-swift.exewas back within ~0.4 s and the refresh failed on the same DLL.Pre-granting permissions does not help (independently confirmed)
Matched the ACL of a known-good runtime file byte-for-byte:
Deny ACEs left behind by earlier failed runs were also removed from the whole tree (336 dirs, changes propagated). The failure was unchanged — confirming this is about being able to open the target, not about the resulting ACE shape.
New evidence: the runtime path does not come from
config.tomlRepointing every runtime reference in
config.toml(4 occurrences) to a healthy, idle runtime had no effect — setup still validated the new runtime. The path is referenced from:So "just point it at another runtime" is not a viable workaround.
Proof that the only blocker is the in-use files
Manually terminating every process under the runtime directory and immediately triggering provisioning succeeded:
…and a real command then executed inside the sandbox (
succeeded in 95ms).43 seconds later the app's own refresh failed again on the same DLL — i.e. a successful provisioning pass is not enough; the app re-occupies the tree immediately.
Verified workaround:
[windows] sandbox = "unelevated"Switching to the documented fallback avoids the failing step entirely. Log during the
unelevatedrun:The command executed successfully. All app functionality is retained (filesystem ACL boundary still applies); isolation is weaker than
elevated, as documented.Possible fix directions
ERROR_SHARING_VIOLATION, skip it and continue (log a warning) rather than failing the whole refresh — the ACE is typically already present.FILE_SHARE_READ|WRITE|DELETEverification would avoid the exclusive open entirely.Happy to provide full logs or run additional diagnostics if that helps.
Still broken as of 0.162.1 (verified same day)
After aligning versions (the app auto-upgraded the shared daemon to 0.162.1, so I also upgraded the CLI from 0.160.0 → 0.162.1 via
codex update), I re-testedelevated:Result — unchanged:
Failing target again:
...\runtimes\cua_node\<hash>\bin\node_repl.exe(same file as before).So the regression is not fixed in 0.162.1 —
unelevatedremains the only workable mode.Post-upgrade state (for reference)
0.162.10.162.1(aligned)unelevatedcodex doctorsandbox✓ restricted fs + enabled networkSide note: CLI/daemon feature-flag skew
While the CLI was still 0.160.0 against a 0.162.1 daemon, every CLI start showed:
Choosing 2 rewrites the shared daemon's feature flags to the older CLI's set (the prompt itself warns: "These settings persist and can disable functionality for other clients"). Aligning versions via
codex updatemade this disappear — probably worth surfacing as a hint rather than an offer to mutate shared state, since the shared daemon is also used by the desktop app.cpaulk87 commentedon Oct 10, 2026
Additional reproduction on October 10, 2026. The failure persists after restarting the application/session.
The sandbox log identifies the setup helper used by the failing shell calls as:
The same log also records earlier failures through the corresponding
app-server-daemon\releases\0.162.1-aarch64-pc-windows-msvchelper. These are versions/architecture labels from the helper paths, not independently verified app or OS versions.The affected runtime is:
Sanitized diagnostic excerpt from
sandbox.2026-10-10.log, matching the shell test at 14:59 UTC:Observed impact:
Failed to create unified exec process: helper_unknown_error: setup refresh had errors.apply_patchcannot create a small test file in the authorized workspace..codexand create/read/delete a temporary file under%LOCALAPPDATA%\Temp, but listing or writing directly under the workspace root returnsEPERM.Process inspection showed two
node_repl.exeprocesses using the affected runtime executable (PIDs 15720 and 19124; parent PIDs 19144 and 17120 respectively). Fully exiting Codex releases every observednode_repl.exeinstance. Restarting had already been attempted before this reproduction, and the failure returned. This argues against orphaned runtime processes surviving app exit, but does not independently identify the exact conflicting handle or establish the full root cause.No manual ACL changes or sandbox-mode changes were made during these tests.
Environment details supplied by the affected user:
0.162.1(also matches the setup helper release paths above).25H2, OS build26200.9457.A separate desktop UI/package version has not been independently verified.
Could you confirm which supported app/runtime release includes the fix from #51822, and whether the
0.162.1setup helper should contain it?thebetterfarhan commentedon Oct 18, 2026
Reproduced 2026-10-18 with desktop CLI
codex.exe0.162.1 (helper from0.162.1-x86_64-pc-windows-msvc) and Store app 26.1007.9446.0.Same signature:
runtime read/execute validation failedon...\cua_node\a9ba6825a525118c\bin\node_repl.exe(os error 32) duringcodex exec --sandbox read-only; exec rejected withFailed to create unified exec process: helper_unknown_error: setup refresh had errors.Additional data points:
FARHANSLAPTOP\CodexSandboxUsers:(I)(RX)inherited on the file and itsbindir — matches the report that pre-granting does not help.OpenAI.Codexprocesses + daemons ended, no process from the runtime tree visible), the CLI-only run still failed on the same file — then a later setup in the same window reportederrors=[]with no changes in between. So the open handle can come from the CLI session itself, not only the desktop app, and it is not purely deterministic.codex execwith configsandbox_mode = "danger-full-access"(no--sandboxflag, so no setup refresh) works — the validation step is the only blocker.@openai/codex@0.160.0with--sandbox read-only: works (helper predates the new validation step).@openai/codex@0.163.0with--sandbox read-only: works, in the same CLI-only condition where 0.162.1 failed. So the fix may already be in 0.163 — but the desktop app still ships the 0.162.1 helper, so desktop sessions remain broken.Workaround: use CLI 0.163+ (npm) for sandboxed runs until the desktop app ships an updated helper.