Windows Codex app WSL Agent Environment fails: missing bundled codex-resources\bwrap, then bash unexpected EOF

Open 💬 1 comment Opened Jun 21, 2026 by DWFlanagan

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

OpenAI.Codex_26.616.6631.0_x64__2p2nqsd0c76g0

What subscription do you have?

Pro

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Codex Desktop starts successfully when Agent Environment is set to Windows native.

However, when I change Agent Environment from Windows native to WSL, Codex fails to start with this dialog:

Codex failed to start.

(code=2, signal=null).
Most recent error: /usr/bin/bash: -c: line 1: unexpected EOF while looking for matching `"'

<img width="546" height="164" alt="Image" src="https://github.com/user-attachments/assets/237032a7-1810-4d34-a9db-9b42171875b9" />

WSL itself appears to work normally. This succeeds from PowerShell:

wsl.exe bash -lc 'echo hello'

Output:

hello

I also tried installing bubblewrap / bwrap inside Ubuntu, but the issue still occurs.

What steps can reproduce the bug?

  1. Install and launch Codex Desktop for Windows.
  1. Make sure WSL2 is installed and available. In my case the available distro is:

Ubuntu-24.04 Running 2

  1. Confirm WSL itself works from PowerShell:

wsl.exe bash -lc 'echo hello'

This prints:

hello

  1. Launch Codex Desktop with Agent Environment set to Windows native.
  1. Confirm that Codex starts successfully in Windows native mode.
  1. Open Codex settings.

7. Change Agent Environment from Windows native to WSL.

  1. Restart/relaunch Codex if prompted, or allow it to relaunch.
  1. Codex fails to start with this dialog:

Codex failed to start.

(code=2, signal=null).
Most recent error: /usr/bin/bash: -c: line 1: unexpected EOF while looking for matching `"'

  1. The logs show that before the bash EOF error, Codex fails to relocate its bundled WSL bwrap resource:

bundled_executable_relocation_failed
destinationPath=C:\Users\davef\.codex\bin\wsl\codex-resources\bwrap
errorCode=ENOENT
sourcePath="C:\Program Files\WindowsApps\OpenAI.Codex_26.616.6631.0_x64__2p2nqsd0c76g0\app\resources\codex-resources\bwrap"

  1. Installing bubblewrap/bwrap inside the Ubuntu WSL distro does not resolve the issue.
  1. Switching back to Windows native mode allows Codex Desktop to launch again.

What is the expected behavior?

When Agent Environment is changed from Windows native to WSL, Codex Desktop should start normally and run the agent inside the selected WSL2 distro.

The app should either:

  1. Successfully prepare/copy any bundled WSL support resources it needs, including codex-resources\bwrap, and launch the WSL Codex agent; or
  1. If a required bundled resource is missing or cannot be relocated, show a clear actionable error explaining the missing resource or install/package problem.

It should not fail with a generic bash quoting error:

/usr/bin/bash: -c: line 1: unexpected EOF while looking for matching `"'

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗