Windows Codex Desktop in WSL mode incorrectly converts `/mnt/d/...` to `C:\d\...`, breaking file tree and Project creation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.826.12353
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?
When Codex Desktop is configured to use WSL as the Agent Environment, workspace paths are converted incorrectly between Windows and WSL.
My project is located at:
D:\Documents\qtrade
and its correct WSL path is:
/mnt/d/Documents/qtrade
However, Codex Desktop incorrectly resolves the workspace in multiple places:
- The file tree picker tries to access
C:\d\Documents\qtradeand fails withENOENT. - Opening a terminal generates a working directory like
/mnt/c/Program Files/WindowsApps/.../app/resources/D:\Documents\qtrade, which does not exist. - Project creation/removal also fails while using the WSL Agent Environment, but works again after switching back to Windows Native.
This looks like a Windows ↔ WSL workspace path normalization/conversion bug, and may be related to #41290.
What steps can reproduce the bug?
-
Install and open Codex Desktop on Windows 11.
-
Configure the Agent Environment to use WSL.
-
Open a workspace located at:
D:\Documents\qtradeThe corresponding WSL path is:
/mnt/d/Documents/qtrade -
Try to create a Project in Codex Desktop.
-
Try to open the workspace file tree picker.
-
Try to open a terminal from the workspace.
Observed results:
-
Project creation/removal fails while using the WSL Agent Environment.
-
The file tree picker fails with:
ENOENT: no such file or directory, stat 'C:\d\Documents\qtrade' -
Opening a terminal attempts to run:
cd '/mnt/c/Program Files/WindowsApps/OpenAI.Codex_26.818.8289.0_x64__2p2nqsd0c76g0/app/resources/D:\Documents\qtrade'which fails because that path does not exist.
- Switch the Agent Environment back to Windows Native and restart Codex Desktop.
After switching back to Windows Native, Project creation works again.
What is the expected behavior?
When Codex Desktop uses WSL as the Agent Environment, Windows workspace paths should be converted correctly to their WSL equivalents.
For this workspace:
D:\Documents\qtrade
Codex should use:
/mnt/d/Documents/qtrade
inside WSL.
When converting the path back to Windows, it should resolve to:
D:\Documents\qtrade
and not:
C:\d\Documents\qtrade
The terminal, file tree picker, and Project subsystem should all use the same correctly normalized workspace path, and Project creation/removal should work in WSL mode just as it does in Windows Native mode.
Additional information
Codex Desktop version:
26.826.12353
Environment:
- Windows 11
- WSL2
- fish shell inside WSL
WSL itself resolves the workspace correctly. For example:
cd /mnt/d/Documents/qtrade
works normally, and pwd returns:
/mnt/d/Documents/qtrade
So this does not appear to be a WSL mount or filesystem issue.
There appear to be two incorrect path conversions happening inside Codex Desktop:
-
Windows → WSL:
D:\Documents\qtradeis effectively treated as a relative path and appended to the Codex app resources directory.
-
WSL → Windows:
/mnt/d/Documents/qtradeis incorrectly converted to:
C:\d\Documents\qtrade
This may also explain why Project creation/removal fails in WSL mode.
The behavior appears related to #41290.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a Windows workspace such as D:\Documents\qtrade and WSL as the Agent Environment. Trace the workspace path handling used by Project creation/removal, the file tree picker, and terminal startup; done means all three use /mnt/d/Documents/qtrade in WSL and D:\Documents\qtrade when converted back.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100