Windows Codex app cannot launch sandboxed commands for WSL2 project
Open 💬 16 comments Opened Jun 2, 2026 by poroburu
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
26.527.60818
What subscription do you have?
Plus
What platform is your computer?
Linux 6.6.114.1-microsoft-standard-WSL2 x86_64 x86_64 Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Restricted exec fails in every Codex desktop thread for a WSL2 project:
exec_command failed for /bin/bash -lc pwd:
CreateProcess {
message: "Rejected(\"Failed to create unified exec process:
No such file or directory (os error 2)\")"
}
Reproduced after a full Windows reboot and in a new thread.
Environment:
- Windows Codex desktop app
- WSL2 Ubuntu
- codex-cli 0.136.0-alpha.2
- runCodexInWindowsSubsystemForLinux = true
- integratedTerminalShell = "wsl"
- Workspace: native WSL ext4 path under /home
- bubblewrap 0.9.0 installed
Control checks from WSL succeed:
- /usr/bin/bash exists
- bwrap minimal sandbox succeeds
- codex sandbox -- pwd succeeds
Windows-side runtime receives EPERM when accessing both:
- \\wsl$\Ubuntu\...
- \\wsl.localhost\Ubuntu\...
Approved unrestricted commands work; default restricted commands fail
before Bash starts.
What steps can reproduce the bug?
Use WSL integration and WSL terminal.
What is the expected behavior?
_No response_
Additional information
_No response_
16 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I have reproduced this in new and existing Codex WSL project workspaces.
Feedback ID 019e871c-fc6c-7173-b7e8-f1f884077c65Confirmed: the newly registered clean probe workspace fails identically in a brand-new Codex app thread.
Exact error:
This cleanly rules out:
bubblewrapThe failure is isolated to the Codex desktop app’s restricted WSL command bridge. Include this clean-workspace reproduction in the
/feedbacksubmission and GitHub issue.I confirmed this is not durable across a Codex restart.
After restarting Codex Desktop, a new WSL thread failed on a trivial sandboxed command:
with the same pre-shell failure:
Running the local arg0 repair script fixed the active session again.
The script finds the live WSL app-server, reads the helper path from the app-server’s open
.lockfd, recreates that exact helper directory from the Windows side, and adds the missing Linux helper symlinks:Those symlinks point to the active app-server executable from:
Important detail: after restart, Codex regenerated
%USERPROFILE%\.codex\tmp\arg0, but the active helper dir was still incomplete for WSL use. Manually deletingtmpandbin/wsldid not permanently fix it. The repair has to target the currently activecodex-arg0*dir held by the live app-server.Minimal workaround script:
After running it, sandboxed
pwdsucceeds again.Security / side effects:
codex-arg0*dirs..lock.%USERPROFILE%\.codex\tmp\arg0helper dirs are security-sensitive.%USERPROFILE%\.codex\tmp\arg0I have the exact same problem with Codex 26.601.21317.
I have the exact same problem with Codex 26.601.10930
No solutions yet.
I’m still experiencing the same problem, even with the latest Codex version released today: 26.602.30954. I can’t do anything in Codex right now. This issue needs to be fixed as soon as possible. I'm a Pro user.
WSL was working on a Codex app instance left open on my laptop:
<img width="2880" height="1704" alt="Image" src="https://github.com/user-attachments/assets/6ed34502-545f-48d1-a06c-7bfdbcebae9d" />
so it is now working with the new update?
No. I am just giving a reference point before the regression.
I've seen this for about a week, it seems that the windows .bat helpers are being created instead of the linux ones for me, still happening with
26.602.40724EDIT: After running the script above, I see _one_ session with the linux helpers, but a number of other sessions created after it returned to the .bat helpers. I really don't understand this.
EDIT2: despite still having .bat files, new sessions appear able to run commands within the sandbox (pwd, date, curl etc - curl helpfully fails when it attempts to reach the open internet, because it's sandboxed)
I’m seeing the same issue after the recent Codex Desktop update.
Environment:
/home/ser/code/OZEError:
Observed behavior:
pwdcommand fails when using the WSL agent.+0 -79,210, as if the repo contents disappeared.What I verified:
wsl -l -vshows Ubuntu running on WSL2./bin/bash -lc pwdworks fine directly inside WSL./bin/bash -lc pwdalso works when called from PowerShell through WSL.bwrapexists and basic bubblewrap tests succeed.What I tried:
%USERPROFILE%\.codex\config.toml:%USERPROFILE%\.codex\tmp\arg0.~/.codex/tmp/arg0inside WSL.wsl --shutdownand restarted Codex Desktop.None of the above fixed the issue.
This looks like a regression in Codex Desktop’s WSL execution path after the recent update. The important detail is that WSL itself,
/bin/bash,bwrap, the repo, and Codex CLI are all working normally; only Codex Desktop in WSL agent mode fails.Update: I updated Codex Desktop from 26.602.71036 to 26.608.12217, but the issue still persists.
WSL agent mode still fails even for:
/bin/bash -lc pwdThe app reports:
No such file or directory (os error 2)The working directory is still detected as
/home/ser/code/OZE, but the shell process cannot be created. Windows native agent + PowerShell still works normally. So this still appears to be specific to the Windows Desktop + WSL execution path.I've updated the bash script based on poroburu post, as shown below:
Currently, I need to run this on Debian 13 (WSL) for each chat thread and every time I open Codex Desktop (on Windows). For now, this works as a temporary workaround for me.
I seem to be able to use WSL2 in codex after latest update:
Version 26.609.30741 • Released Jun 11, 2026It still happens in Codex App (currently it becomes ChatGPT Desktop) with WSL2, Codex 0.144.5.
I have already changed the agent setting to "Windows Subsystem for Linux" and shell to "WSL", but it still usually says something like "it can't see
/home/...in Windows sandbox" and requires executing outside the sandbox.I added a small diagnostic CLI after seeing several Windows/WSL reports like this one:
Repo: https://github.com/warren2008-2020-spec/codex-doctor
Right now it checks the general setup layer: platform/WSL signals, Node/npm, Git/GitHub CLI, Codex CLI, Codex config, proxy hints, and CI signals. It is read-only and does not try to repair the arg0 helper directory.
Given the details in this thread, I think the next useful checks would be more specific:
%USERPROFILE%\.codex\tmp\arg0\codex-arg0*contains Linux helpers or only.bathelperscodex-linux-sandbox/codex-execve-wrapperare present for the active helper dir/home/...vs/mnt/c/...bwrapis available inside WSLI am going to add those as read-only checks rather than a repair script, because the repair path is security-sensitive. If anyone here has a current failing machine and can share what signal would be most useful in a safe report, I can tune the output around this issue.