You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows sandbox fails with error 32 while Codex desktop is open; works when closed. #52328
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems
What version of the Codex App are you using (From “About Codex” dialog)?
26.1002.7124.0
What subscription do you have?
Enterprise
What platform is your computer?
Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex displays “Windows setup didn’t finish,” and sandbox commands fail with helper_unknown_error: setup refresh had errors.
The setup logs show Windows error 32 (“The process cannot access the file because it is being used by another process”) when validating runtime permissions on node_repl.exe or VCRUNTIME140_1.dll.
Sandbox commands work with Codex desktop closed and fail with it open. The administrator sandbox provisioning command completes successfully, but subsequent runtime permission refresh fails.
What steps can reproduce the bug?
Completely close Codex desktop and its helper processes.
Open PowerShell and run:
& "$env:LOCALAPPDATA\OpenAI\Codex\bin\9691020b546a15b2\codex.exe" sandbox powershell.exe -NoProfile -Command "Write-Output 'Sandbox works'"
Confirm that the command succeeds.
Open Codex desktop.
Run the same PowerShell command again.
Observe that it fails with helper_unknown_error: setup refresh had errors. The sandbox log reports error 32 on a Codex runtime file.
Process inspection shows that Codex desktop launches codex-computer-use-swift.exe, which loads the failing DLL. Its codex.exe child also launches node_repl.exe.
What is the expected behavior?
Windows sandbox setup should finish successfully, and sandbox commands should work while Codex desktop is open. Running Codex helpers should not prevent runtime permission validation or refresh.
Ordinary local file-reading commands failed before PowerShell could start, with:
Failed to create unified exec process: helper_unknown_error: setup refresh had errors
The dated sandbox log repeatedly reported:
runtime read/execute validation failed:
validate runtime read/execute access on
%LOCALAPPDATA%\OpenAI\Codex\runtimes\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)
The same read command succeeded outside the sandbox using approved host execution.
New helper processes appeared after application restarts, and the failure recurred. Stopping only the two processes running this exact node_repl.exe let validation progress further, but it then failed with the same sharing violation on:
After stopping the remaining executables under this exact runtime directory, codex-computer-use-swift.exe appeared again and the DLL validation failure recurred. These observations do not establish the exact conflicting handle or the underlying implementation defect.
Verified workaround: once config.toml contained [windows] sandbox = "unelevated", two successive ordinary local shell calls successfully read existing files without host-execution escalation. The sandbox log recorded SUCCESS at 2026-10-09 09:20 local time (Asia/Shanghai). This verifies shell/file reading only; browser/computer-use recovery was not tested, and elevated mode has not been shown to recover.
Please identify a supported fix or release that restores elevated sandbox initialization while its own runtime helpers are running. No manual ACL changes or runtime-binary replacements were used. Personal paths, credentials, and full session logs have been omitted.
Additional matching report (2026-10-09): Windows packaged app OpenAI.Codex version 26.1002.7124.0 (Get-AppxPackage status Ok). Previously working client suddenly displayed “Windows setup didn’t finish / Setup stopped”; clicking Retry did not show a UAC prompt.
Repeated entries in ~/.codex/.sandbox/sandbox.2026-10-09.log:
runtime read/execute validation failed: validate runtime read/execute access on %LOCALAPPDATA%\OpenAI\Codex\runtimes\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)
setup refresh completed with errors
setup error: setup refresh had errors
Observed workaround for this case: completely quit Codex, inspect/terminate residual node_repl.exe process(es) with no active jobs, and reopen the app. The Windows setup warning no longer appeared; a subsequent local desktop .txt file-creation task succeeded. This is evidence of recovery of basic file operations, not a full validation of elevated sandbox isolation. No ACL changes, runtime deletion, or reinstall performed. Paths and identifying details redacted.
Please investigate a possible race between sandbox ACL refresh and live computer-use/node_repl runtime processes, and whether setup could retry gracefully on sharing violations.
runtime read/execute validation failed: validate runtime read/execute access on ...\OpenAI\Codex\runtimes\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)
setup refresh completed with errors
setup error: setup refresh had errors
Repeated refresh failures occurred within seconds.
Recovery observed:
Quit the Codex desktop app and inspect residual codex / node_repl processes.
Stop leftover node_repl.exe processes (after checking no important tasks were running), then reopen Codex.
The Windows setup error/prompt no longer appeared.
A simple Work desktop TXT-file creation task subsequently succeeded.
This appears to be a transient file-sharing/ACL refresh collision with an active computer-use runtime. The exact lock holder and underlying lifecycle race are not yet proven. This workaround resolved the user's immediate symptoms without reinstalling or changing ACLs. Paths/user identifiers omitted for privacy.
Additional data point: the standalone npm CLI is affected too, not just the app's bundled executor.
Windows 11 build 26200, desktop OpenAI.Codex 26.1007.2314.0 (bundled CLI 0.162.0-alpha.17.2), npm @openai/codex0.162.1 (stable, published 2026-10-09), [windows] sandbox = "elevated".
With the desktop app running, codex sandbox -- cmd /c echo hi from the npm CLI fails with helper_unknown_error: setup refresh had errors. The sandbox log shows os error 32 on cua_node\…\swift\x64\VCRUNTIME140_1.dll (loaded by codex-computer-use-swift.exe) and on node_repl.exe. With the desktop app fully quit, the same command works.
Disabling plugins, computer_use, browser_use and the node_repl MCP server in the CLI's profile does not help: the files are held by the desktop app's own processes, and the CLI's setup still validates that runtime.
Workaround confirmed for the CLI with the desktop app open: [windows] sandbox = "unelevated" (or -c windows.sandbox=unelevated). Commands run, writes inside the workspace succeed, and writes outside it are still denied (Access is denied.). A full codex exec with -s workspace-write also completes normally.
Additional confirmed case: Windows sandbox fails in npm CLI and OpenResearch while Codex Desktop Shell succeeds
Environment
Windows 11 x64
Codex Desktop: 26.1007.71326
Bundled CLI: codex-cli 0.162.0-alpha.17.2
npm CLI: codex-cli 0.162.1
OpenResearch: 0.2.18
Windows sandbox: elevated
Symptoms
Codex Desktop can run Shell commands successfully.
The standalone npm CLI and OpenResearch fail with:
helper_unknown_error: setup refresh had errors
-The standalone CLI also reports: helper_sandbox_lock_failed:SetNamedSecurityInfoW sandbox dir failed: 5
Reproduction
Start Codex Desktop.
Start OpenResearch.
Run:
codex sandbox -- cmd /d /c echo hello
The command fails in the standalone CLI, while an equivalent Shell command in Codex Desktop succeeds.
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Oct 8, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
niuniuniu0311 commentedon Oct 9, 2026
Additional reproduction and verified workaround on 2026-10-09.
Environment verified locally:
Ordinary local file-reading commands failed before PowerShell could start, with:
The dated sandbox log repeatedly reported:
The same read command succeeded outside the sandbox using approved host execution.
New helper processes appeared after application restarts, and the failure recurred. Stopping only the two processes running this exact node_repl.exe let validation progress further, but it then failed with the same sharing violation on:
After stopping the remaining executables under this exact runtime directory, codex-computer-use-swift.exe appeared again and the DLL validation failure recurred. These observations do not establish the exact conflicting handle or the underlying implementation defect.
Verified workaround: once config.toml contained [windows] sandbox = "unelevated", two successive ordinary local shell calls successfully read existing files without host-execution escalation. The sandbox log recorded SUCCESS at 2026-10-09 09:20 local time (Asia/Shanghai). This verifies shell/file reading only; browser/computer-use recovery was not tested, and elevated mode has not been shown to recover.
Please identify a supported fix or release that restores elevated sandbox initialization while its own runtime helpers are running. No manual ACL changes or runtime-binary replacements were used. Personal paths, credentials, and full session logs have been omitted.
tmc642584851-cyber commentedon Oct 9, 2026
Additional matching report (2026-10-09): Windows packaged app
OpenAI.Codexversion26.1002.7124.0(Get-AppxPackagestatusOk). Previously working client suddenly displayed “Windows setup didn’t finish / Setup stopped”; clicking Retry did not show a UAC prompt.Repeated entries in
~/.codex/.sandbox/sandbox.2026-10-09.log:Observed workaround for this case: completely quit Codex, inspect/terminate residual
node_repl.exeprocess(es) with no active jobs, and reopen the app. The Windows setup warning no longer appeared; a subsequent local desktop.txtfile-creation task succeeded. This is evidence of recovery of basic file operations, not a full validation of elevated sandbox isolation. No ACL changes, runtime deletion, or reinstall performed. Paths and identifying details redacted.Please investigate a possible race between sandbox ACL refresh and live computer-use/node_repl runtime processes, and whether setup could retry gracefully on sharing violations.
tmc642584851-cyber commentedon Oct 9, 2026
Additional confirmed case on 2026-10-09 (China time), Codex Windows package
OpenAI.Codex 26.1002.7124.0(package status: Ok).Symptoms:
Recovery observed:
codex/node_replprocesses.node_repl.exeprocesses (after checking no important tasks were running), then reopen Codex.This appears to be a transient file-sharing/ACL refresh collision with an active computer-use runtime. The exact lock holder and underlying lifecycle race are not yet proven. This workaround resolved the user's immediate symptoms without reinstalling or changing ACLs. Paths/user identifiers omitted for privacy.
jmaher-fas commentedon Oct 11, 2026
Additional data point: the standalone npm CLI is affected too, not just the app's bundled executor.
OpenAI.Codex26.1007.2314.0 (bundled CLI 0.162.0-alpha.17.2), npm@openai/codex0.162.1 (stable, published 2026-10-09),[windows] sandbox = "elevated".codex sandbox -- cmd /c echo hifrom the npm CLI fails withhelper_unknown_error: setup refresh had errors. The sandbox log shows os error 32 oncua_node\…\swift\x64\VCRUNTIME140_1.dll(loaded bycodex-computer-use-swift.exe) and onnode_repl.exe. With the desktop app fully quit, the same command works.computer_use,browser_useand thenode_replMCP server in the CLI's profile does not help: the files are held by the desktop app's own processes, and the CLI's setup still validates that runtime.rust-v0.162.1(GitHub compare reportsdiverged), but is included inrust-v0.163.0-alpha.5.[windows] sandbox = "unelevated"(or-c windows.sandbox=unelevated). Commands run, writes inside the workspace succeed, and writes outside it are still denied (Access is denied.). A fullcodex execwith-s workspace-writealso completes normally.christina-fake commentedon Oct 14, 2026
Additional confirmed case: Windows sandbox fails in npm CLI and OpenResearch while Codex Desktop Shell succeeds
Environment
Symptoms
-The standalone CLI also reports: helper_sandbox_lock_failed:SetNamedSecurityInfoW sandbox dir failed: 5
Reproduction
codex sandbox -- cmd /d /c echo hello
The command fails in the standalone CLI, while an equivalent Shell command in Codex Desktop succeeds.