Issue when Codex app on Windows fails to start
What version of the Codex App are you using (From “About Codex” dialog)?
26.616.6631.0
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What issue are you seeing?
On start for both Codex and Codex (beta) the process ends after a couple of seconds of running, before starting the GUI.
I was able to solve it for myself personally with Codex CLI, but in no way the issue was visible and the app was just failing silently.
Here is the Codex summary:
## Windows Codex launch failures: missing sandbox helpers + Electron crash from NODE_OPTIONS
### Environment
- OS: Windows
- App: Codex Beta MSIX / Store package
- Codex Beta package version observed:
26.616.6631.0 - Codex CLI version observed:
codex-cli 0.142.5 - CLI path pattern:
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe - Standalone release path pattern:
%USERPROFILE%\.codex\packages\standalone\releases\0.142.5-x86_64-pc-windows-msvc
### Issue 1: Sandbox helper binaries are not discoverable by installed CLI
Sandboxed command execution failed before the command process started.
Observed log:
```text
setup refresh: spawning codex-windows-sandbox-setup.exe
setup refresh failed to launch helper: helper=codex-windows-sandbox-setup.exe, error=program not found
The helper binary existed in the standalone release:
...\0.142.5-x86_64-pc-windows-msvc\codex-resources\codex-windows-sandbox-setup.exe
But it was not discoverable from the active CLI environment. The active PATH included:
...\0.142.5-x86_64-pc-windows-msvc\codex-path
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin
codex-path contained rg.exe, but not codex-windows-sandbox-setup.exe.
After manually copying codex-windows-sandbox-setup.exe into the PATH-visible location, the failure progressed to a second missing helper:
helper copy failed for command-runner: helper not found next to current executable or under codex-resources:
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe;
falling back to legacy path codex-command-runner.exe
Copying the matching codex-command-runner.exe from the same 0.142.5 release into:
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin
allowed sandboxed commands to run successfully again.
### Suspected root cause
The Windows CLI install/update seems to expose only codex.exe under:
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin
while required helper executables remain under the standalone release codex-resources directory and are not reliably discoverable.
Codex appears to expect helpers either:
- next to the current codex.exe, or
- under a nearby codex-resources path, or
- available by bare executable name via PATH.
### Suggested fix
- place codex-windows-sandbox-setup.exe and codex-command-runner.exe next to the installed codex.exe, or
- add the correct codex-resources directory to helper resolution, or
- populate codex-path with all executables that are later launched by bare name.
———
The Codex Beta desktop app launched, created an AppX container, then immediately exited and produced Crashpad dumps.
Windows AppModel events showed:
Created process ... for application OpenAI.CodexBeta...!App
Destroyed Desktop AppX container ... for package OpenAI.CodexBeta...
electron: --openssl-legacy-provider is not allowed in NODE_OPTIONS
Removing the user-level environment variable:
NODE_OPTIONS=--openssl-legacy-provider
from HKCU\Environment, then restarting Explorer, allowed the Codex Beta desktop app to launch and stay running.
Electron rejects some Node options inherited through NODE_OPTIONS. If the user has a global NODE_OPTIONS value, Codex Beta can crash before its app bootstrap starts.
This is not unique to Codex, but the current user-facing behavior is a silent crash with only Crashpad evidence.
### Suggested fix
Before Electron/Node initialization, the app launcher should defensively sanitize unsupported NODE_OPTIONS values, or at least detect this condition and show a clear error.
Useful handling could be:
- ignore/remove NODE_OPTIONS for the packaged app process, or
- validate it and show a dialog explaining which value prevents startup, or
- document that global NODE_OPTIONS is unsupported for the desktop app.
### Workaround used
- Removed the bad user-level environment variable:
reg delete HKCU\Environment /v NODE_OPTIONS /f
- Restarted Explorer so MSIX/Start-menu app launches inherited the clean environment.
- Verified that Codex Beta processes stayed running and no new Crashpad dump appeared.
What steps can reproduce the bug?
Launch latest version of Codex and Codex (beta) from Windows store
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗