Skip to content

Codex not able to access WSL directly #26030

Open

Description

@jcshartz

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//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//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

Activity

  1. added
    app
    on Jun 3, 2026
  2. added
    bug
    windows-os
    tool-calls
    on Jun 3, 2026
  3. github-actions commented on Jun 3, 2026

    @github-actions
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions