Skip to content

Codex for Windows: sandbox and browser tools fail to start #52547

Open

Description

@yarbabkin

App version: 26.1002.7124.0
Date: 9 October 2026

Sandboxed commands fail with:
“MXC launcher: failed to create the process security environment: CreateProcessSecurityEnvironment failed (HRESULT = 0x80070020)”

Browser automation also fails:
“node_repl kernel exited unexpectedly”
Later retries return:
“trusted Node process exited unexpectedly; kernel reset, rerun your request”

Reproduced with a basic Get-Date command and attempts to connect to an already-open in-app browser tab. The website itself opens normally.

Restarting Codex, resetting the tool kernel, restarting the Codex sandbox service, and fully restarting Windows did not resolve the issue. Windows restart was confirmed at 12:57 on 9 October.

This blocks document uploads and browser work. Please investigate and provide a fix that preserves sandbox protection.

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    tool-calls
    on Oct 9, 2026
  2. github-actions commented on Oct 9, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. yarbabkin commented on Oct 9, 2026

    @yarbabkin
    Author

    Issue #52042 appears to match the same MXC startup error (HRESULT 0x80070020). Issue #52263 concerns a separate Notion connector problem.

    The error still persists after a full Windows restart and attempting an app update through Microsoft Store. Both sandboxed commands and browser automation remain blocked.

    Could a maintainer confirm whether this is the same underlying issue as #52042 and provide a supported workaround or fix? Please let me know which diagnostics would help.

  4. starov-ai commented on Oct 10, 2026

    @starov-ai

    Additional reproduction and diagnostics from another Windows machine (tested 10 October 2026).

    Environment

    • Desktop app: 26.1007.21434, build 13901, prod (configured updater reported up to date during diagnosis).
    • Bundled/cached CLI: codex-cli 0.162.0-alpha.17.2.
    • Windows build: 26300.9457; registry DisplayVersion: 26H2.

    Controlled reproduction: broad root reads trigger MXC preparation failure

    Run from a dedicated project directory, not the user home directory:

    codex -c windows.sandbox=mxc sandbox --include-managed-config --permission-profile :workspace -- cmd.exe /d /c echo MXC_OK

    Result: exit 1, before the command executes:

    MXC launcher: failed to create the process security environment: CreateProcessSecurityEnvironment failed (HRESULT = 0x80070020)
    

    Using the same executable and working directory, a custom profile with :minimal read and :workspace_roots write succeeds under explicit MXC. Adding :root = read to that narrow profile reproduces the same failure. Explicit directory reads such as C:\Windows or the user profile directory also succeeded in the scoped tests.

    Minimal comparison profile (use in a test config with no conflicting legacy sandbox settings):

    [permissions.mxc-narrow.filesystem]
    ":minimal" = "read"
    
    [permissions.mxc-narrow.filesystem.":workspace_roots"]
    "." = "write"
    ".git" = "read"
    ".agents" = "read"
    ".codex" = "read"
    ".aws" = "read"
    
    [permissions.mxc-narrow.network]
    enabled = true

    Select it explicitly for the comparison:

    codex -c windows.sandbox=mxc sandbox --include-managed-config --permission-profile mxc-narrow -- cmd.exe /d /c echo MXC_NARROW_OK

    Process Monitor evidence

    Three traced codex.exe launchers using --__codex-windows-mxc recorded SHARING VIOLATION while opening these top-level files for attributes:

    • C:\DumpStack.log.tmp
    • C:\hiberfil.sys
    • C:\pagefile.sys
    • C:\swapfile.sys

    This is consistent with the root-policy comparison, but does not establish which internal operation returns the final HRESULT. Antivirus involvement has not been established. Denying those locked files was not a working workaround: MXC rejected the denied paths because it could not safely resolve the locked filesystem objects.

    Desktop selection and a separate profile compatibility trap

    The Desktop backend command line included -c features.prefer_mxc=true, overriding features.prefer_mxc=false in the user config. A local managed requirement [features] prefer_mxc=false made fresh ordinary-command launches use the configured legacy elevated sandbox. Standard :workspace then passed, including config reads, workspace file write/readback and dotnet startup.

    However, leaving the narrow mxc-project profile as default_permissions after forcing legacy selection caused a separate failure when resuming a chat:

    failed to load AGENTS.md instructions for environment local
    windows sandbox failed: elevated Windows sandbox requires effective `:root` read access
    

    This second regression was caused by our local diagnostic workaround, not demonstrated to be an app update regression. Removing the narrow default/profile and retaining standard workspace-write + elevated restored a fresh app-server thread/resume call for the affected chat. It would help to validate profile compatibility before selection/resume, or provide a recovery path when a profile becomes incompatible after implementation selection changes.

    Current status and requested investigation

    • Explicit MXC + :workspace still reproduces 0x80070020.
    • Ordinary commands work through standard :workspace + legacy elevated.
    • Earlier native browser/computer-use launches also failed with MXC 0x80070020. A current in-app-browser session now successfully loads pages and supports DOM interactions; this does not prove that native MXC or every previous browser session has recovered.
    • No protected system files were deleted, antivirus disabled, paging/hibernation settings changed, vendor binaries patched, or protective ACLs removed as a workaround.

    Please investigate broad :root expansion/preparation in MXC on this Windows build, particularly locked top-level system files, and whether browser/native tool launchers have a supported scoped policy or fallback. Please also clarify compatibility requirements for custom filesystem profiles under legacy elevated sandboxing.

    Raw machine-wide Procmon captures and full configs/transcripts are intentionally omitted because they can contain private data. This report contains the relevant technical observations only.

  5. ccsdk commented on Oct 12, 2026

    @ccsdk

    Additional reproduction on another Windows machine, tested 11 October 2026.

    Environment

    • Codex desktop installed package version: 26.1007.2314.0 (Windows AppX metadata).
    • Bundled CLI: 0.162.0-alpha.17.2.
    • Windows 11 Pro 25H2, build 26200.9550.

    Symptoms
    The browser/computer-use helper exits before it can enumerate Chrome tabs. A fresh runtime reset followed by await cua.getState(); returns:

    trusted Node process exited unexpectedly; kernel reset, rerun your request
    

    Earlier attempts also recorded kernel_status: exited(code=1), reason: stdout_eof, and the MXC error below. Ordinary sandboxed shell commands fail at the same startup stage.

    Reproduction independent of the browser
    Using the bundled executable, we ran the diagnostic documented at https://learn.chatgpt.com/docs/windows/windows-sandbox:

    codex -c windows.sandbox=mxc sandbox --include-managed-config --permission-profile :workspace -- cmd.exe /d /c echo MXC_OK

    We ran it from both the project directory and the Windows user Temp directory. Both returned exit code 1 before printing MXC_OK:

    MXC launcher: failed to create the process security environment: CreateProcessSecurityEnvironment failed (HRESULT = 0x80070020)
    

    Codex restarts, browser-helper resets and a full Windows restart did not resolve the failure. The Windows restart was independently confirmed through the OS boot timestamp.

    This supports a sandbox startup failure broader than a particular website or project working directory. We have not identified the locked resource or lock-owning process on this machine, and have not independently reproduced the narrow-versus-root policy comparison in the preceding comment. No persistent permissions, sandbox settings, or system files were changed during these checks.

    Could a maintainer advise a supported recovery path or a targeted diagnostic that identifies the resource causing CreateProcessSecurityEnvironment to return 0x80070020? Automatic comparison of authenticated web application fields remains blocked.

    Customer data, URLs, credentials, personal paths, raw logs and conversation transcripts are intentionally omitted.

  6. guseppe2026 commented on Oct 23, 2026

    @guseppe2026

    Additional confirmed reproduction — Windows 11 / Codex MXC / HRESULT 0x80070020

    Hello OpenAI Codex team,

    I am experiencing the same issue, consistently reproducible since October 8, 2026. After extensive diagnostics on October 23, I was able to isolate the failure to the MXC filesystem permission configuration.

    Environment:

    • Windows 11 Pro, build 26100
    • Codex Desktop: 26.1016.8622.0
    • Bundled Codex CLI: 0.163.0-alpha.11.2
    • Codex Sandbox Service: Running
    • Standard Windows CMD and PowerShell process creation: PASS

    Diagnostic results:

    1. Direct invocation of the bundled Codex CLI using the default :workspace permission profile fails, even when executing a simple cmd.exe /d /c echo MXC_OK command from the Windows TEMP directory.

    Error:

    MXC launcher: failed to create the process security environment: CreateProcessSecurityEnvironment failed (HRESULT = 0x80070020)

    Exit code: 1.

    1. A temporary custom permission profile containing only :minimal = "read" and a writable temporary workspace, with network access disabled, successfully launches the same command.

    Result: MXC_NARROW_OK — Exit code 0.

    1. Adding only :root = "read" to the previously successful profile, while keeping network access disabled and every other setting unchanged, reproduces the exact same error.

    Result: HRESULT 0x80070020 — Exit code 1.

    Process Monitor evidence:

    During the failing MXC startup, Windows Sysinternals Process Monitor captured the following events originating from codex.exe (PID 18032):

    • C:\DumpStack.log.tmp — SHARING VIOLATION (twice)
    • C:\hiberfil.sys — SHARING VIOLATION (twice)
    • C:\swapfile.sys — SHARING VIOLATION (twice)

    All six events occurred during the same failing invocation, around 22:10:29 local time.

    Operations: CreateFile.

    Requested access: Read Attributes, Synchronize.

    The PowerShell invocation simultaneously returned HRESULT 0x80070020.

    This appears consistent with the behavior documented in this issue: broad filesystem-root permission initialization encounters sharing violations involving locked Windows system files.

    The exact internal failure point still requires confirmation by the Codex engineering team.

    Important observations:

    • The failure is reproducible outside any application repository.
    • It does not depend on project code or build operations.
    • MXC works with the restricted custom filesystem profile.
    • The same MXC launcher fails when broad root-read access is added.
    • No system files were modified or deleted.
    • No Windows security protections were disabled.
    • Temporary diagnostic permission profiles were removed after testing.

    Could the MXC filesystem permission initialization be updated to handle locked Windows system files without aborting the entire process security environment creation?

    This issue has been blocking normal development work for 15 days.

    Thank you.

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbrowserbugsandboxtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions