Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.930.3930.0 (bundled CLI 0.160.0)
What subscription do you have?
Unknown; signed-in desktop account
What platform is your computer?
Windows 11 Home 25H2, build 26200.9457, x64
What issue are you seeing?
Codex Desktop fails before starting PowerShell when a sandboxed command needs existing filesystem grants. The command never runs. The app reports:
MXC launcher: failed to create the process security environment: CreateProcessSecurityEnvironment failed (HRESULT = 0x80070002)
This blocks ordinary project file reads and shell work. The failure persists after an app restart and Windows component repair. No credentials, personal paths, or raw logs are included in this report.
What steps can reproduce the bug?
- On Windows 11 Home 25H2 (build 26200.9457), use Codex Desktop 26.930.3930.0 with a local workspace and normal restricted filesystem grants.
- The user config specifies
[windows] sandbox = "elevated"and[features] prefer_mxc = false; restart Desktop. In the observed Desktop session, MXC is still selected. - Invoke
exec_commandwith a harmless PowerShell read of an existing local text file. - Observe the error above before PowerShell starts. A minimal MXC test with two existing read-only filesystem grants reproduces it; an empty PSEC policy succeeds.
- DISM RestoreHealth completed and CheckHealth is clean, but the same grant-bearing test still fails.
What is the expected behavior?
A sandboxed command should start and honor the requested filesystem permissions, or Desktop should select a supported backend / return an actionable configuration error. The user-configured backend should not silently be overridden without a supported way to recover.
Additional information
Read-only ProcessModel tracing associated the failure with sandboxfilesystem.cpp:680 during AppInfo setup; this is an observation, not a proven root cause. Full-access shell execution works, but is not an acceptable fix for restricted sandbox operation. BFS service state was Auto/Stopped and one elevated start returned Error 5; its causal role is unproven. No app patch, ACL change, or security bypass was made. Please advise a supported Desktop backend selection or specific additional diagnostics needed.
Activity
leechanju09050320-ui commentedon Oct 5, 2026
Update after further troubleshooting (2026-10-05): Windows app Repair, app Reset, uninstall/reinstall from the official Microsoft Store listing, and a full Windows restart have all been completed. The same error still occurs before PowerShell starts when running a harmless read-only
Get-Locationcommand from Codex Desktop:CreateProcessSecurityEnvironment failed (HRESULT = 0x80070002). We did not change ACLs or disable sandbox protection. The available sandbox log did not provide a new causal diagnostic for these retests. Please advise a supported next diagnostic or fix; we will avoid repeating resets/reinstalls without new evidence.Danieljedi11 commentedon Oct 5, 2026
I can reproduce what appears to be the same MXC failure on another Windows system.
Codex Desktop: 26.930.4958.0
Bundled CLI: 0.160.0
Windows: Microsoft Windows NT 10.0.26300.0 x64
A simple
Get-Locationfails before PowerShell starts.One additional diagnostic may be useful:
G:andH:mounted,CreateProcessSecurityEnvironmentfails with HRESULT0x8007000F.G:andH:disappear, the same MXC failure still occurs, but the HRESULT changes to0x80070002.0x8007000F.I also confirmed that Codex Desktop launches
codex.exe app-serverwith-c features.prefer_mxc=true. Setting[windows] sandbox = "unelevated"did not prevent MXC from being selected.Inspection of the installed Desktop JavaScript traced the
preferMxcpreference to Statsig gate ID93596649, although I could not determine which remote evaluation rule or rollout is enabling it.Windows is fully updated, the PC has been rebooted, and Microsoft Store reports no Codex update available.
Danieljedi11 commentedon Oct 5, 2026
One additional observation: the terminal opened manually from Codex Desktop works normally. PowerShell starts successfully and reaches the prompt. The failure only occurs when the Codex agent attempts to execute a terminal command through the sandbox. This further suggests that the problem is specifically in the MXC sandbox/process security environment initialization rather than PowerShell or terminal execution itself.
ShivaPriyanShanmuga commentedon Oct 10, 2026
I can reproduce this issue on Windows 11 Home Single Language 25H2 (OS build 26200.9457), Codex 26.1007.21434 (build 13901, production channel).
Both browser control and basic sandboxed shell commands such as Get-Location fail with CreateProcessSecurityEnvironment failed (HRESULT = 0x80070002).
Restarting Windows and Codex did not resolve the issue. The app reports that it is up to date.
Is there a supported fix or workaround for this version?
Danieljedi11 commentedon Oct 10, 2026
Update: My issue is now resolved.
I uninstalled the McAfee applications from my Windows computer and restarted the system. After the restart, Codex Desktop started working normally again, including sandboxed terminal commands that had previously failed with "CreateProcessSecurityEnvironment failed".
I cannot confirm whether removing McAfee directly resolved the issue or whether the timing coincided with an update or another change.
However, this was the action immediately preceding the successful test, so I'm sharing it in case it helps others investigate a possible conflict between McAfee and the MXC sandbox.
I've also reported this finding directly to OpenAI Support.
ShivaPriyanShanmuga commentedon Oct 10, 2026
Update: The fix worked @Danieljedi11
Thanks
cghchong commentedon Oct 12, 2026
Additional reproduction with the current Windows desktop browser-control path (2026-10-12):
cua.getState()fails before the Node kernel starts:CreateProcessSecurityEnvironment failed (HRESULT = 0x80070002). This is not limited to shell commands.:minimalread access, or only one existing local directory with read access, reproduces 0x80070002. That narrows the trigger to filesystem grants.elevatedCLI probe succeeds. The saved configuration is[windows] sandbox = "elevated"and[features] prefer_mxc = false, but Desktop launches the browser tool through MXC. In a temporary managed-policy test,windows.allow_mxc = falsemade browser control reject explicitSome(Mxc)rather than fall back; the temporary policy was removed immediately.Could maintainers advise a supported fallback for Browser/Computer Use to the configured
elevatedbackend, or a fix/diagnostic for PSEC filesystem grants? A desktop app restart, browser-kernel reset, and sandbox-service restart did not help.denelon commentedon Nov 5, 2026
A Microsoft MXC issue explicitly cites this report as another occurrence of the same HRESULT under different conditions:
Both reports observe
CreateProcessSecurityEnvironmentfailing with0x80070002before the child process starts. This Codex report narrows its reproduction to policies containing filesystem grants, while the MXC issue describes a session-0 batch-logon caller using a policy with no explicit filesystem grants. The matching HRESULT therefore establishes a useful diagnostic correlation, but the different caller contexts and policy contents do not establish a common root cause.Drafted with GitHub Copilot assistance.
cghchong commentedon Nov 5, 2026