openai / openai/codex

[Windows 26.820.9563.0] Desktop remains headless after external Codex CLI workaround

Open
#41,059 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug windows-os
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.820.9563.0

What subscription do you have?

chatGPT plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?
Image

Codex/ChatGPT Desktop 26.820.9563.0 no longer starts correctly on my Windows machine.

Initially, launching the app showed:

"ChatGPT failed to start.
Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex."

Image

I investigated the bundled CLI and confirmed that the file exists:

C:\Program Files\WindowsApps\OpenAI.Codex_26.820.9563.0_x64__2p2nqsd0c76g0\app\resources\codex.exe

However, its attributes are:

Archive, Encrypted

PowerShell:

$pkg = Get-AppxPackage OpenAI.Codex
Get-Item "$($pkg.InstallLocation)\app\resources\codex.exe" |
Select-Object FullName,Attributes

Output:

Attributes: Archive, Encrypted

Trying to copy the bundled executable also fails:

Copy-Item $src "$env:TEMP\codex-test.exe" -Force

Error:

"The specified file could not be encrypted."

I then installed the standalone official Codex CLI successfully:

codex-cli 0.150.1

Path:

C:\Users<USER>\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe

I set CODEX_CLI_PATH to this native codex.exe and rebooted Windows.

The original missing-CLI dialog no longer appears, but the desktop application still does not create a GUI.

Multiple ChatGPT.exe processes are created in the background, but every process has:

MainWindowHandle = 0
MainWindowTitle = empty

No codex.exe process is spawned.

The desktop log also stops after only:

2026-08-27T04:58:00.221Z info Launching app ...
2026-08-27T04:58:00.342Z info Appshot hotkey inactive ...

I also tested launching ChatGPT.exe directly and launching it with --disable-gpu. Both produce the same result: background processes exist, but no GUI window is created.

I completely uninstalled the application and verified that:

  • Get-AppxPackage OpenAI.Codex returned nothing
  • the old WindowsApps package directory was removed
  • the LocalAppData package directory was removed

I then rebooted and reinstalled the app from Microsoft Store.

The newly installed version is again 26.820.9563.0, and the newly installed bundled codex.exe is again marked:

Archive, Encrypted

The issue is therefore reproducible after a clean reinstall.

The standalone Codex CLI works correctly; only the Windows desktop application fails to create its GUI.

What steps can reproduce the bug?
  1. Install Codex/ChatGPT Desktop on Windows from the Microsoft Store.
  2. Launch the app.
  3. The app initially reports: "Unable to locate the Codex CLI binary."
  4. Check the bundled CLI at:
    C:\Program Files\WindowsApps\OpenAI.Codex_26.820.9563.0_x64__2p2nqsd0c76g0\app\resources\codex.exe
  5. The bundled codex.exe has the attributes: Archive, Encrypted.
  6. Attempting to copy the bundled codex.exe fails with: "The specified file could not be encrypted."
  7. Install the standalone Codex CLI 0.150.1 and set CODEX_CLI_PATH to the working codex.exe.
  8. Reboot Windows and launch the desktop app again.
  9. Multiple ChatGPT.exe processes start, but no GUI window appears and MainWindowHandle remains 0.
  10. Completely uninstall the app, reboot, and reinstall from Microsoft Store.
  11. The same issue reproduces on version 26.820.9563.0.
What is the expected behavior?

The Codex/ChatGPT desktop application should launch normally and display its GUI window.

The app should successfully use either the bundled Codex CLI or the valid external CLI specified by CODEX_CLI_PATH, without creating only background processes or leaving MainWindowHandle at 0.

Additional information

This appears related to #40867, but the behavior on my machine continues after applying the external CLI workaround.

The bundled CLI problem is reproducible on 26.820.9563.0:

  • app\resources\codex.exe exists
  • file attributes are: Archive, Encrypted
  • copying it fails with: "The specified file could not be encrypted."

I then installed the official standalone Codex CLI 0.150.1 and set CODEX_CLI_PATH to the native codex.exe.

After rebooting, the original missing-CLI error disappeared, but the desktop app still remains headless:

  • multiple ChatGPT.exe processes are running
  • MainWindowHandle = 0 for all processes
  • no GUI window appears
  • no codex.exe child process is spawned
  • desktop log stops after:
    • Launching app
    • Appshot hotkey inactive

A complete uninstall, reboot, and reinstall from Microsoft Store reproduces the same behavior on 26.820.9563.0.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce on Windows with the Microsoft Store installation of version 26.820.9563.0, checking resources\codex.exe and the CODEX_CLI_PATH workaround. Start with the ChatGPT.exe launch behavior and the desktop log, then verify that a GUI window appears and that codex.exe is spawned rather than leaving only background processes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.