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

Open
#34,928 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
rust

Research direction

Start at the windowsSandbox/setupStart flow that launches codex-windows-sandbox-setup.exe, using the helper path and reproduction steps in the report. Compare the Codex-launched process with the manual elevated launch, including its setup payload, environment, working directory, and elevation mechanism; done means Windows sandbox setup completes successfully.

Written by the indexing model from the issue text.

Description

app bug sandbox windows-os
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.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.