Windows Desktop: WSL integrated terminal tab immediately closes; wsl.exe exits with 4294967295

Resolved 💬 2 comments Opened Aug 10, 2026 by gagazhn Closed Aug 10, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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?

  1. Install/update Codex Desktop for Windows to package 26.803.5235.0.
  2. Set the agent environment to Windows Subsystem for Linux and the integrated terminal shell to WSL.
  3. Open any local project/thread.
  4. Click the terminal button or use the integrated-terminal shortcut.
  5. Observe that the terminal tab appears for a fraction of a second and closes.
  6. Inspect Sentry breadcrumbs and observe wsl.exe exiting with 4294967295.

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.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 18 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #37741

Powered by Codex Action

gagazhn · 18 days ago

Closing as duplicate of #37741