Windows Store app fails on startup: "Unable to locate the Codex CLI binary"

Open 💬 17 comments Opened Jun 15, 2026 by simonholm
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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:

  1. Install Codex from Microsoft Store.
  2. Launch Codex.
  3. 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?

  1. Install Codex from the Microsoft Store.
  2. Launch Codex.
  3. 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" />

View original on GitHub ↗

17 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #28031
  • #28103
  • #28086
  • #28074
  • #28212

Powered by Codex Action

JRJC2121 · 1 month ago

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 only app.asar and windowsaddon.node — no bin\ subfolder at all, so the bundled CLI binary is genuinely absent from this shipped build.

Ran winget repair --id 9NT1R1C2HH7J --source msstore on this exact package — it completed successfully ("L'opération de réparation s'est terminée correctement") but did not restore the missing bin\ 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_PATH pointing to a working codex.exe already present on disk (found at %LOCALAPPDATA%\OpenAI\Codex\bin\<hash>\codex.exe, from the sibling OpenAI.Codex package's cache). This unblocked launch.

wangchenxudev · 1 month ago

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.

greenboo26 · 2 days ago

I can reproduce this on a newer Microsoft Store build as well.

Environment:

  • Windows 11 x64
  • Microsoft Store Codex Desktop
  • Version: 26.820.7780.0

Additional investigation:

  • app\\resources\\codex.exe exists (Test-Path returns True).
  • app\\resources\\codex, codex-command-runner.exe, and codex-code-mode-host.exe are also present.
  • CODEX_CLI_PATH is not set.
  • config.toml is valid and WSL is not enabled.
  • %LOCALAPPDATA%\\OpenAI\\Codex\\bin is created but always remains empty, even after deleting it, recreating it, rebooting, and launching the app again.
  • No relevant Windows Application event log entries are generated.
  • Attempting to execute the bundled resources\\codex.exe directly from PowerShell returns Access 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.

yidasanqian · 2 days ago

same issue

xkingda24-bot · 2 days ago

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

gitHuyNgo · 2 days ago

@xkingda24-bot this works for me, thank you!

stephenzhou-98 · 2 days ago
已修复:我设置了Windows用户变量:CODEX_CLI_PATH=C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe

This is effective, thanks

Zyminggggg · 2 days ago
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

solve the problem,thxxxxxxxx

JACKSKYHADES0910 · 2 days ago
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

Thanks, solve the problem!!!!!!

JinchuanMa · 2 days ago
已修复:我设置了 Windows 用户变量: CODEX_CLI_PATH=C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe

This method worked for me, thank you so much!

xinhao-zh · 1 day ago

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.

embraceyouting · 1 day ago
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

it is effective, thanks bro

Zelfan041210 · 1 day ago
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

Thanks a lot, it worked for me

Flowers6 · 1 day ago
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

It worked, thank you guys. 🌹🌹

qingxia5201314 · 1 day ago
Fixed: I set the Windows user variable:已修复:我已经设置了 Windows 用户变量: CODEX_CLI_PATH=C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe

感谢你,成功了

xiesixian294 · 1 day ago
已修复:我设置了Windows用户变量:CODEX_CLI_PATH=C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe

thanks you!!!!