Repository navigation
Description
Summary
On Windows, the sandboxed command channel becomes unusable while the app-tools MCP server is running. Every sandboxed (non-escalated) command is rejected with:
Failed to create unified exec process: helper_unknown_error: setup refresh had errors
.codex/.sandbox/setup_error.json contains:
{ "code": "helper_unknown_error", "message": "setup refresh had errors" }Root cause (from the sandbox log)
setup refresh fails at the runtime read/execute validation step:
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 file is being used by another process (os error 32)
os error 32 = ERROR_SHARING_VIOLATION. The file is held open by the app-tools MCP server, which runs from that very runtime:
cmd.exe /d /s /c call ./scripts/launch_codex_app_tools_mcp.cmd ./server.mjs
node.exe ./server.mjs <- executable: ...\runtimes\cua_node\<hash>\bin\node.exe
Because setup refresh returns a non-zero status, the whole sandbox channel is rejected.
Steps to reproduce
- Launch Codex desktop on Windows 11 (build 10.0.26200, Chinese locale).
- Wait until the app-tools MCP server starts (in my environment it comes up about 1 minute after the app launches; it also comes back later on its own).
- Run any command in the sandboxed channel.
Expected: the command runs in the sandbox.
Actual: helper_unknown_error: setup refresh had errors, and .codex/.sandbox/setup_error.json is written.
Workaround that works
Terminate the app-tools MCP node.exe (and its cmd.exe parent): the next sandboxed command succeeds immediately and setup_error.json is removed. The problem comes back as soon as that MCP server is started again. Restarting the app does NOT help, because the MCP server is respawned on launch.
Frequency
Recurring, not a one-off:
.codex/.sandbox/sandbox.2026-09-18.log: 132 occurrences of the same validation failure.codex/.sandbox/sandbox.2026-10-09.log: dozens of occurrences
Expected fix
setup refresh should not require an exclusive ACL write on a runtime executable that the product itself keeps running. For example: skip/reuse ACLs when the target is already in use, set ACLs before the MCP server starts, or use a separate copy of the runtime for sandbox validation.
Environment
- Codex desktop app on Windows 11 Pro (10.0.26200), Chinese locale
- Sandbox command runner:
codex-command-runner-0.162.0-alpha.2.exe - Relevant files:
%LOCALAPPDATA%\Codex\Logs\...,%USERPROFILE%\.codex\.sandbox\sandbox.<date>.log,%USERPROFILE%\.codex\.sandbox\setup_error.json
Activity
github-actions commentedon Oct 9, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
windows.sandbox = "elevated"provisioning always fails withhelper_unknown_error: setup refresh had errorsbecause the bundled app-tools node.exe is in use #52041node_repl.exeis running (OS error 32) #52389Powered by Codex Action
huoxixi842-ui commentedon Oct 9, 2026
I’m experiencing a similar failure on Windows with desktop app version 26.1002.52244.
All local command attempts fail with:
helper_unknown_error: setup refresh had errorsSandbox logs show
os error 32when updating ACLs fornode_repl.exeandswift\x64\VCRUNTIME140_1.dllinside the Codexcua_noderuntime. Process Explorer confirmed that acodex-computer-*process had loaded the affected DLL.I have tried exiting the app, terminating the identified processes, rebooting Windows, and setting
windows.sandboxto bothelevatedandunelevated. The failure persists. Task Manager shows the Codex backend is elevated.Is there a verified workaround or a planned fix? I also cannot find the documented “Agent environment” setting to switch to WSL in this app’s UI.
derevopalet-alt commentedon Oct 9, 2026
Adding a locally verified recovery report, including a compatibility pitfall when trying a newer CLI override.
Environment
Observed sequence
However, web-tool requests still failed with the same unsupported field at input[0]. The setting alone was not a complete fix.
4. We replaced the override with the official, signed CLI 0.162.0-alpha.20, retained content_item_kinds=false, and fully restarted the desktop app. We verified the active executable versions after restarting.
Observed recovery
Relevant upstream fix and tested release
Interpretation and limits
The metadata rejection is consistent with a compatibility mismatch between the manually selected newer alpha CLI and this desktop/service combination. We have not established which exact service boundary rejects the field. Binary strings alone are not proof of serialization behavior; the request rejection is the behavioral evidence.
The tested workaround combines a CLI change, retained feature setting, and full restart. Their individual contributions were not isolated. We did not test alpha.20 with content_item_kinds enabled.
This is a local observation, not a supported general upgrade recommendation. Long-term stability, native desktop automation, external Chrome control, and paid video generation were not verified.
Suggested maintainer follow-up
This report contains no project files, credentials, account identifiers, user-specific filesystem paths, full conversation transcript, or raw diagnostic logs.
EP-PBednarczyk commentedon Oct 9, 2026
Changing [windows] sandbox from "elevated" to "unelevated" and
restarting Codex restored terminal execution. git status --short
now completes successfully with exit code 0.
However, this is a workaround, not a fix. After the update,
Codex could not run any terminal commands, and restarting both
Codex and Windows did not help.
I am frustrated that an application update required manual editing
of config.toml to restore basic functionality. Users should not
have to diagnose runtime file locks or change sandbox mode after
an update.
Please keep the underlying bug tracked and provide an official fix
for elevated sandbox mode. Please also confirm when it is safe to
restore sandbox = "elevated".
EP-PBednarczyk commentedon Oct 9, 2026
I restored terminal execution only by manually editing:
%USERPROFILE%.codex\config.toml
I had to change:
[windows]
sandbox = "elevated"
to:
[windows]
sandbox = "unelevated"
After saving the file and restarting Codex, git status --short
completed successfully with exit code 0.
Restarting Codex and Windows alone had not resolved the problem.
I am frustrated that a Codex update broke basic terminal functionality
and required me to locate and manually edit an internal configuration
file. This should not be necessary after an application update.
This is a workaround, not a fix for elevated sandbox mode.
Please track the underlying bug, provide an official fix, and confirm
when users can safely restore sandbox = "elevated".
EP-PBednarczyk commentedon Oct 9, 2026
I restored terminal functionality myself using the following workaround:
Completely close Codex.
Open %USERPROFILE%.codex\config.toml in Notepad.
Find the existing section:
[windows]
sandbox = "elevated"
Change it to:
[windows]
sandbox = "unelevated"
Save the file and restart Codex.
Run git status --short to verify terminal execution.
The command now completes successfully with exit code 0.
Restarting Codex and Windows without this configuration change
did not resolve the problem.
However, users should not have to manually edit configuration files
to restore basic functionality after a Codex update. The update left
the terminal unusable until I applied this workaround.
Please provide an official fix for elevated sandbox mode and confirm
when it is safe to restore sandbox = "elevated".