Codex not able to access WSL directly
What version of the Codex App are you using (From “About Codex” dialog)?
26.601.21317
What subscription do you have?
Pro
What platform is your computer?
Windows
What issue are you seeing?
Codex Desktop is configured to use WSL, but exec_command attempts to spawn /bin/bash directly from a Windows context and fails.
Workspace:
C:\Users\<USER>\Documents\Notes\
WSL path:
/mnt/c/Users/<USER>/Documents/Notes/
Observed:
exec_command for pwd fails with:
CreateProcess { message: "Rejected(\"Failed to create unified exec process: No such file or directory (os error 2)\")" }
The attempted command shown is:
/bin/bash -lc pwd
Expected:
When WSL is selected, exec_command should run inside WSL or invoke WSL through wsl.exe, e.g.:
wsl.exe -e bash -lc "pwd"
Additional evidence:cmd.exe /c wsl.exe -e sh -c "echo WSL_MARKER; pwd" succeeds and returns:
/mnt/c/Users/<USER>/Documents/Notes/
After restarting, Codex reported:
No app terminal session is attached to this thread yet.
Summary:
The terminal/profile is configured for WSL, but the tool runner appears to use a Windows process launcher with a Linux shell path.
What steps can reproduce the bug?
In settings, enable WSL for both Agent Environment and Integrated terminal shell
Attempt to run anything that uses linux tools
observe failure to do so
Tell codex to prepend wsl.exe and retry
Observe success
What is the expected behavior?
Should just use wsl directly as intended
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗