Repository navigation
Description
What version of Codex CLI is running?
codex-cli 0.166.0
What subscription do you have?
ChatGPT Plus
Which model were you using?
N/A — failure occurs before model execution
What platform is your computer?
Windows 11 Home 26H2 (OS Build 26300.9711), x64
What terminal emulator and version are you using (if applicable)?
Windows PowerShell (Windows console)
Codex doctor report
codex doctor was run using CLI 0.166.0. Summary: 22 OK, 1 idle, 4 notes, 2 warnings, 0 failures; overall status degraded. Installation, authentication, networking, and state database checks passed. The sandbox was reported as provisioned, but actual MXC process creation fails.What issue are you seeing?
Codex CLI cannot execute commands when the Windows MXC sandbox is selected. The same failure also occurs in the ChatGPT desktop application.
Error:
MXC launcher: failed to create the process security environment:
CreateProcessSecurityEnvironment failed (HRESULT = 0x80070020)
The failure occurs even with a harmless echo command. MXC availability is reported as true, but command execution fails.
What steps can reproduce the bug?
- Open Windows PowerShell on Windows 11 Home 26H2.
- Run:
codex -c windows.sandbox=mxc sandbox --include-managed-config --permission-profile :workspace -- cmd.exe /d /c echo MXC_OK - Observe that MXC fails during security-environment creation with HRESULT 0x80070020.
- Repeat in the ChatGPT desktop application using a simple local command; the same MXC error occurs.
What is the expected behavior?
The Windows MXC sandbox should initialize successfully and execute the command, printing MXC_OK. Local command execution should work in both Codex CLI and the desktop application while maintaining the intended sandbox security protections.
Additional information
Environment:
- Codex CLI: 0.166.0
- Node.js: 24.15.0
- ChatGPT desktop About version: 26.1027.30824 (released 2026-10-30)
- CPU: Intel Core i7-14700; RAM: 32 GB
- UEFI virtualization and VT-d: enabled
- Hypervisor present; VBS running
- Existing config includes [windows] sandbox = "elevated"
Sandbox log:
MXC availability: true
Windows sandbox selection: mxc
The CLI accepts elevated, unelevated, and mxc as Windows sandbox variants.
A separate test using windows.sandbox="unelevated" successfully printed SANDBOX_TEST_OK. However, other tests produced a Windows stdio non-UTF-8 output-forwarding error. This is a separate symptom and the isolation properties of unelevated have not been verified.
No Windows security features were disabled. The desktop update checker reports that the application is up to date.
Please advise on MXC diagnostics, a secure repair procedure, or a supported isolated workaround.
Potentially related issue: #55950
This issue differs from #55950 in two important ways:
- The HRESULT is 0x80070020 rather than 0x80070003.
- MXC command execution fails in both Codex CLI and the desktop application, whereas Codex Desktop Windows: MXC sandbox fails with 0x80070003 while CLI works #55950 reports that MXC works in the CLI.
The failures may share a security-environment initialization path, but a common root cause has not been established.
Activity
github-actions commentedon Nov 2, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
sakaeru1224 commentedon Nov 2, 2026
Additional finding: Issue #58007 documents a reproducible Windows file-sharing conflict that causes MXC security-environment creation to fail with HRESULT 0x80070020.
My environment matches the reported Windows 11 Home 26H2 build 26300.9711, and the HRESULT is identical.
I have not yet identified a conflicting file handle on my system, so I cannot confirm that the root cause is the same.
Please consider this potential connection when investigating Issue #58833. I would appreciate guidance on safe, read-only diagnostics to identify any conflicting file handles without weakening Windows security protections.