Windows Store app fails on startup: "Unable to locate the Codex CLI binary"
What version of the Codex App are you using (From “About Codex” dialog)?
26.609.4994.0
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Microsoft Windows NT 10.0.22000.0 x64
What issue are you seeing?
After installing Codex from the Microsoft Store, the application fails immediately on startup with:
"Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex."
Steps to reproduce:
- Install Codex from Microsoft Store.
- Launch Codex.
- Error dialog appears immediately.
Expected behavior:
Codex starts normally.
Actual behavior:
Startup fails with the CLI binary error and the application cannot be used.
Investigation performed:
- Uninstalled and reinstalled the Store package.
- Package status reports OK:
OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0
- No external codex executable exists on PATH:
where.exe codex
-> not found
Get-Command codex
-> not found
- Verified that the package contains:
app\resources\codex.exe
app\resources\codex-command-runner.exe
- Verified runtime files are created under:
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node...
- No relevant Windows Application log entries were generated.
Observation:
The error suggests the CLI binary is missing, but the Store package actually contains app\resources\codex.exe. This appears to be a startup path-resolution or runtime initialization problem rather than a missing file.
Store package version:
26.609.4994.0
Package family:
OpenAI.Codex_2p2nqsd0c76g0
What steps can reproduce the bug?
- Install Codex from the Microsoft Store.
- Launch Codex.
- The application immediately displays:
"Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex."
The issue persists after uninstalling and reinstalling the Store package.
What is the expected behavior?
Codex should start normally and display the application UI without requiring any manual configuration of CODEX_CLI_PATH.
Additional information
Investigation performed:
- Package version: 26.609.4994.0
- Package status reported as OK by Get-AppxPackage.
- Reinstallation did not resolve the issue.
- No external "codex" executable exists on PATH.
- Verified that the package contains:
app\resources\codex.exe
app\resources\codex-command-runner.exe
- Runtime files are created under:
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node...
The error suggests the CLI binary is missing, but the binary appears to exist within the installed package. This may indicate a startup path-resolution or runtime initialization issue.
<img width="557" height="172" alt="Image" src="https://github.com/user-attachments/assets/3f567aa5-f8da-45a6-af7e-a9dae7eb128b" />
17 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Same error on the legacy "ChatGPT Classic" app (MSIX package
OpenAI.ChatGPT-Desktop, version 1.2026.190.0, last built 2026-07-09): "Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex."Confirmed root cause on my install:
app\resources\in this package contains onlyapp.asarandwindowsaddon.node— nobin\subfolder at all, so the bundled CLI binary is genuinely absent from this shipped build.Ran
winget repair --id 9NT1R1C2HH7J --source msstoreon this exact package — it completed successfully ("L'opération de réparation s'est terminée correctement") but did not restore the missingbin\folder. This confirms it's a packaging defect in the published build itself, not local file corruption, so a repair/reinstall of the same version won't self-heal it.Workaround: set a persistent user environment variable
CODEX_CLI_PATHpointing to a workingcodex.exealready present on disk (found at%LOCALAPPDATA%\OpenAI\Codex\bin\<hash>\codex.exe, from the siblingOpenAI.Codexpackage's cache). This unblocked launch.Hi, I encountered the same issue and found a workaround that resolved it in my case.
Codex Desktop had been installed on a non-system drive through the Microsoft Store. After uninstalling it and reinstalling the same version on the default system drive (C:), WSL mode started working normally. I did not need to reinstall Codex inside WSL or configure CODEX_CLI_PATH.
This may be caused by Codex Desktop not correctly handling the application path when the MSIX package is installed on a non-system drive.
I hope this is helpful. Please let me know whether reinstalling it on C: works for you as well—or whether the issue still persists afterward.
I can reproduce this on a newer Microsoft Store build as well.
Environment:
Additional investigation:
app\\resources\\codex.exeexists (Test-Pathreturns True).app\\resources\\codex,codex-command-runner.exe, andcodex-code-mode-host.exeare also present.CODEX_CLI_PATHis not set.config.tomlis valid and WSL is not enabled.%LOCALAPPDATA%\\OpenAI\\Codex\\binis created but always remains empty, even after deleting it, recreating it, rebooting, and launching the app again.resources\\codex.exedirectly from PowerShell returnsAccess is denied, which appears consistent with the MSIX packaging model.This seems consistent with a runtime initialization or bundled CLI path resolution failure rather than the CLI actually being missing.
same issue
Fixed: I set the Windows user variable:
CODEX_CLI_PATH=C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe
@xkingda24-bot this works for me, thank you!
This is effective, thanks
solve the problem,thxxxxxxxx
Thanks, solve the problem!!!!!!
This method worked for me, thank you so much!
I found Codex under Installed apps in Windows Settings and moved it to the C drive, which fixed the problem. Then I moved it back to the D drive to save some space, and it still worked fine.
it is effective, thanks bro
Thanks a lot, it worked for me
It worked, thank you guys. 🌹🌹
感谢你,成功了
thanks you!!!!