Codex Desktop WSL: legacy tasks with Windows-form persisted cwd fail process launch
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.825.5331.0
What subscription do you have?
ChatGPT Pro 5x
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex Desktop 26.825.5331.0 appears to have fixed the earlier WSL MCP transport problem, but some existing WSL tasks remain unusable because they contain a legacy Windows-form persisted working directory.
This appears to be a separate downstream legacy-task cwd migration/resume compatibility issue, not a recurrence of the earlier mcp_servers.codex_app transport failure reported in #40881, #40894, and #40829.
Environment:
- Codex Desktop: 26.825.5331.0
- Bundled WSL Codex: codex-cli 0.151.0-alpha.7.1
- WSL distro: Ubuntu 24.04.4 LTS
- WSL: WSL2
- Kernel: 6.18.33.1-microsoft-standard-WSL2
Observed behavior
New WSL-hosted tasks created with a valid cwd work normally:
/home/<user>/projects/<project>
An older task that already stores a valid WSL cwd also resumes and executes commands normally.
However, an existing task whose persisted cwd is Windows-form is reconstructed under the Codex Desktop application resources directory.
Example malformed cwd:
/mnt/c/Program Files/WindowsApps/OpenAI.Codex_<version>_x64__<package>/app/resources/c:\home\<user>\projects\<project>
When that task invokes even a basic command such as:
pwd -P
command startup fails before /bin/bash runs:
exec_command failed for /bin/bash -lc 'pwd -P; git rev-parse --show-toplevel': CreateProcess { message: "Rejected(\"Failed to create unified exec process: No such file or directory (os error 2)\")" }
Neither pwd nor Git produces output.
Control cases
PASS — newly created WSL project task:
cwd=/home/<user>/projects/<project>
PASS — existing pre-regression task already storing:
cwd=/home/<user>/projects/<project>
FAIL — existing legacy task storing a Windows-form or malformed cwd.
The failure therefore does not affect every existing task or every new WSL task. It appears specific to legacy tasks whose persisted cwd was corrupted during the earlier regression.
Why this appears distinct from #40881 / #40894 / #40829
The earlier:
invalid transport in mcp_servers.codex_app
failure is no longer reproducible on this build.
mcp_servers.codex_app initializes successfully, and Codex Desktop can:
- enumerate projects;
- enumerate tasks;
- create new WSL tasks;
- send messages to existing tasks;
- create and start turns;
- execute commands in tasks with valid WSL cwd values.
For an affected legacy task, the successful sequence before failure is:
- Desktop finds and loads the existing task.
codex_appaccepts the follow-up message.- The app-server creates and starts the turn.
- The malformed persisted cwd reaches
turn_context. - The model issues
exec_command. - Unified-process creation fails before
/bin/bashstarts.
This places the current failure downstream of MCP transport and turn dispatch, specifically at process creation using the malformed persisted cwd.
What steps can reproduce the bug?
-
Launch Codex Desktop 26.825.5331.0 on Windows with WSL2 execution enabled.
-
Open an existing/legacy WSL task whose persisted cwd is Windows-form, for example:
C:\home\<user>\projects\<project> -
Resume the task and ask it to execute a trivial shell command such as:
pwd -P -
The persisted cwd is reconstructed beneath the Codex Desktop application resources directory, producing a mixed path similar to:
/mnt/c/Program Files/WindowsApps/OpenAI.Codex_<version>_x64__<package>/app/resources/c:\home\<user>\projects\<project> -
exec_commandfails before/bin/bashstarts with:Failed to create unified exec process: No such file or directory (os error 2)
Control
Create a new task for the same registered WSL project:
/home/<user>/projects/<project>
Run the same command. It succeeds.
An older task that already persisted the valid /home/... cwd also succeeds.
What is the expected behavior?
When resuming a legacy WSL task, Codex Desktop should normalize or migrate its persisted working directory to the valid registered WSL project path, or otherwise detect and recover from an invalid stored cwd.
A Windows-form cwd should not be resolved relative to the Codex Desktop application resources directory.
Existing tasks should remain executable after an application update when their underlying WSL project still exists and is registered correctly.
Additional information
The running Codex Desktop WSL app-server uses the bundled Codex runtime:
codex-cli 0.151.0-alpha.7.1
The original MCP transport failure is not present in current testing. The internal codex_app transport initializes and handles project/task operations successfully.
The earlier error:
Invalid request: AbsolutePathBuf deserialized without a base path
was also NOT reproduced on build 26.825.5331.0 during this retest.
The current distinctive malformed-path signature is:
app/resources/c:\home
The current failure signature is:
Failed to create unified exec process: No such file or directory (os error 2)
A same-install control test using a newly created WSL task with a valid /home/... cwd succeeds.
This appears to be a legacy task cwd migration/resume compatibility defect rather than a general WSL execution or MCP transport failure.
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
Start by tracing legacy task resume through persisted cwd handling, turn_context, and exec_command in the bundled Codex runtime. Reproduce with the malformed Windows-form cwd and compare it with a valid /home/... WSL task. Done means an existing legacy task resolves to its registered WSL project path or recovers safely, while the control task continues to execute commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100