What version of the Codex App are you using?
26.715.7063.0 (Windows x64)
The Codex CLI installed inside NixOS is codex-cli 0.144.4.
What platform is your computer?
Windows with WSL2, using NixOS:
NixOS 26.11.20260718.61b7c44 (Zokor)
What issue are you seeing?
The Windows Codex app cannot start the agent in the NixOS WSL distribution because its WSL launcher hard-codes /usr/bin/bash.
NixOS intentionally does not use the conventional FHS location /usr/bin/bash. Bash is installed and works normally at:
$SHELL=/run/current-system/sw/bin/bash
/bin/bash
/sbin/bash
/run/current-system/sw/bin/bash
The installed Codex app bundle constructs its WSL command in this form:
wsl.exe -d <distribution> -- /usr/bin/bash -lc <command>
It then classifies exit code 127 containing /usr/bin/bash: not found as an unsupported WSL shell. Consequently the Settings flow reports that Codex cannot run in the current WSL distribution even though Bash and the Codex CLI are both installed and functional.
What steps can reproduce the bug?
- Install a NixOS WSL2 distribution.
- Install
bash and codex normally through the NixOS configuration.
- Confirm that
bash and codex are on PATH, but /usr/bin/bash is absent.
- In the Windows Codex app, select WSL as the agent environment and choose the NixOS distribution.
- Restart the app.
The hard-coded launch fails:
wsl.exe -d NixOS -- /usr/bin/bash -lc 'codex --version'
# bash: line 1: /usr/bin/bash: No such file or directory
Using NixOS's valid Bash path succeeds:
wsl.exe -d NixOS -- /bin/bash -lc 'codex --version'
# codex-cli 0.144.4
What is the expected behavior?
The WSL launcher should not require Bash at the FHS-specific path /usr/bin/bash.
It should resolve bash from the WSL distribution's PATH, use the user's configured login shell, or otherwise discover a supported shell before launching Codex. NixOS WSL should be accepted when Bash and Codex are available.
Workaround
Creating the following compatibility symlink makes the current app launcher work:
/usr/bin/bash -> /bin/bash
This confirms that the hard-coded path is the only blocker in this reproduction.
What version of the Codex App are you using?
26.715.7063.0 (Windows x64)
The Codex CLI installed inside NixOS is
codex-cli 0.144.4.What platform is your computer?
Windows with WSL2, using NixOS:
What issue are you seeing?
The Windows Codex app cannot start the agent in the NixOS WSL distribution because its WSL launcher hard-codes
/usr/bin/bash.NixOS intentionally does not use the conventional FHS location
/usr/bin/bash. Bash is installed and works normally at:The installed Codex app bundle constructs its WSL command in this form:
It then classifies exit code 127 containing
/usr/bin/bash: not foundas an unsupported WSL shell. Consequently the Settings flow reports that Codex cannot run in the current WSL distribution even though Bash and the Codex CLI are both installed and functional.What steps can reproduce the bug?
bashandcodexnormally through the NixOS configuration.bashandcodexare onPATH, but/usr/bin/bashis absent.The hard-coded launch fails:
Using NixOS's valid Bash path succeeds:
What is the expected behavior?
The WSL launcher should not require Bash at the FHS-specific path
/usr/bin/bash.It should resolve
bashfrom the WSL distribution'sPATH, use the user's configured login shell, or otherwise discover a supported shell before launching Codex. NixOS WSL should be accepted when Bash and Codex are available.Workaround
Creating the following compatibility symlink makes the current app launcher work:
This confirms that the hard-coded path is the only blocker in this reproduction.