Windows Codex App cannot locate CLI when installed on non-standard drive
Open 💬 8 comments Opened May 14, 2026 by Y1-Bit
What version of the Codex App are you using (From “About Codex” dialog)?
26.506.31421
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Environment:
- Windows 11
- WSL2 Ubuntu
- Codex Windows Desktop App
- Codex CLI installed both on Windows and WSL
Problem:
After enabling WSL integration, the Codex desktop app started showing:
"Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex."
<img width="680" height="221" alt="Image" src="https://github.com/user-attachments/assets/cbe12828-fb6f-472b-b509-806286571af3" />
Initially this looked like a WSL integration issue, but the actual root cause appears related to installing Codex on a non-standard drive (E: instead of C:).
What fixed it:
Moving/reinstalling Codex to the default C: drive immediately resolved the problem.
This suggests the Electron desktop app may have issues with:
- non-standard installation drives
- PATH propagation
- Windows environment resolution
- or WSL integration combined with custom install paths
What steps can reproduce the bug?
- Set a custom installation drive in Windows Settings for Microsoft Store apps: System -> Storage -> Advanced storage settings -> Where new content is saved (for example E: instead of C:) .
- Install the Codex Windows app from the Microsoft Store.
- Open Codex and go to: Settings -> Agent Environment
- Set the environment to: Windows Subsystem for Linux
- (Optional) Set the integrated terminal shell to WSL as well.
- Fully terminate all Codex processes via Task Manager.
- Relaunch the Codex app.
What is the expected behavior?
_No response_
Additional information
_No response_
8 Comments
It did work when Codex was installed on C drive,I'm curious about how you found this solution
same.it work for me.thank u very much!
It did help me
Workaround that fixed it for me on Windows + WSL
I was getting:
My setup:
After reinstalling the Codex Desktop App, the error persisted. The key finding was that the Desktop App seemed to validate
CODEX_CLI_PATHas a Windows path, but then execute it from the WSL/Linux side.What did not work:
That produced a Linux shell syntax error because WSL tried to execute the Windows
.cmdfile.This also did not work correctly:
That made WSL try to run the Windows npm package through
/mnt/c/..., causing:The workaround was to create a Linux shell wrapper in a Windows-visible path and point
CODEX_CLI_PATHto it.In WSL:
Then in PowerShell:
Then I fully closed Codex Desktop and reopened it:
After reopening the app, Codex started successfully.
So the working setup was:
This suggests the Desktop App may be mixing Windows path validation with WSL execution when resolving
CODEX_CLI_PATH.thanks very much! This has bothered me for a long time.
it works for me, thanks!~ but i think it should be a bug of codex desktop itself @codex
Thank you, @Beowulfwar. That worked for me as well, though I had it adjust it since I had node installed with nvm:
Thanks for the workaround, OAI team really need to fix their s