Fix Codex "Failed to create unified exec process" in WSL
Codex Windows app in WSL mode fails every command with "Failed to create unified exec process". Update to 26.1013.31256+; a community workaround exists.
Failed to create unified exec process: No such file or directory (os error 2)This error appears in the Codex Windows app in WSL mode, and one user reported that updating the app to 26.1013.31256 or later fixed it. If updating does not help, use the community bind-mount workaround below (it is not an official fix). Every command fails with the same text, whether it is git or pwd and whatever the working directory. Rebooting Windows or opening a new chat does not help. Issue #49731 in the official repository collects the reports; one issue marked as a duplicate (#50078) and three possible duplicates (#49630, #49400, #49365) are linked to it.
This post is not a reproduction. It summarizes that issue. The cause below is users' analysis, not something a maintainer confirmed. An OpenAI contributor commented "I'll fix." on Oct 12 and the issue was closed, but reports of the error on newer builds kept arriving afterwards.
[1] Check that your case matches. The original reporter used Windows 11 Pro, WSL2 Ubuntu with systemd, runCodexInWindowsSubsystemForLinux = true, and a project opened through a \\wsl.localhost path. If your setup overlaps and the message is identical, it is the same problem. For other failures see Codex CLI "stream disconnected before completion" or Codex CLI MCP startup timeout.
[2] Update the app. Per the issue comments, these versions still failed:
| Version | Reported |
|---|---|
| 26.928.2636.0 to 26.928.40906 | Oct 1-2 |
| 26.1007.2314.0 | Oct 10-11 |
| 26.1007.71326 (released Oct 13) | Oct 14-15 |
On Oct 16 a user reported that 26.1013.31256 fixed it on Debian WSL2. They noted the active helper directory is now named tmp/arg0-linux, matching PR #53412. That is a user report only; the fix was not found in official release notes. If About shows an older version, update first.
[3] If it still fails after updating, look at the cause. The users' analysis in the issue: the engine inside WSL and the Windows codex.exe share one CODEX_HOME (C:\Users\<name>\.codex), including tmp/arg0. At every startup each side runs a cleanup that deletes helper directories it thinks are unused. A Linux file lock and a Windows lock cannot see each other, so whichever side starts second deletes the helper directory (the one holding codex-linux-sandbox) that the other side is still using. Reports say the directory vanishes about a minute after startup, and one user saw Windows codex.exe deleting it in Process Monitor. After it is gone, restarting the app and WSL just repeats it with a new directory name.
[4] If you need to work now, use the community workaround: keep a WSL-only tmp/arg0 on the Linux filesystem (ext4) and bind-mount it over the Windows-backed tmp/arg0 path, so neither cleanup can see the other's directories. This is condensed from an issue comment written on Oct 10 and confirmed by another user on Oct 11. OpenAI does not document it.
$ WINUSER=<Windows user name>$ SRC=/home/$(whoami)/.codex-arg0-wsl$ DST=/mnt/c/Users/$WINUSER/.codex/tmp/arg0$ mkdir -p "$SRC" && chmod 700 "$SRC"$ sudo cp /etc/fstab /etc/fstab.bak$ echo "$SRC $DST none bind,nofail 0 0" | sudo tee -a /etc/fstab$ sudo mount --bind "$SRC" "$DST"$ findmnt "$DST"findmnt should show ext4 and your $SRC. An engine that is already running still holds the deleted old path, so quit Codex fully (including the tray icon), shut WSL down from PowerShell, and reopen the app.
PS> wsl --shutdownIn the reopened Codex, run pwd with default (sandboxed) permissions and check that it passes without an approval prompt. One user reported a brief Processing /etc/fstab with mount -a failed line in the boot log (/mnt/c does not exist yet at that moment), after which the mount is active about a second later. A comment from Oct 2 shows an alternative: put [boot] command = mount --bind <SRC> <DST> in /etc/wsl.conf instead of using fstab.
To undo, delete the line you added to /etc/fstab and unmount.
$ sudo umount "$DST"[5] The issue also lists what does not work or is not advised:
| Attempt | Result |
|---|---|
Install bubblewrap and set unified_exec = false | No change (reported Oct 1) |
| Recreate the directory by hand | Temporary recovery only; it comes back as a new directory after a restart (reported Oct 1) |
| Run commands outside the sandbox | Avoids the error; the reporter noted unknown side effects |
| Switch to full access | Only skips the sandbox; not a fix |
The last two let the agent write and delete anywhere, so avoid them on repositories that matter. See Codex CLI approval and sandbox modes for the permission model.
[6] If none of this works, add your version number, the error text, and your WSL distribution as a comment on the issue. It was closed on Oct 12, a reopen was requested on Oct 14, and reports on updated builds kept arriving, so its state may have changed.