Windows Codex App: WSL Agent Environment fails when ChatGPT Desktop is installed on a non-system drive
What version of the Codex App are you using (From “About Codex” dialog)?
26.707.31428
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Windows 11 x64
What issue are you seeing?
When using the Codex Agent Environment set to Windows Subsystem for Linux (WSL), Codex fails to start if the ChatGPT Desktop App is installed on a non-system drive.
The issue does not occur when the same application is installed on the default system drive (C:).
Error message:
ChatGPT failed to start.
Unable to locate the Codex CLI binary.
Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
<img width="558" height="170" alt="Image" src="https://github.com/user-attachments/assets/80c1e95b-bff8-4329-8747-00b4b9269a6f" />
What steps can reproduce the bug?
- Change Windows default application installation location:
Windows Settings
→ System
→ Storage
→ Advanced storage settings
→ Where new content is saved
→ New apps will save to:
Change from: C to E
- Install ChatGPT Desktop App.
- Open ChatGPT Desktop.
- Change:
General → Agent environment → Windows Subsystem for Linux
- Restart ChatGPT Desktop.
- Try to start a Codex task.
- The application fails with:
Unable to locate the Codex CLI binary.
Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
What is the expected behavior?
Expected behavior
Codex should work with WSL Agent Environment regardless of where the ChatGPT Desktop App is installed.
For example:
C:\Program Files\ChatGPT
and
E:\Applications\ChatGPT
should behave the same.
Actual behavior
WSL Agent initialization fails when ChatGPT Desktop is installed on a non-system drive.
Moving/reinstalling ChatGPT Desktop back to the default C: drive fixes the issue immediately.
No changes are required to:
- WSL installation
- Ubuntu distribution
- Codex CLI installation
- project location
- environment variables
The only changed variable is the ChatGPT Desktop installation drive.
Additional information
I performed an A/B test on the same Windows machine with the same WSL environment and the same ChatGPT Desktop version.
The only difference was the ChatGPT Desktop installation location.
Case 1: Installed on a non-system drive (E:)
Windows setting:
Settings
→ System
→ Storage
→ Advanced storage settings
→ Where new content is saved
→ New apps will save to: E:
ChatGPT Desktop installation: E:...\ChatGPT
Open the ChatGPT Desktop Configuration: General → Agent environment → Windows Subsystem for Linux
Result: Failed
Error:Unable to locate the Codex CLI binary.
Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
The WSL Codex bridge directory was not populated:
dir $env:USERPROFILE\.codex\bin\wsl
Result: (empty)
Case 2: Installed on the default system drive (C:)
I changed Windows app installation location back to the default C: drive and reinstalled ChatGPT Desktop.
Open the ChatGPT Desktop Configuration: General → Agent environment → Windows Subsystem for Linux
Result: Works correctly
No changes were made to:
WSL installation
Ubuntu distribution
Codex CLI installation
project repository location
environment variables
user configuration
The only change was the ChatGPT Desktop installation drive.
This suggests that the WSL Agent initialization flow may have an issue resolving the embedded Codex CLI binary when ChatGPT Desktop is installed on a non-system drive.
The behavior appears related to Windows path resolution / Windows-to-WSL path conversion rather than the WSL environment itself.