Skip to content

Windows sandbox setup helper fails with 0xc0000142 only when launched by Codex #34928

Description

@aimayu

What version of the Codex App are you using (From “About Codex” dialog)?

Codex App 26.716.1735.0

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Windows 11 Pro

What issue are you seeing?

The UAC flow works, but codex-windows-sandbox-setup.exe fails immediately with:

0xc0000142

Windows Event Viewer confirms:

Source: Application Popup
Event ID: 26
Application: codex-windows-sandbox-setup.exe
Error: 0xc0000142

What steps can reproduce the bug?

  1. Install and launch the Codex/ChatGPT desktop app on Windows 11 Pro.
  2. Sign in normally.
  3. Proceed to "Finish Windows setup".
  4. Click the button to complete Windows setup.
  5. The UAC prompt appears normally.
  6. Enter/confirm administrator credentials.
  7. Immediately after elevation, Windows shows:

codex-windows-sandbox-setup.exe - Application Error

The application was unable to start correctly (0xc0000142).

  1. The Windows setup does not complete.

What is the expected behavior?

After approving the UAC prompt, codex-windows-sandbox-setup.exe should complete the Windows sandbox setup and the Codex desktop app should start normally.

Additional information

I performed additional diagnostics to isolate the problem.

Environment:

  • Windows 11 Pro
  • Domain-joined corporate PC
  • Normal user account: synergy\mrevunov
  • Administrator account used for UAC: synergy\esim

The helper exists at:

C:\Users\mrevunov\AppData\Local\OpenAI\Codex\bin\e2d6a5ee2cac801c\codex-windows-sandbox-setup.exe

Authenticode signature is valid and signed by OpenAI OpCo, LLC.

The helper itself works when launched manually.

Direct launch as the normal user:

codex-windows-sandbox-setup.exe

Result:

Error: helper_request_args_failed: expected payload argument
ExitCode = 1

This is expected because no setup payload was supplied.

The helper also works when elevated manually through UAC:

Start-Process -FilePath $helper -Verb RunAs -PassThru -Wait

Result:

ExitCode = 1

It also launches successfully from an elevated PowerShell session running under the same administrator account (synergy\esim) used during the Codex UAC flow.

Therefore:

  • helper executable itself launches correctly
  • Authenticode signature is valid
  • direct execution works
  • execution under the administrator account works
  • normal UAC / RunAs elevation works
  • AppLocker logs contain no relevant events
  • Code Integrity logs contain no relevant events

However, when Codex launches the same helper during the actual Windows sandbox setup flow, the process fails with 0xc0000142.

This suggests that the failure is specific to the way Codex invokes codex-windows-sandbox-setup.exe during windowsSandbox/setupStart — possibly the setup payload, process environment, working directory, or elevation launch mechanism.

Reinstalling the desktop application did not resolve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions