Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Codex CLI 0.161.0
What subscription do you have?
Pro 5X
What platform is your computer?
Win 11
What issue are you seeing?
Hello OpenAI Support,
I'm reporting a reproducible Windows Codex execution failure that prevents me from using Codex in VS Code or the standalone CLI.
Environment
- Windows 11 Pro, build 26300, x64
- Codex CLI 0.161.0
- VS Code Codex extension
openai.chatgpt-26.51002.51308-win32-x64 - Native Windows repository at
C:\dev\reclamation - Codex installed through npm; authenticated with ChatGPT
- Default Windows sandbox mode:
elevated
Primary failure — Elevated Windows sandbox
Every attempt to execute even a read-only command such as git status --short fails with:
helper_unknown_error: setup refresh had errors
The sandbox log provides the underlying error:
runtime read/execute validation failed:
validate runtime read/execute access on
C:\Users\root\AppData\Local\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)
Process Explorer shows node_repl.exe processes running from that same runtime location, including processes that appear and disappear automatically while Codex is idle or while typing a prompt, before submission.
Closing VS Code terminates these processes. The failure is consistent with a possible runtime initialization or executable-sharing conflict, although the underlying cause remains unconfirmed.
Secondary failure — Unelevated Windows sandbox
Changing [windows] sandbox to unelevated avoids the initial setup error but command execution fails with:
Failed to create unified exec process:
CreateProcessAsUserW failed: 5 (Access is denied.)
This was reproduced in standalone Codex CLI with --no-daemon, as well as through the VS Code workflow.
Troubleshooting already performed
- Updated Codex CLI to 0.161.0.
- Reinstalled the VS Code extension.
- Restarted Windows and performed a complete shutdown/cold startup.
- Regenerated Codex Node runtime files.
- Tested one VS Code window, including launching as Administrator.
- Verified both Codex sandbox accounts are enabled and members of
CodexSandboxUsers. - Checked local security-policy assignments and Defender event logs; no specific Defender block was identified.
- Confirmed Git and PowerShell execute normally outside Codex.
- Ran
codex doctor --json: installation, authentication, configuration, network, and databases pass. It reports a stale/unreachable app-server daemon and an MCP environment-variable warning.
Impact
Codex can authenticate and respond, but it cannot execute local commands. This completely blocks my established native Windows C++ development workflow.
A separate coding extension can execute commands successfully in the same repository and Windows environment.
Request
Please investigate the Windows sandbox runtime ACL refresh and process creation failures, especially the interaction between node_repl.exe and codex-windows-sandbox-setup.exe.
I would appreciate a supported workaround or confirmation of an upstream fix. I can provide redacted diagnostic reports, sandbox logs, and Process Explorer evidence.
Thank you.
What steps can reproduce the bug?
Steps to Reproduce
Environment
- Windows 11 Pro, build 26300, x64
- Codex CLI 0.161.0
- VS Code extension
openai.chatgpt-26.51002.51308-win32-x64 - Native Windows Git repository:
C:\dev\test-repository - ChatGPT authentication
- Windows sandbox modes tested:
elevatedandunelevated
Bug 1 — Elevated sandbox fails during initialization (Windows error 32)
- Close all VS Code windows and Codex sessions.
- Open
%USERPROFILE%\.codex\config.toml. - Configure:
[windows] sandbox = "elevated"
- Launch VS Code and open an existing local Git repository.
- Open the Codex chat extension.
- Submit:
Execute git status --short. Do not modify files. - Observe that command execution fails before Git starts.
Actual result:
helper_unknown_error: setup refresh had errors
The sandbox log shows:
runtime read/execute validation failed:
validate runtime read/execute access on
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<runtime-id>\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)
Process Explorer shows node_repl.exe instances launched from the same runtime directory. These processes can appear before a chat request is submitted and disappear shortly afterward.
The failure persists after restarting Windows, a complete shutdown, extension reinstallation, and launching VS Code as Administrator.
Bug 2 — Unelevated sandbox cannot create processes (Windows error 5)
- Close VS Code and Codex sessions.
- Change the configuration to:
[windows] sandbox = "unelevated"
- Open PowerShell and navigate to an existing local Git repository.
- Launch Codex without its shared daemon:
codex --no-daemon -c windows.sandbox="unelevated" --sandbox workspace-write --ask-for-approval on-request - Ask Codex to execute
git status --shortorgit log -1 --oneline.
Actual result:
Failed to create unified exec process:
CreateProcessAsUserW failed: 5 (Access is denied.)
The same Git commands execute successfully outside Codex.
Expected result
Codex should initialize the Windows sandbox and execute read-only Git commands without modifying repository files.
Additional findings
- Both Codex sandbox accounts exist, are enabled, and belong to
CodexSandboxUsers. codex doctor --jsonreports healthy installation, authentication, configuration, network connectivity, and state databases.- Doctor reports a stale/unreachable app-server daemon and an optional Node REPL MCP configuration warning.
- No corresponding Microsoft Defender block was identified.
- Another VS Code coding-agent extension successfully executes Git and PowerShell commands in the same environment.
- No successful workaround has been identified.
Available diagnostic evidence
- Windows sandbox setup log
- Redacted
codex doctor --jsonreport - Process Explorer screenshots showing Node REPL processes and executable paths
Request: Please investigate the runtime executable ACL/file-sharing conflict and the unelevated sandbox's CreateProcessAsUserW failure. A supported workaround or fix would be appreciated.
What is the expected behavior?
Codex should be able to interact with the repo at the CLI level. It cannot with this bug.
Additional information
No response
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