Skip to content

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

Open

Description

@simonholm

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.

Image

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jun 15, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    on Jun 15, 2026
  3. JRJC2121 commented on Jul 22, 2026

    @JRJC2121

    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.

  4. wangchenxudev commented on Jul 23, 2026

    @wangchenxudev

    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.

  5. greenboo26 commented on Aug 25, 2026

    @greenboo26

    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.

  6. yidasanqian commented on Aug 26, 2026

    @yidasanqian

    same issue

  7. xkingda24-bot commented on Aug 26, 2026

    @xkingda24-bot

    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

  8. gitHuyNgo commented on Aug 26, 2026

    @gitHuyNgo

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

  9. stephenzhou-98 commented on Aug 26, 2026

    @stephenzhou-98

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

    This is effective, thanks

  10. Zyminggggg commented on Aug 26, 2026

    @Zyminggggg

    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

  11. JACKSKYHADES0910 commented on Aug 26, 2026

    @JACKSKYHADES0910

    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!!!!!!

  12. JinchuanMa commented on Aug 26, 2026

    @JinchuanMa

    已修复:我设置了 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!

  13. xinhao-zh commented on Aug 26, 2026

    @xinhao-zh

    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.

  14. embraceyouting commented on Aug 26, 2026

    @embraceyouting

    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

  15. Zelfan041210 commented on Aug 26, 2026

    @Zelfan041210

    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

  16. Flowers6 commented on Aug 27, 2026

    @Flowers6

    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. 🌹🌹

  17. qingxia5201314 commented on Aug 27, 2026

    @qingxia5201314

    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

    感谢你,成功了

  18. xiesixian294 commented on Aug 27, 2026

    @xiesixian294

    已修复:我设置了Windows用户变量:CODEX_CLI_PATH=C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe
    thanks you!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions