Windows Desktop: WSL integrated terminal tab immediately closes; wsl.exe exits with 4294967295
What version of the Codex App are you using (From "About Codex" dialog)?
Windows Store package OpenAI.Codex_26.803.5235.0_x64; primary runtime bundle 26.805.11740.
What subscription do you have?
Chatgpt Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64, WSL2, default distribution Ubuntu-24.04.
What issue are you seeing?
After updating Codex Desktop from package 26.727.6591.0 to 26.803.5235.0, the integrated terminal no longer stays open when Codex is configured to use WSL.
Clicking the terminal button briefly creates a terminal tab, but the tab disappears immediately. Codex's Sentry breadcrumbs record the same event for each attempt:
category: child_process
message: Child process exited with code '4294967295'
spawnfile: wsl.exe
4294967295 is unsigned -1. No PTY or shell session remains attached to the thread after this exit.
The relevant desktop configuration is:
[desktop]
runCodexInWindowsSubsystemForLinux = true
integratedTerminalShell = "wsl"
The primary runtime dependency diagnostic succeeds with installed=true and problemCount=0. Codex itself continues to run commands in WSL; only the in-app terminal fails to remain open.
What steps can reproduce the bug?
- Install/update Codex Desktop for Windows to package
26.803.5235.0. - Set the agent environment to Windows Subsystem for Linux and the integrated terminal shell to WSL.
- Open any local project/thread.
- Click the terminal button or use the integrated-terminal shortcut.
- Observe that the terminal tab appears for a fraction of a second and closes.
- Inspect Sentry breadcrumbs and observe
wsl.exeexiting with4294967295.
The behavior reproduces consistently across repeated terminal-open attempts.
What is the expected behavior?
The integrated terminal should start a shell in the configured WSL distribution, remain attached to the current thread/project, and stay open until the user closes it.
Additional information
WSL itself is healthy. Running wsl.exe --status outside the Codex-managed sandbox succeeds and reports WSL2 with Ubuntu-24.04 as the default distribution. Running wsl.exe --status from the restricted Codex execution context fails with:
WSL ERROR: UtilBindVsockAnyPort:307: socket failed 1
This suggests that the updated desktop app is launching the integrated-terminal wsl.exe child in a restricted context where WSL interop/vsock setup is denied. The same machine and WSL installation worked with earlier Codex Desktop versions.
Possibly related but not a duplicate: #25225. That issue reports that a WSL terminal opens successfully and errors when it is closed; this report fails during terminal startup and the tab immediately disappears.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Closing as duplicate of #37741