Skip to content

Windows app with "Run agent in WSL": every command fails with "Failed to create unified exec process: No such file or directory" (arg0 helper dir deleted by Windows exec-server) #49731

Description

@twil21be

What version of the Codex App are you using (From “About Codex” dialog)?

Powered by Codex & OWL Version 26.928.21956

What subscription do you have?

20usd

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

no-active-thread-01a0f3f0-94ff-7451-83bf-3238585cc8fe

Subject: Codex desktop on Windows with "Run agent in WSL" enabled: every command fails with "Failed to create unified exec process: No such file or directory"

Environment

  • Windows 11 Pro 10.0.26200, WSL2 Ubuntu (kernel 6.18.40.1-microsoft-standard-WSL2), systemd=true
  • Codex desktop package OpenAI.Codex_26.928.2636.0_x64 (Windows codex.exe under %LOCALAPPDATA%\OpenAI\Codex\bin\c6fe824d725f02d7, WSL binary under %USERPROFILE%.codex\bin\wsl\65bf23c0b8844a0d)
  • config.toml: runCodexInWindowsSubsystemForLinux = true
  • Project opened from \wsl.localhost\Ubuntu\home...\projects... (inside WSL)
  • CODEX_HOME = C:\Users....codex (on /mnt/c from WSL's point of view)

Symptom
Every command the agent tries to run (git, pwd, with any cwd or shell) fails before execution:
exec_command failed: CreateProcess { message: "Rejected("Failed to create unified exec process: No such file or directory (os error 2)")" }
Reproduces after a full Windows reboot. Also in a new chat.

What I found (strace -f -p , filtered on ENOENT)

  • The WSL agent creates %CODEX_HOME%\tmp\arg0\codex-arg0XXXXXX with symlinks (codex-linux-sandbox, apply_patch, codex-execve-wrapper) pointing to the WSL codex binary.
  • Every command then fails on:
    execve(".../tmp/arg0/codex-arg0XXXXXX/codex-linux-sandbox", [... "--command-cwd", "/tmp", ... "--", "/bin/bash", "-c", "pwd"]) = -1 ENOENT
  • At that point tmp/arg0 contains only a different directory, created by the Windows-side process, holding apply_patch.bat / applypatch.bat. The WSL agent's directory (with codex-linux-sandbox) is gone.
  • Timeline from one boot: WSL codex app-server started 22:53:24; Windows "codex.exe exec-server --remote https://codex-cloud-environments.chatgpt.com/api --environment-id ccarenv" started 22:53:41; by 22:54 the WSL helper dir no longer existed.
  • Killing exec-server only makes the app respawn it within seconds. I found no setting to disable it (Codex Cloud and Legacy Codex Cloud have no environments; Connections has no devices; "codexCloudAccess" in .codex-global-state.json is "enabled_needs_setup").

What steps can reproduce the bug?

any command

What is the expected behavior?

No response

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions