openai / openai/codex

Windows Codex Desktop in WSL mode incorrectly converts `/mnt/d/...` to `C:\d\...`, breaking file tree and Project creation

Open
#42,211 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug windows-os
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\qtrade and fails with ENOENT.
  • 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?
  1. Install and open Codex Desktop on Windows 11.

  2. Configure the Agent Environment to use WSL.

  3. Open a workspace located at:

    D:\Documents\qtrade

    The corresponding WSL path is:

    /mnt/d/Documents/qtrade

  4. Try to create a Project in Codex Desktop.

  5. Try to open the workspace file tree picker.

  6. 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.

  1. 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:

  1. Windows → WSL:

    D:\Documents\qtrade

    is effectively treated as a relative path and appended to the Codex app resources directory.

  2. WSL → Windows:

    /mnt/d/Documents/qtrade

    is 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.