Repository navigation
Open
Labels
appIssues related to the Codex desktop appbugSomething isn't workingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.928.21956
What subscription do you have?
sub Pro5.x
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Summary
The Codex desktop app cannot execute even basic read-only commands when the Agent environment is set to WSL.
Every attempt fails during process creation, before the command runs:
exec_command failed: CreateProcess { message: "Rejected("Failed to create unified exec process: No such file or directory (os error 2)")" }
The same commands work when invoked directly through WSL from PowerShell. The standalone Codex CLI also works after repairing a separate npm installation issue.
Restarting the desktop app and creating a new chat in the same project did not resolve the desktop failure.
What steps can reproduce the bug?
# [Windows][WSL2] Desktop execution tools fail to create processes while direct WSL commands and standalone Codex CLI work
## Summary
The Codex desktop app cannot execute basic read-only commands with **Agent environment set to WSL**.
Every execution attempt fails during process creation, before the command runs:
```text
exec_command failed: CreateProcess { message: "Rejected(\"Failed to create unified exec process: No such file or directory (os error 2)\")" }
```
Direct WSL commands launched from PowerShell work. The standalone Codex CLI also successfully executes read-only commands.
Fully restarting the desktop app and creating a new chat in the same project did not resolve the issue.
Personal and project-specific paths below have been replaced with placeholders.
## Environment
| Component | Version / configuration |
|---|---|
| Desktop Windows package | `OpenAI.Codex` |
| Package version reported by `Get-AppxPackage` | `26.928.2636.0` |
| Desktop update tool: `installedVersion` | `26.928.21956` |
| Desktop update tool: `installedBuildVersion` | `12404` |
| Desktop update tool: `installedReleaseChannel` | `prod` |
| Desktop update tool: status | `up_to_date` |
| Agent environment | WSL |
| Default WSL distribution | Ubuntu, running under WSL 2 |
| WSL version | `2.7.14.0` |
| Linux kernel | `6.18.33.2-2` |
| Windows version reported by WSL | `10.0.26200.9457` |
| Standalone Codex CLI | `0.159.3` |
| Node.js used by standalone CLI | `18.19.1` |
| npm used by standalone CLI | `9.2.0` |
| Project storage | Ubuntu Linux filesystem, under `/home/<user>/projects/<project>` |
The desktop version values come from different interfaces. I am reporting both without assuming that the difference indicates a fault.
## Steps to reproduce
1. Open an existing project stored in the Ubuntu Linux filesystem.
2. Set the desktop app’s **Agent environment** to **WSL**.
3. Fully exit and restart the desktop app.
4. Ask the desktop agent to execute:
```bash
pwd
id
```
5. Also ask it to read a known existing file in the project.
6. Observe that all attempts fail during process creation.
7. Create a new chat in the same project and repeat the checks.
8. Observe the same failure.
## Expected behavior
The desktop agent should start a process in the selected WSL environment and execute the read-only commands.
If a required executable, helper, or working directory cannot be resolved, the diagnostic should identify the missing component or path.
## Actual behavior
Each attempt fails with:
```text
exec_command failed: CreateProcess { message: "Rejected(\"Failed to create unified exec process: No such file or directory (os error 2)\")" }
```
No command output is produced.
The following variations were tested and failed:
- Explicit `/bin/bash`.
- Explicit `/bin/sh`.
- Default shell configuration.
- Project working directory.
- `/tmp` working directory.
- Existing chat.
- Newly created chat after restarting the desktop app.
The working directory passed to the tool is only an input parameter. It was not verified by a successful `pwd` inside the desktop execution tool.
## Additional tool error
The Node REPL tool also fails before reading a file:
```text
Mcp error: -32602: js: codex/sandbox-state-meta:
sandboxCwd is not a local file URI:
file:///home/<user>/projects/<project>
```
The path above is redacted.
I do not know whether this shares a root cause with the execution failure, but it may be relevant to Windows/WSL path handling.
## Successful checks outside the desktop tools
Direct execution through PowerShell works:
```powershell
wsl -d Ubuntu -- /bin/bash -lc 'whoami'
```
Additional direct WSL checks confirmed that:
- The project directory exists.
- The tested file exists.
- The directory and file are owned by the expected Linux user.
- The file permissions allow reading.
The standalone Codex CLI `0.159.3` also successfully:
- Read the project’s instruction file.
- Executed `pwd`.
- Executed `id`.
**The desktop execution tools still fail despite these successful checks.**
## Separate CLI installation issue — resolved
During diagnosis, the standalone npm-installed CLI initially reported:
```text
Missing optional dependency @openai/codex-linux-x64
```
The declared dependency was:
```json
{
"@openai/codex-linux-x64": "npm:@openai/[email protected]"
}
```
An installation attempt using the existing npm registry configuration returned `ETARGET`. An explicit query to the npm public registry confirmed that the platform version exists.
After repairing the installation using the public registry, the standalone CLI became functional.
**This did not fix the desktop failure.** I am not assuming that the desktop app uses the separately installed CLI.
## Additional observation
Direct WSL startup reports a warning that a localhost proxy configuration was detected but was not mirrored into WSL in NAT mode.
Local commands still execute successfully despite this warning. There is no confirmed evidence that it causes the desktop process-creation failure.
## Impact
The desktop agent cannot read project files, edit files, or run validation commands.
The standalone CLI is usable, but the desktop execution tools remain unavailable.
## Diagnostic assistance requested
Could you advise:
1. Which executable or helper might be failing to start?
2. Whether the `sandboxCwd` URI error is related to Windows/WSL path mapping?
3. Which targeted, sanitized diagnostics would help investigate this without deleting configuration, authentication data, or session history?
No sandbox bypass, project permission changes, or configuration-directory deletion has been used as a workaround.What is the expected behavior?
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
appIssues related to the Codex desktop appbugSomething isn't workingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Oct 1, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
15969652028 commentedon Oct 1, 2026
Additional diagnostic evidence
A read-only
pwdtest with TTY enabled produced a more specific error:Test parameters:
pwd/bin/bash/tmpThis identifies an unavailable sandbox-helper path and closely matches
the observations in #49731 and #49365.
I have not verified whether the directory was deleted, a symlink target
became unavailable, or which process caused the condition.
The separate Node REPL
sandboxCwdURI error remains unresolved;a shared root cause has not been established.
Please consolidate this report with the appropriate tracking issue if
these observations confirm a duplicate.
15969652028 commentedon Oct 1, 2026
WSL2 desktop sandbox fails with ENOENT while the backend still holds a lock in an inaccessible arg0 directory
Summary
Sandboxed desktop commands fail before executing even a minimal
pwd. The running backend still has an open file descriptor whose symlink points into an arg0 launcher directory that is no longer accessible. A bounded attempt to recreate that directory failed withFile exists, although both WSL and Windows report that the directory does not exist.This is a new symptom after the previous
/mnt/wslg/distromount issue was worked around by disabling WSLg. That mount is currently absent.Environment
codex-cli 0.159.2./mnt/c/Users/<windows-user>/.codex/bin/wsl/65bf23c0b8844a0d/codex.1748767b230ebfc3d4ab7e4e254920d0c0ad9691fd8c11f190e7d44511a4a92e.CODEX_HOME:/mnt/c/Users/<windows-user>/.codex.CODEX_SQLITE_HOME:/home/<linux-user>/.codex/sqlite.Observed behavior
Ordinary desktop command:
Result:
The same shell and working directory work with escalated read-only execution. Bash, the backend executable, and the working directory exist. Ordinary commands had briefly worked after a desktop restart before this failure returned.
Launcher-directory evidence
The current backend PID was 250437. Reading
/proc/250437/fd/3returned:However:
ls -ldreports that the corresponding directory does not exist.codex-linux-sandboxhelper is inaccessible.[System.IO.Directory]::Exists(...)returnsFalse.Get-Item -LiteralPath ... -ForcereturnsItemNotFoundException.Other Codex processes using
/home/<linux-user>/.codex/tmp/arg0still had accessible sandbox helpers at the time of inspection. This is only a comparison, not proof that the storage location caused the failure.Bounded recovery attempt
With explicit user authorization, we rechecked the running executable and open-lock path, confirmed that the target was neither visible nor a visible symlink, and attempted a single
mkdirfor the missing directory. The intended next step was to restore onlycodex-linux-sandboxas a symlink to the exact running executable.The directory creation failed:
Because the script used
set -eu, the symlink creation did not run. No lock was created or replaced. A subsequent ordinary sandboxpwdstill failed with ENOENT. Further repair attempts were stopped.Expected behavior and questions
Launcher directories needed by a running backend should remain usable, or the backend should safely recover/recreate its helpers and report the missing path explicitly.
Could you investigate:
CODEX_HOMEis on a Windows-mounted filesystem.EEXISTdirectory behavior, and whether it could represent pending deletion or a mount/filesystem interaction.We have not identified the deleting process or proven any of these proposed causes. The recovery experiment did not reach symlink restoration, so it does not prove that restoring the helper would resolve the error. No authentication files, raw environment dump, customer data, or full session transcript are included.
anhbtn269-pixel commentedon Oct 14, 2026
I can reproduce this on Windows + WSL Ubuntu.
Codex Desktop fails before any command starts:
Failed to create unified exec process: No such file or directory (os error 2)
Repro:
What I verified:
wsl --shutdown, and selecting WSL again did not resolve it.Codex Desktop version: [Settings → About]
Windows version: [Windows Settings → System → About]
WSL distro/version: Ubuntu / [output of
wsl -l -v]