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
codex 的一些小问题,希望官方看到后能够进行修复优化 windows.sandbox = "elevated" provisioning always fails with helper_unknown_error: setup refresh had errors because the bundled app-tools node.exe is in use #52041
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems
Antivirus: Microsoft Defender only (no third-party AV active)
With [windows] sandbox = "elevated", every command execution and file write in a sandboxed
permission profile fails before the command starts:
Failed to create unified exec process: helper_unknown_error: setup refresh had errors
"Full access" mode works, because it skips sandbox provisioning. This makes the restricted
profiles (read-only / workspace-write) completely unusable.
codex doctor output (relevant part)
✗ sandbox elevated Windows sandbox provisioning recorded a structured failure
sandbox backend elevated
sandbox provisioning failed
error code helper_unknown_error
→ repair or reinstall the Codex CLI from an approved distribution
%USERPROFILE%\.codex\.sandbox\setup_error.json:
{ "code": "helper_unknown_error", "message": "setup refresh had errors" }
%USERPROFILE%\.codex\.sandbox\sandbox.<date>.log` shows the failing step:
setup refresh: spawning ...\codex-windows-sandbox-setup.exe (payload_len=3852)
read-acl-only mode: applying read ACLs
read ACL run completed
runtime read/execute validation failed: validate runtime read/execute access on
C:\Users<user>\AppData\Local\OpenAI\Codex\runtimes\cua_node<hash>\bin\node.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
That `node.exe` is running the bundled `codex-app-tools` MCP server, started by the app server:
A running executable cannot be opened for `WRITE_DAC`, so provisioning fails on every single
command. The app restarts that helper continuously, so it never recovers on its own.
Workaround (confirmed working)
Set the Windows sandbox backend to the user-mode one:
```toml
[windows]
sandbox = "unelevated"
After restarting the app, codex doctor reports ✓ sandbox, restricted profiles work, and the
sandbox still enforces its boundaries (writes outside the writable roots are denied).
Trade-off: the elevated-only capabilities (deny-read overrides, managed networking) are lost.
Suggested fix
Make the sandbox provisioning tolerate files that are in use: skip the ACL update when STATUS_SHARING_VIOLATION / os error 32 is returned, or validate read/execute access by
another means (e.g. AccessCheck / opening for READ_CONTROL instead of WRITE_DAC).
Alternatively stop validating runtime helpers that are currently executing, or run the
bundled MCP node from a location that is excluded from ACL management.
Additional reproduction on Windows 10 Pro (build 19045), 2026-10-09. The user reports that the desktop app has no available update.
User config: [windows] sandbox = "elevated".
Even a read-only workspace file check fails before PowerShell starts with helper_unknown_error: setup refresh had errors. Switching between PowerShell and CMD and changing the working directory did not change the result. A separately approved command outside the sandbox works.
The dated sandbox log records runtime read/execute validation failed while opening the bundled cua_node/.../bin/node.exe for a root-only ACL update: Windows sharing violation, os error 32. Earlier attempts also named node_repl.exe.
The exact node.exe reported in the log was running when checked. Its process ancestry was codex.exe -> cmd.exe -> node.exe; it was not a project-installed Node binary.
Repeated retries still fail. No runtime files, ACLs, or sandbox settings were modified during diagnosis.
This adds a Windows 10 Pro reproduction with a verified Codex-owned process tree to the existing report. Related Windows 10 report: #52103.
This also reproduces with [windows] sandbox = "unelevated".
On Windows, exec_command fails before running even Write-Output ok with:
helper_unknown_error: setup refresh had errors
The sandbox log says:
read-acl-only mode: applying read ACLs
read ACL run completed
runtime read/execute validation failed: validate runtime read/execute access on ...\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node.exe: open ACL target for root-only update: ... (os error 32)
The same node.exe is running ./server.mjs while Codex is open. It exits when Codex closes and starts with a new PID when Codex reopens. Rebooting Windows does not resolve it. No Codex update is currently offered.
I can reproduce this issue on Windows 11 Pro x64 (build 26200) with Codex CLI 0.162.1.
The elevated Windows sandbox fails with helper_unknown_error: setup refresh had errors. The sandbox log confirms os error 32 during ACL validation of node_repl.exe, and an earlier attempt failed on VCRUNTIME140_1.dll.
Running codex.cmd sandbox -- cmd.exe /c echo SANDBOX_OK can succeed, but executing even git rev-parse HEAD from an interactive Codex session fails.
Updating Codex CLI and the desktop app, restarting Windows, stopping the background daemon, and trying --no-daemon did not resolve interactive execution.
I have not disabled sandbox protections or switched to the unelevated backend.
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
AlbertAlter commentedon Oct 9, 2026
Additional reproduction on Windows 10 Pro (build 19045), 2026-10-09. The user reports that the desktop app has no available update.
[windows] sandbox = "elevated".helper_unknown_error: setup refresh had errors. Switching between PowerShell and CMD and changing the working directory did not change the result. A separately approved command outside the sandbox works.runtime read/execute validation failedwhile opening the bundledcua_node/.../bin/node.exefor a root-only ACL update: Windows sharing violation,os error 32. Earlier attempts also namednode_repl.exe.node.exereported in the log was running when checked. Its process ancestry wascodex.exe -> cmd.exe -> node.exe; it was not a project-installed Node binary.This adds a Windows 10 Pro reproduction with a verified Codex-owned process tree to the existing report. Related Windows 10 report: #52103.
MRXUG commentedon Oct 9, 2026
This also reproduces with [windows] sandbox = "unelevated".
On Windows, exec_command fails before running even
Write-Output okwith:helper_unknown_error: setup refresh had errors
The sandbox log says:
read-acl-only mode: applying read ACLs
read ACL run completed
runtime read/execute validation failed: validate runtime read/execute access on ...\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node.exe: open ACL target for root-only update: ... (os error 32)
The same node.exe is running
./server.mjswhile Codex is open. It exits when Codex closes and starts with a new PID when Codex reopens. Rebooting Windows does not resolve it. No Codex update is currently offered.eminmhmt7 commentedon Oct 10, 2026
I can reproduce this issue on Windows 11 Pro x64 (build 26200) with Codex CLI 0.162.1.
The elevated Windows sandbox fails with
helper_unknown_error: setup refresh had errors. The sandbox log confirmsos error 32during ACL validation ofnode_repl.exe, and an earlier attempt failed onVCRUNTIME140_1.dll.Running
codex.cmd sandbox -- cmd.exe /c echo SANDBOX_OKcan succeed, but executing evengit rev-parse HEADfrom an interactive Codex session fails.Updating Codex CLI and the desktop app, restarting Windows, stopping the background daemon, and trying
--no-daemondid not resolve interactive execution.I have not disabled sandbox protections or switched to the unelevated backend.