Codex App on Windows ignores WSL agent environment and starts projectless threads in local PowerShell with invalid C:\mnt\c path
What version of the Codex App are you using (From “About Codex” dialog)?
Codex Desktop: 26.609.4994.0 ; Codex CLI: 0.140.0-alpha.2
What subscription do you have?
Nothing
What platform is your computer?
Windows 11 Professional x64;WSL2 Ubuntu is installed and running
What issue are you seeing?
In Codex Desktop on Windows, my settings are configured to use WSL:
- Agent environment: Windows Subsystem for Linux
- Integrated terminal shell: WSL
The settings are saved in C:\Users\Administrator\.codex\config.toml:
[desktop]
integratedTerminalShell = "wsl"
runCodexInWindowsSubsystemForLinux = true
However, new projectless Codex App threads are still launched as a local Windows/PowerShell environment instead of WSL. The thread receives an invalid Windows path derived from a WSL path: C:\mnt\c\Users\Administrator\Documents\Codex\2026-06-15\new-chat-3.
This path does not exist on Windows. The correct WSL path is: /mnt/c/Users/Administrator/Documents/Codex/2026-06-15/new-chat-3
Inside the running Codex session, shell commands execute in Windows PowerShell 5.1, and WSL_DISTRO_NAME is empty.
What steps can reproduce the bug?
- On Windows, install/use Codex Desktop.
- Enable WSL-related settings:
- Agent environment: Windows Subsystem for Linux
- Integrated terminal shell: WSL
- Start a new projectless chat/thread.
- Observe that the session runs under Windows PowerShell instead of WSL, and the cwd is C:\mnt\c\....
I also verified WSL itself works:
wsl.exe -d Ubuntu --cd /mnt/c/Users/Administrator/Documents/Codex/2026-06-15/new-chat-3 --exec sh -lc 'pwd; uname -s; echo WSL_DISTRO_NAME=$WSL_DISTRO_NAME'
Output:
/mnt/c/Users/Administrator/Documents/Codex/2026-06-15/new-chat-3
Linux
WSL_DISTRO_NAME=Ubuntu
What is the expected behavior?
When Codex Desktop is configured to use WSL, new projectless threads should launch the agent in WSL, with cwd set to a valid Linux path such as: /mnt/c/Users/Administrator/Documents/Codex/2026-06-15/new-chat-3
The session should not launch as local Windows PowerShell, and should not receive the invalid path: C:\mnt\c\Users\Administrator\Documents\...
Additional information
This looks like a Windows/WSL path conversion or environment selection bug in Codex Desktop.
Relevant local state observed:
C:\Users\Administrator\.codex\config.toml contains the expected WSL desktop settings.
Codex state/logs record the thread cwd as C:\mnt\c\Users\Administrator\Documents\Codex\2026-06-15\new-chat-3.
The turn environment appears as environment_id: "local" rather than a WSL environment.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗