Codex desktop's concurrent `wsl.exe` git probes crash WSL's Interop server, and every new WSL session hangs until the distro restarts
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What happens
With a project in WSL (Ubuntu, systemd enabled), Codex desktop eventually fails worktree creation with:
[info] Starting worktree creation
[stderr] Failed to resolve git-root-relative cwd: Git is unavailable
After that, no new WSL session can be opened from anywhere on the machine (Codex, wsl.exe, terminals) until wsl --terminate Ubuntu or a reboot. Sessions already open keep working.
Root cause
WSL's in-distro Interop server crashes if a client disconnects before it replies. That's a WSL bug, tracked at https://github.com/microsoft/WSL/issues/41592:
WSL (2 - Interop) ERROR: SendMessage:182: Failed to write message LxMessageResultBool. Channel: InteropServer
terminating due to uncaught exception of type wil::ResultException: Broken pipe @...SocketChannel.h:183
kernel: init: Interop: potentially unexpected fatal signal 6.
Codex desktop is what creates that condition. Its Sentry breadcrumbs (%APPDATA%\Codex\web\Codex\sentry\scope_v3.json) show it starting about 20 wsl.exe processes within about 200 ms for git operations, and killing the ones that don't finish (exit code 4294967295). WSL handles session creation one at a time, so the burst queues up and Codex's timeouts fire. One kill during the handshake crashes interop. I've seen this twice in three days (2026-09-16 and 2026-09-18). The second time, a UI click in Codex came 6 s before the crash. After wsl --terminate Ubuntu, with Codex still open, it crashed again 6½ minutes later, 2 s after Codex opened a burst of sessions. So with Codex desktop open on a WSL project, restarting WSL only buys minutes.
After the crash, the "Git is unavailable" error is just Codex's own wsl.exe calls failing.
Suggested mitigations on the Codex side
- Limit how many
wsl.exeprocesses run at once for WSL projects, or reuse a single long-lived process for git calls. The WSL-side app-server is already running and could run them. - Don't kill
wsl.exeon a short timeout, or at least not while the session is still being set up. - When
wsl.exeprobes hang or fail with "Catastrophic failure", show a specific message ("WSL interop is unresponsive; runwsl --terminate <distro>") instead of "Git is unavailable".
Environment: Codex desktop 26.915.4065.0 (Microsoft Store), Windows 11, WSL2 kernel 6.6.114.1, Ubuntu with systemd=true.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from Codex desktop's worktree creation and git operations that launch concurrent wsl.exe probes. Reproduce the burst against a systemd-enabled Ubuntu WSL distro, then inspect how probe timeouts and process termination are handled. Done means WSL interop no longer crashes under these probes and failures report that WSL is unresponsive rather than only saying Git is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- desktop, devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100