Request for safe workaround or recovery path for Codex Desktop 26.609.4994.0 WSL-mode startup failure
What version of the Codex App are you using (From “About Codex” dialog)?
Codex Desktop 26.609.4994.0 — confirmed via PowerShell as OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0 because the app cannot open the About dialog in WSL mode.
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?
I am opening this issue to request a safe and reversible workaround or recovery path from the community and maintainers.
This appears related to #27979 and #28103. My issue started immediately after updating Codex Desktop to 26.609.4994.0. Since then, I have not been able to open Codex Desktop in WSL mode.
When launching Codex Desktop in WSL mode, the app fails with:
Codex failed to start.
Unable to locate the Codex CLI binary.
Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
Codex CLI itself still works from PowerShell:
codex --version
Output:
codex-cli 0.139.0
PowerShell finds Codex here:
where.exe codex
Output:
C:\Program Files\nodejs\codex
C:\Program Files\nodejs\codex.cmd
I also confirmed that CODEX_CLI_PATH has been removed from the user environment:
reg query HKCU\Environment /V CODEX_CLI_PATH
Output:
ERROR: The system was unable to find the specified registry key or value.
WSL shell behavior:
wsl -e bash -c 'command -v codex || echo NOT_FOUND'
Output:
/mnt/c/Program Files/nodejs/codex
However, a login shell finds the WSL-installed Codex:
wsl -e bash -lc 'command -v codex; codex --version; command -v bwrap || true'
Output:
/home/<redacted>/.npm-global/bin/codex
codex-cli 0.139.0
I previously tried setting CODEX_CLI_PATH to Windows Node/npm paths such as:
C:\Program Files\nodejs\codex.cmd
That did not resolve the issue. In one attempt, the app appeared to run the Windows .cmd file through a WSL/Linux context, causing a shell syntax error. I have since removed CODEX_CLI_PATH completely and left the environment in a clean state.
Given the findings in #28103 about the missing Linux app/resources/codex binary in the MSIX package, I am looking for guidance on a safe recovery path for users who need WSL mode.
It would be helpful to have community or maintainer confirmation on the safest temporary approach, including:
- leaving
CODEX_CLI_PATHunset and waiting for a fixed Codex Desktop update; - temporarily setting
CODEX_CLI_PATHto an existing cached WSL binary under%USERPROFILE%\.codex\bin\wsl\<hash>\codex; - removing
CODEX_CLI_PATHafter the next Codex Desktop update if that workaround is used; - disabling WSL mode and using native Windows mode until a fixed build is released.
What steps can reproduce the bug?
- Use Codex Desktop on Windows with WSL mode enabled.
- Update Codex Desktop to
26.609.4994.0. - Launch Codex Desktop.
- The app fails to start with:
Codex failed to start.
Unable to locate the Codex CLI binary.
Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
In my case, the issue started immediately after the update. Before the update, the same WSL setup worked normally.
I have not modified .codex state, edited state_5.sqlite, copied binaries manually, or installed Codex from third-party mirrors.
What is the expected behavior?
Codex Desktop should launch normally in WSL mode.
For affected users, there should also be a safe and documented recovery path that does not require guessing which cached binary to use, manually modifying .codex state, editing SQLite files, or installing from third-party mirrors.
Additional information
This issue is not intended as a duplicate root-cause report. It is intended to clarify the safest practical workaround while this regression is being investigated.
I would prefer not to modify .codex state, edit state_5.sqlite, copy binaries manually, pin CODEX_CLI_PATH to a cached CLI, or install from third-party mirrors unless the Codex team or experienced users can confirm that the workaround is safe and reversible.
Maintainer or community guidance on the recommended temporary recovery path would be appreciated.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This worked for me:
https://github.com/openai/codex/issues/22423#issuecomment-4697836404
Thank you for pointing me to that comment. It was helpful and the referenced workaround worked for me.
The workaround that worked for me was to point
CODEX_CLI_PATHto the Desktop-managed WSL cached Codex binary.The important part is that
CODEX_CLI_PATHshould not point to the Windows npmcodex.cmdpath, and should not point to the WSL-installed/home/.../codexpath. It should point to the Codex Desktop-managed WSL cached binary under:First, I checked whether such a cached WSL binary existed:
This returned a path like:
Then I set
CODEX_CLI_PATHto that cached WSL binary:Test-Pathshould return:After that, I closed any running Codex processes:
Then I restarted Codex Desktop. After this, Codex Desktop launched successfully again in WSL mode.
For clarity, this is different from pointing
CODEX_CLI_PATHto a Windows npm path such as:That path did not work for me, because it can be interpreted incorrectly in the WSL/Linux execution context.
This workaround appears to rely on an existing Desktop-managed WSL cached binary. After an official fix is released, I plan to remove the manual
CODEX_CLI_PATHoverride so that Codex Desktop can return to its normal managed path resolution:If the final registry query reports that the value does not exist, the manual override has been removed.
@shuncleopasfang
You saved my day. Thanks.
Codex is to IO intensive to work decent in Windows.
I ask the DEVs to open a WSL console window and run "fatrace", leave it it open and work a few minutes in Codex Desktop app.