Repository navigation
Windows sandbox provisioning always fails: setup tries to ACL runtime binaries Codex itself is executing (os error 32) #52735
Description
Activity
- addedbugSomething isn't workingSomething isn't workingappIssues related to the Codex desktop appIssues related to the Codex desktop appwindows-osIssues related to Codex on Windows systemsIssues related to Codex on Windows systemssandboxIssues related to permissions or sandboxingIssues related to permissions or sandboxing
on Oct 10, 2026 github-actions commented
on Oct 10, 2026 on Oct 10, 2026 – with GitHub ActionsContributorMore actionsPotential duplicates detected. Please review them and close your issue if it is a duplicate.
- Windows sandbox is permanently unusable: setup refresh races the app's own runtime helpers and always fails with ERROR_SHARING_VIOLATION #52566
- Windows sandbox provisioning fails with os error 32 when any runtime file is in use (0.162.0-alpha.2 regression) #51634
- Windows app 26.1002.51308: sandbox setup fails with sharing violation when validating its own active runtime #51601
- Windows 10: setup refresh had errors — sandbox setup cannot set the ACL on a running node_repl.exe (os error 32), provisioning stays failed forever #52554
- Windows sandbox setup refresh fails with os error 32 (sharing violation) on running node_repl.exe — structural start-order conflict between cua_node runtime and ACL validation #52501
Powered by Codex Action
Additional independent reproduction (Windows 11, zh-CN; 2026-10-11 UTC+08:00). Local profile and runtime identifiers are redacted.
- Bundled CLI: codex-cli 0.162.0-alpha.2.
- Before workaround, config was [windows] sandbox = "elevated" with workspace-write permissions.
- Ordinary local commands failed before process creation with helper_unknown_error: setup refresh had errors.
- The sandbox log identifies the active Computer Use helper under %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node<runtime-id>\bin\node_modules@oai\sky\bin\windows\codex-computer-use.exe. The fatal error was: “open ACL target for root-only update: 另一个程序正在使用此文件,进程无法访问。 (os error 32)”.
- A read-only process inventory showed Codex-owned node.exe, node_repl.exe, and codex-computer-use.exe processes running from that same runtime while setup repeatedly failed.
- A one-shot command with windows.sandbox="unelevated" succeeded. After changing only the saved backend to unelevated, the same echo without an override succeeded too. This restores command execution while retaining sandboxing, with weaker isolation than elevated.
Could you confirm which supported Windows Desktop build will include the merged runtime ACL fix in #51822? This installation's bundled CLI is 0.162.0-alpha.2, and the failure is still reproducible.
Follow-up (2026-10-11): the desktop update checker currently reports installedVersion 26.1002.52244, build 13536, release channel prod, status restart_required. The desktop's ordinary exec_command still fails with the same setup refresh error after the saved windows.sandbox setting was changed to unelevated; a separate codex.exe sandbox probe without an override succeeds. This suggests the running desktop process has not picked up the saved config yet. Please confirm the supported desktop update/restart path and the first desktop build that bundles #51822.
Update after a full desktop restart (2026-10-11, UTC+08): the desktop unified exec still fails before process creation with
helper_unknown_error: setup refresh had errors; even a minimal read-only command and sandbox log read are rejected by the same setup error. The update checker reports installedVersion 26.1002.52244, build 13536, channelprod, statusrestart_required. This confirms the issue persists after restart; the previous note that the running desktop may not have picked up config was only a hypothesis and is superseded. The separately invoked bundled CLI probe with savedwindows.sandbox = "unelevated"succeeds, so the failure is specific to the desktop execution/setup path. Could maintainers confirm the supported recovery/update path and which Desktop build includes merged PR #51822?New local validation (2026-10-11, UTC+08): the official
0.162.0-alpha.20Windows release archive matched its published SHA-256, and the CLI Authenticode signature is valid for OpenAI OpCo, LLC. With the Codex Desktop 26.1002.7124.0 process and its runtime helpers still running, the alpha.20 CLI completed a sandboxed command successfully withwindows.sandbox=elevated; a second probe also succeeded using the saved elevated config. The Desktop built-in executor remains on0.162.0-alpha.2and still fails withhelper_unknown_error: setup refresh had errors. This confirms the newer fixed CLI can work on this installation while preserving the elevated sandbox; the remaining gap is the Desktop-managed runner/update path. Could you confirm whetherCODEX_CLI_PATHis a supported override for the Store Desktop app and which signed production Desktop build will include #51822? A community report says alpha.20 may require[features] content_item_kinds = falsefor Desktop protocol compatibility (#52488); this should be documented if that remains the recommended interim route.Correction and channel-specific validation (2026-10-11, UTC+08):
The independently reproduced host is Windows 10 Pro 22H2, build 19045.6466, confirmed by registry, CIM, and .NET. My earlier Windows 11 wording was incorrect.
With the saved [windows] sandbox = "unelevated" configuration:
- The actual CUA/browser-control tool starts. An isolated loopback HTTP test passed reading, input, clicking, and visible result verification without restarting Desktop.
- GitHub native accessibility reading timed out at the default tool limit; the documented Playwright DOM snapshot successfully read this issue.
- Desktop unified exec still fails before command creation with helper_unknown_error: setup refresh had errors.
- The existing standalone CLI passes an elevated sandbox echo probe.
This is a temporary workaround with weaker isolation, not confirmation that all Desktop channels are fixed. Please confirm the first signed production Windows Desktop package containing #51822 and the supported Desktop recovery path. No business-page content, account information, or raw logs are attached.
Bug report: Windows sandbox setup fails because Codex's own helpers occupy the runtime binaries it tries to ACL
Suggested title:
Windows sandbox provisioning always fails: setup tries to update ACLs on runtime binaries that Codex itself is executing (os error 32)Summary
On Windows, the sandboxed (default / "ask for approval") execution mode is unusable: every command fails with
The sandbox provisioning step (
codex-windows-sandbox-setup.exe) aborts because it cannot open runtimeexecutables for an ACL update while those same executables are running:
Windows does not allow modifying the security descriptor of a file that is currently mapped as an image
(a running executable). Because Codex itself launches several helper processes out of that same runtime
directory, this is a permanent conflict, not a transient race.
Environment
~/.codex/config.toml→[windows] sandbox = "elevated"; default permission profile (workspace-write)codex doctorreportsno supported endpoint protection detected)Steps to reproduce
echo hi.helper_unknown_error: setup refresh had errors.Reproduced consistently across app restarts, and also on a fresh install.
Evidence
~/.codex/.sandbox/sandbox.<date>.log— the provisioning run aborts on the runtime validation:Processes running out of the same runtime directory at that moment (all launched by the app itself):
The failure target moves between files as different helpers start and stop — we first observed it on
bin\node.exe, later onbin\node_repl.exe— which confirms the mechanism: whichever runtime binaryCodex is currently executing cannot also be ACL-updated by the setup step.
The ACL itself is already correct on these files (
BUILTIN\Users/CodexSandboxUsersalready have inheritedread+execute), so the update is not needed for correctness — but the code path still treats the failed open
as fatal.
Root cause
codex-windows-sandbox-setup.exeperforms a fatal "runtime read/execute validation" that opens each runtimebinary with a root-only ACL update (
WRITE_DAC). For a running image that open fails withERROR_SHARING_VIOLATION (32). Since the app always keeps helper processes alive from thecua_noderuntime(the app-tools MCP server, the node REPL server, the cua-repl server, computer-use helper), the provisioning
step has no reliable window in which it can succeed.
Suggested fix
ERROR_SHARING_VIOLATION/ERROR_ACCESS_DENIEDduring the runtime ACL validation as non-fatalwhen the effective ACL already grants the required read/execute access (i.e., verify access instead of
unconditionally re-applying it).
e.g. run the MCP servers/helpers from the primary runtime bundle (
~/.cache/codex-runtimes/...), orcopy the sandbox runtime binaries to a per-provisioning location.
Workaround (user side)
normally — that path does not perform provisioning.
within minutes. Not a stable workaround.
Notes
AppxManifest.xmldeclares only<Resource Language="en-US" />, while thepackage ships
locales/zh-CN.pakandnative-menu-locales/zh-CN.json; the UI therefore stays English on aChinese system even with
[desktop] localeOverride = "zh-CN"set. (Separate issue, may be worth a look.)codex doctoron this machine reports:✗ sandbox elevated Windows sandbox provisioning recorded a structured failure.