WSL integration broken even with fresh installs
Open 💬 12 comments Opened Jun 13, 2026 by grezniczek
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
26.609.41114
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
- Totally fresh install of Codex App (after uninstall and removal of .codex folders both on Win and WSL).
- Switch from Windows native to WSL via Settings
- Restart app.
- CODEX_CLI_PATH error
<img width="553" height="157" alt="Image" src="https://github.com/user-attachments/assets/e034e193-9122-476d-95f1-c11d5adb6a27" />
Trying stuff like pointing CODEX_CLI_PATH to codex cli in WSL - no luck.
Only way back from there is manually editing config.toml to have
runCodexInWindowsSubsystemForLinux = false
integratedTerminalShell = "powershell"
Working through wsl.exe is a no go, because each and every write will ask for approval.
What steps can reproduce the bug?
- Remove Codex App and all .codex folders
- Install fresh
- Switch to WSL in Settings
- Restart app
- Get error (see above)
What is the expected behavior?
Switching to WSL works.
Additional information
Please test releases better before actually releasing them. I appreciate the speed of iterations, but loosing half a day over this is not fun. Thanks.
12 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I have same problem, is there any solution?
that s how i temporarily fixed it with codex. the guide is written by codex after we solved it
Use this as the repair note for another Codex agent.
Then inspect its resources folder:
If WSL mode is broken and only
codex.exe/rg.exeexist, that matches this issue.2. Make sure WSL helper binaries exist
In WSL:
If those files do not exist, copy known-good Linux
codexandrgbinaries there from a working install/package, then:3. Create a WSL wrapper
Create this file:
Contents:
Then from WSL:
The important part is
unset CODEX_HOME. It prevents Desktop’s Windows Codex home from leaking into the Linux app-server process.4. Point Desktop at the wrapper
In PowerShell:
Then fully restart Codex Desktop.
5. Verify Desktop is launching WSL correctly
After restart, check the Desktop process command line from PowerShell:
The good shape is:
The bad shape is:
If you see
codex.exeinside the WSL launch command, it is still using the Windows binary.6. Re-select WSL in Desktop settings
Open Codex Desktop settings and set the agent runtime back to WSL.
Then restart the app again. The setting may temporarily revert to Windows after the failed startup, so this final restart matters.
Rollback
To remove the override later:
Only do this after an upstream Desktop update restores proper WSL helper binaries in the app resources.
You cneed to downgrade codex - i just downgraded codex. the newest update broke WSL i.e agennt enviroment
I hit the same WSL startup failure on Windows with Codex Desktop
26.609.4994.0.One thing that tripped me up: I had previously set this in
config.tomlso the app could start again:That is only a recovery step to get Desktop unstuck in Windows mode. Before testing the WSL repair, it has to be set back to:
or Desktop will try to spawn the WSL wrapper as a Windows executable and fail.
The other issue was line endings in my wrapper. With CRLF endings I got:
The working wrapper was:
saved with Unix LF endings at:
And my Windows user env var was:
So the full working state was: WSL mode enabled again in config.toml, CODEX_CLI_PATH pointing at the wrapper, and the wrapper saved with LF endings.
I can confirm that the workaround presented by @andreidita22 works, and that the additons by @mosesadewale are spot on!
I got my Codex App running again. As I was more aggressive in my "repair" attempts (including full reinstall and actually wiping
.codexfolders, I "lost" my chats (I had backups). Should this have happened to anybody: Simply ask Codex to import the chats back into the new.codexfolders. It could do that for me ok, just with a simple "Can you bring my chats back from these backups" and a bit of Python it wrote.Let's hope though that by tomorrow a new version gets out that won't have this issue./
I just tried installing Codex Beta from Windows Store. Seem to not to be much broken currently and uses same config / history. Anyway hope the "stable" branch gets fixed soon.
<img width="848" height="265" alt="Image" src="https://github.com/user-attachments/assets/9ddd37ee-5138-48e3-9ab7-3b5845874a45" />
Still broken for me too
thx for expanding on the solution!
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.
https://github.com/openai/codex/issues/30094#issue-4746174057
Additional Windows 11 Pro / unified-desktop corroboration:
After the July 2026 unified ChatGPT Work / Codex rollout, one affected installation entered a split state where ChatGPT Classic remained usable but the unified Codex task path exited with code 127 because the generated Windows/WSL launcher path pointed to a missing versioned executable under
.codex/bin/wsl/codex.The important operational distinction was:
This suggests the update path should transactionally verify the WSL launcher target before switching the active desktop environment. If the new target is missing, the app should retain the last working launcher, show the exact missing target and installed versions, and offer an automatic repair/rollback rather than entering code 127.
Private paths and repository names are omitted. A timestamped incident packet and local diagnostic were preserved.
Installing Codex on the system drive and then solve it