Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
1.141.0
What subscription do you have?
Pro
What platform is your computer?
Windows
What issue are you seeing?
Environment:
- Windows, VS Code, OpenAI Codex extension.
- Extension version: 26.1002.51308-win32-x64.
Steps to reproduce:
- Open Codex in VS Code.
- Ask Codex to run a minimal read-only PowerShell command.
- Execution fails before PowerShell starts.
Actual result:
exec_command fails with:
helper_unknown_error: setup refresh had errors
The Windows sandbox setup log reports:
runtime read/execute validation failed
open ACL target for root-only update
os error 32: The process cannot access the file because it is being used by another process.
Affected runtime:
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe
Latest observed occurrence:
2026-10-07T21:51:15Z.
Troubleshooting already performed:
Closed VS Code and Codex. Get-Process -Name node_repl returned no processes. After reopening VS Code and attempting one minimal command, the same error occurred again.
Expected result:
Sandbox setup completes and the PowerShell command starts.
No sandbox permissions or runtime files were modified. The process holding the conflicting file handle has not been identified. Please advise on a supported recovery procedure.
What steps can reproduce the bug?
- Open VS Code on Windows with the OpenAI Codex extension enabled.
- Open a local workspace and a Codex conversation.
- Ask Codex to execute a minimal read-only PowerShell command, such as
Get-Location, through its execution tool. - Execution fails before PowerShell starts, with:
helper_unknown_error: setup refresh had errors
The sandbox setup log reports a failure while opening this runtime file for an ACL update:
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe
Windows reports error 32: the file is being used by another process.
Recovery attempt:
Close VS Code and Codex, then run Get-Process -Name node_repl -ErrorAction SilentlyContinue in a separate PowerShell window. The command returned no processes. Reopen VS Code and request one minimal read-only command. The same setup failure occurs again.
Expected: PowerShell starts and returns the command output.
Actual: Sandbox setup fails; no PowerShell session or native exit code is produced.
The process holding the conflicting file handle has not been identified.
What is the expected behavior?
No response
Additional information
Environment:
- Windows, VS Code.
- OpenAI Codex extension: 26.1002.51308-win32-x64.
- Execution context: CodexSandboxOffline.
Latest recorded occurrence:
2026-10-07T21:51:15Z.
Relevant sandbox log:
runtime read/execute validation failed: validate runtime read/execute access on ...\cua_node\3dd31cfff853001c\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)
Followed by:
setup refresh completed with errors
setup error: setup refresh had errors
The failure persists after closing VS Code and Codex, confirming that no node_repl processes were listed, and reopening VS Code.
No runtime files, ACLs, or sandbox permissions were manually changed. Browser/computer-use tools were not explicitly initialized during the latest minimal execution attempt.
The failure prevents local command execution and blocks development. The pending project operation was never submitted.
The process holding the conflicting file handle remains unidentified. Please advise on a supported recovery procedure that preserves the sandbox execution context.
Activity
rhove-zz commentedon Oct 7, 2026
Clarification: the reported execution failure occurs in the Codex extension for VS Code on Windows, version 26.1002.51308-win32-x64. The version 1.141.0 entered in the form refers to the desktop app, not the VS Code extension. Please triage this issue for the IDE extension / Windows sandbox component.
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
Yuhao-Zhang666 commentedon Oct 8, 2026
Windows sandbox setup fails on every tool call: cannot open running runtimebinaries to update their ACL (ERROR_SHARING_VIOLATION / os error 32)SUMMARYOn Windows 11 25H2 (build 26200), every tool call fails to set up the CodexWindows sandbox, and the app falls back to elevated/unsandboxed execution.Today: 52 of 52 "setup refresh" runs failed, 0 succeeded.ERROR (from %USERPROFILE%.codex.sandbox\sandbox..log) runtime read/execute validation failed: validate runtime read/execute access on ...\AppData\Local\OpenAI\Codex\runtimes\cua_node<hash>\bin\node_repl.exe: open ACL target for root-only update: (os error 32) setup refresh: processed 3 write roots (read roots delegated); errors=[...] setup refresh: exited with status ExitStatus(ExitStatus(1))ROOT CAUSEcodex-windows-sandbox-setup.exe opens each file underruntimes\cua_node<hash>\ with write access in order to update its DACL.But those same binaries are already running as children of codex.exe /ChatGPT.exe (node.exe, node_repl.exe), and Windows does not permit opening amapped executable image with write access, so the open fails withERROR_SHARING_VIOLATION.Verified by exclusive-open test — these are locked while running: node.exe, node_repl.exe, codex-computer-use-swift.exe, MSVCP140.dll, VCRUNTIME140.dll, VCRUNTIME140_1.dll(2365 files in that runtime folder; exactly these were locked.)Note the ordering: codex.exe itself launches node.exe --experimental-vm-modules --eval (the sandbox capability probe)a few hundred ms BEFORE the validation runs. So the setup tries toexclusively open a process that codex.exe just started itself.REGRESSIONStarted with the build installed 2026-10-07 ~20:10. Working build (2026-10-03): setup binary ...\Codex\bin\8aaf1547b825b104\codex-windows-sandbox-setup.exe payload_len=4516 Log shows NO runtime validation step at all, and ends with: setup refresh: processed 0 write roots (read roots delegated); errors=[] codex-windows-sandbox-setup.exe] setup binary completed Broken build (2026-10-08): setup binary ...\Codex\bin\9691020b546a15b2\codex-windows-sandbox-setup.exe payload_len=4576 Every run performs runtime validation and fails with os error 32.SUGGESTED FIX1. Open runtime files with WRITE_DAC only, without data-write access. Changing a DACL does not require write access, which avoids the sharing violation entirely.2. Skip runtime files that are currently mapped/running.3. Or run the runtime validation before spawning the runtime helpers.IMPACTThe Windows sandbox can never initialise on this machine; every tool calldegrades to elevated execution with an approval prompt. Reads/writes onlywork through that fallback path.
01a11984-bb88-7821-a895-ba44e3c98d68
ZenOpsZA commentedon Oct 8, 2026
+1 - really annoying!
zainmitchell commentedon Oct 9, 2026
Latest stable 0.162.0 still fails elevated Windows sandbox startup; 0.162.0-alpha.20 passes.
As of the October 9, 2026 check, GitHub's official latest stable release is still 0.162.0: https://github.com/openai/codex/releases/latest . Our retained October 8 tests of that stable release failed all five isolated sandbox preflight checks. The prerelease succeeded. This report is specifically calling attention to the failure remaining in the latest stable, not merely reporting an older CLI problem.
Additional Windows CLI/app-server reproduction and stable-versus-prerelease results for this issue, captured on October 8, 2026.
Summary
We reproduced the same elevated Windows sandbox setup failure with Codex CLI 0.161.0. Official stable 0.162.0 also failed all five isolated app-server command preflight checks. The official 0.162.0-alpha.20 prerelease passed the formerly failing commands and preserved read-only write denial when its matching companion executables were present.
This blocks sandboxed command execution used by independent code reviews across two projects. We are temporarily using the verified prerelease while retaining the elevated sandbox.
Environment and observed error
Execution fails before the requested command starts:
For the original 0.161.0 failures, the sandbox setup log identifies:
Affected runtime path, with the user-specific prefix removed:
The stable 0.162.0 command responses contain the same setup-refresh error. We do not claim that those responses alone prove the identical lower-level cause.
Reproduction procedure used
codex app-serverwith the elevated Windows sandbox selected. Initialize it and use model-freecommand/execrequests against an existing local checkout and a disposable owned scratch directory.whoami; and attempt a scratch-file write under read-only while catching the expected denial.Retained results
Stable 0.162.0, 2026-10-08T21:26:34Z through 21:26:56Z:
whoamiThe stable CLI's version check and code-mode-host startup succeeded outside these sandbox command checks. Five matching official executables were present; this was not a CLI-only installation.
Subsequent 0.162.0-alpha.20 checks, using the binary selected in the integration's settings and retaining elevated sandbox configuration:
whoamiCodexSandboxOfflineaccountsandbox-write-deniedby the checkEarlier prerelease checks also passed the other project's instructions-file read and owned scratch write/read. These are direct command-startup and selected filesystem-enforcement checks, not claims of exhaustive runtime compatibility or product acceptance.
Relevant upstream fix and stable-release gap
PR #51822, commit
dd12f892f1b857e5161abd33a2967125b265d550, restrictsMAXIMUM_ALLOWEDopens to directories during runtime ACL repair.Our October 8 inspection found that:
rust-v0.162.0-alpha.20contains that fix.rust-v0.162.0does not descend from that fix. The GitHub comparison was diverged, 2 ahead and 30 behind, with merge baseac9b5b8380517ded445b09dd3196d8d9e2ba3c59.codex-rs/windows-sandbox-rs/src/acl.rs, lines 528-535 at that tag, still used the unconditional root-onlyMAXIMUM_ALLOWEDopen. This conclusion was based on source inspection as well as ancestry.References:
Packaging detail that mattered
An initial prerelease attempt had the new CLI but lacked canonically named matching helpers. It resolved an older helper from PATH and still failed. Supplying the matching
codex-windows-sandbox-setup.exeandcodex-command-runner.exebesidecodex.execorrected that diagnostic setup.The integration's code-mode calls also required
codex-code-mode-host.exe; omitting it caused a separate startup failure. Supplying the same release's checksum-verified host corrected the missing-file problem. The stable trial included its matching companions, including the sandbox service.No manual runtime ACL workaround or unsandboxed execution was used to obtain the successful prerelease command results. A temporary unelevated diagnostic alternative worked, but was not adopted as the shared provider configuration.
Requested maintainer guidance
Please confirm which supported stable Windows release includes #51822, or backport it if the current stable branch still lacks it. Please also confirm the supported Windows app-server distribution layout so integrations reliably use the matching sandbox helpers and code-mode host rather than finding an older helper on PATH.
This report summarizes retained local diagnostic results; it does not claim a fresh reproduction on October 9. Private project source, user-specific paths, session transcripts, credentials and sandbox secrets are intentionally omitted.