Repository navigation
Description
Summary
Codex Desktop on Windows, configured to run the agent and integrated terminal in WSL, could not execute even pwd. Restarting the app changed the missing helper-directory suffix but reproduced the same failure.
This appears related to #49731 and #49789. This report adds a second independently verified blocker: after restoring the Linux sandbox launcher, the bundled backend panicked because neither a bundled nor system bwrap existed.
Submitted at the affected user's request. Personal names, project paths, credentials, and session transcripts are omitted.
Verified environment
- Windows package
OpenAI.Codex:26.928.2636.0(Get-AppxPackage). - Desktop-bundled WSL backend:
codex-cli 0.159.2. - Ubuntu 24.04.2 LTS; WSL distribution Ubuntu.
- Kernel:
6.18.33.2-microsoft-standard-WSL2. - Project stored on the Linux filesystem.
- Desktop's CODEX_HOME is Windows-backed:
/mnt/c/Users/<user>/.codex. - Installed WSL backend directory contained
codexandcodex-code-mode-host, with nocodex-resources/bwrap. - Initially no system bubblewrap package or /usr/bin/bwrap.
Reproduction and observations
- Open a WSL project with the agent configured for WSL.
- Normal exec_command, with and without a PTY and with explicit /bin/sh or /bin/bash, fails before the shell starts.
- Without PTY:
Failed to create unified exec process: No such file or directory (os error 2) - With PTY:
Unable to spawn /mnt/c/Users/<user>/.codex/tmp/arg0/codex-arg0<id>/codex-linux-sandbox because it doesn't exist on the filesystem (ENOENT: No such file or directory) - The live WSL agent retains fd 3 referencing the missing helper directory's .lock. The visible shared arg0 directory contains a different directory with only .lock, apply_patch.bat and applypatch.bat.
- Full app close/reopen creates a new missing Linux helper path and reproduces the failure.
- Individually approved execution outside the sandbox succeeds, confirming that the Linux shell and project exist. This alone does not establish sandbox recovery.
The deleting process was not traced locally. Windows cleanup attribution is supported by evidence in #49731, but remains unproven for this particular installation.
Verified local recovery
- Bind-mounted a user-owned Linux filesystem directory over only the WSL view of CODEX_HOME/tmp/arg0, isolating it from the Windows-visible directory.
- Recreated the current session's missing helper symlinks to the same installed WSL Codex executable.
- Retrying normal sandboxed execution reached the launcher, but then failed with:
bubblewrap is unavailable: no system bwrap was found on PATH and no bundled codex-resources/bwrap binary was found next to the Codex executable - Installed Ubuntu's signed bubblewrap package
0.9.0-1ubuntu0.3. - Normal exec_command then succeeded without require_escalated: pwd, repository file listing, reading a file, and a temporary workspace write.
- A test write outside the workspace was denied with
Read-only file system, confirming sandbox enforcement remains active. - Verified Windows and WSL see different launcher-directory contents after the bind mount.
- Added a backed-up fstab entry; systemd reports the generated mount unit loaded and active. Persistence across a subsequent WSL restart has not yet been tested.
No sandbox policy was disabled, no credentials or session databases were changed, and no project source files were changed. This is a locally verified workaround, not an upstream fix.
Request
Please address shared Windows/WSL helper-directory cleanup, detect/recover missing live-agent helpers, and ensure the Desktop WSL backend provides or checks its bubblewrap dependency. A working bash and WSL configuration currently still produce opaque pre-execution failures.
Activity
github-actions commentedon Oct 2, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
enjibby commentedon Oct 6, 2026
Additional reproduction and verified local recovery on 6 October 2026, submitted at the affected user's request.
Environment:
OpenAI.Codex 26.930.4958.0.codex-cli 0.160.0.6.18.33.2-microsoft-standard-WSL2, Linux architectureaarch64.CODEX_HOMEis/mnt/c/Users/<windows-user>/.codex./usr/bin/bwrapalready installed, version 0.9.0.Before recovery:
exec_commandwithtrue, explicit/bin/bashor/bin/sh, and either the project directory or/tmp, failed before shell startup withFailed to create unified exec process: No such file or directory (os error 2).tmp/arg0/codex-arg0<id>PATH entry, but that directory was again absent. The shared visible arg0 root contained a different directory with only.lock,apply_patch.bat, andapplypatch.bat.Verified recovery:
/etc/fstab. Active Windows.lockfiles could not be read and were excluded from the backup.CODEX_HOME/tmp/arg0. Windows and WSL then showed different directory contents.pwd, README read, temporary workspace file creation/read/removal.EROFS(errno 30), confirming filesystem sandbox enforcement remained active.bind,nofail,x-systemd.requires-mounts-for=/mnt/c; configuration validation passed and the generated systemd mount unit is loaded and active. A full WSL restart has not yet been tested.No sandbox policy was disabled. No dependency installation was needed here. A separate Node initialization error remains and is being reported on #42924.
Please fix helper lifecycle isolation/recovery for Windows and WSL processes sharing a Codex home, including detecting an absent cached launcher before process creation. A manual runtime mount should not be necessary.