AgentFixFind a fix
CodexConfirmed workaroundUpdated Aug 20, 2026

Windows cannot find codex-windows-sandbox-setup.exe

Fix Codex when Windows cannot find codex-windows-sandbox-setup.exe or the sandbox helper reports program not found.

Exact error

Match the message before using the fix

Windows cannot find 'codex-windows-sandbox-setup.exe'windows sandbox: orchestrator_helper_launch_failed: setup refresh failed to launch helper: helper=codex-windows-sandbox-setup.exe error=program not foundCreateProcessWithLogonW failed: 2

Quick answer

Start here

Run Codex from the complete official installation directory, not a copied or stale PATH entry. In the confirmed report, launching the real versioned Codex executable triggered the UAC sandbox setup and restored the helper. If the versioned directory is incomplete, reinstall the official package instead of downloading a helper executable from an unofficial source.

Diagnosis

Why it happens

  • The codex executable being launched from PATH can be separated from its packaged sandbox helper resources.
  • A stale junction or wrapper can continue pointing at an older installation after an update.
  • The same visible error can also follow an incomplete package extraction, so the PATH mismatch is a scoped diagnosis rather than a universal root cause.

Safest first

Fixes, in order

01

Launch the executable inside the complete official package

Applies when: Best first step for the standalone installer and stale PATH/junction cases

The original Windows 11 reporter found that the PATH-visible executable did not start setup, while the executable inside the official versioned package did.

  1. Close every Codex terminal and Desktop window.
  2. Open the official Codex installation directory and locate the current versioned folder.
  3. Run the codex executable from that folder once and accept the expected OpenAI sandbox setup prompt.
  4. Open a new terminal and run Codex again from the normal command.
where.exe codex
Get-Command codex | Format-List Source

Expected: Windows shows the sandbox setup/UAC flow once, then Codex can start a sandboxed command without the helper-not-found message.

02

Repair the official installation

Applies when: Use when the versioned package has no helper or looks partially extracted

A repair or clean reinstall restores the executable and its matching resources as one package. This is safer than copying executables from a third-party download.

  1. Record the Codex version and back up any local configuration you changed.
  2. Uninstall the affected official Codex package.
  3. Install the current official package to a normal local drive path.
  4. Launch once from the installed package, then confirm which executable PATH resolves.

Expected: The resolved Codex path and the sandbox helper belong to the same installed version.

03

Remove only the stale wrapper or junction from PATH

Applies when: Advanced step when `where.exe codex` lists more than one executable

Multiple results can make Windows launch an obsolete wrapper before the current package. Do not delete a path until you have identified which installation owns it.

  1. Run the path checks above and compare every result with the current installed version.
  2. Move the current official install earlier in your user PATH or remove only the confirmed stale entry.
  3. Open a new terminal so it receives the updated environment.

Expected: `where.exe codex` lists the current official executable first.

Verification

Prove the fix worked

  1. Start a new Codex session.
  2. Run a harmless command such as listing the current directory.
  3. Confirm that neither `program not found` nor `CreateProcessWithLogonW failed: 2` returns.

Escalation

If it still fails

  • Capture `where.exe codex`, the exact Codex version, installation type, and the full helper error.
  • Do not download or copy a sandbox helper from an unknown source.
  • Check the linked upstream issues for a newer package-specific resolution.

Scope

Environment and version notes

  • The confirmed clean-VM report used Codex CLI 0.142.5 on Windows 11.
  • The linked issue was a user report, not a statement that every helper-not-found case has the same cause.
  • Sources rechecked August 20, 2026.

Evidence

Sources

Source labels describe the evidence available on the checked date. A closed issue is not automatically a shipped fix.