[BUG][Windows][WSL] Desktop diff-panel git probes still leak orphaned git.exe after #94655, when the session's folder is in WSL (\\wsl.localhost)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [ ] I am using the latest version of Claude Code
Desktop app 2.16120.0, installed 2026-09-29. Its bundled Claude Code is 2.1.284; the latest on npm is 2.1.285. The leak is in the desktop app's diff panel, so I have left the last box unticked rather than guess.
This is a follow-up to #94655, which was closed as completed on 2026-09-24. The same leak still happens on a desktop build installed five days later, when the session's working folder is on the WSL filesystem. Related: #97752 (the CLI's own git status, same launcher-kill cause) and #86646.
What's Wrong?
For a Code-tab session whose working folder is inside WSL, the desktop app runs Windows git.exe (Git for Windows) against the repo through \\wsl.localhost. Every call is slow over the WSL file bridge, so the long ones hit the app's timeout. The Git for Windows launcher (C:\Program Files\Git\cmd\git.exe) goes away, and the real git.exe it started keeps running for minutes with a dead parent. Nothing reads its output. Several run at once.
Measured on 2026-09-30, repo with 43,348 tracked files on the WSL ext4 filesystem, three Code-tab sessions open on the same folder:
- In 2 minutes (11:21 to 11:23),
claude.exestarted 39git.exeprocesses, in bursts every 5 to 15 seconds. The commands wererev-parse --abbrev-ref HEAD,remote get-url origin,config -z --get-regexp ...,symbolic-ref --short refs/remotes/origin/HEAD,ls-files --recurse-submodules,merge-base origin/master HEAD,rev-list --left-right --count origin/master...HEAD, and the diff and status probes below. - Even trivial commands took 1.5 to 3.8 s each. The same diff takes 0.09 s with Linux git inside WSL.
- A full
Win32_Processsnapshot at about 11:24 found fivegit.exewhose parent process no longer existed:
| Started | Running for | CPU used | Command |
|---|---|---|---|
| 11:16:19 | 455 s | 64.2 s | git diff --ignore-submodules=dirty --submodule=short --no-textconv --numstat -M <merge-base with master> |
| 11:16:19 | 455 s | 63.3 s | git diff --ignore-submodules=dirty --submodule=short --name-status -M <merge-base with master> |
| 11:22:46 | 69 s | 11.3 s | the same --numstat diff |
| 11:22:46 | 69 s | 10.2 s | the same --name-status diff |
| 11:23:17 | 38 s | 9.8 s | git status --ignore-submodules=dirty --porcelain=v2 --branch -z |
- The launchers for the 11:22:46 pair were still alive at 11:23:12 and gone by about 11:24, while their children kept running. An earlier pair started at 11:08:32 did the same.
- Each orphan held about 290 MB and 15 to 25% of one core. Serving their reads, the WSL file server (
plan9) used about 8% CPU inside WSL. Total Windows CPU reached 100% at one point, but an antivirus scan and a Storybook dev server were also running then, so not all of that is the app.
What Should Happen?
- For a folder on the WSL filesystem, run these git commands inside WSL, where the app already runs a server for the session. There they finish in well under a second.
- When a probe times out, end its whole process tree (the launcher's
mingw64\bin\git.exechild too), as #94655 asked. Do not start the next probe while the previous one is still running. - Worst case, the diff panel stays empty for that repo. It should never leave
git.exerunning for minutes.
Error Messages/Logs
# Snapshot of orphans (Win32_Process; parent looked up in the same snapshot)
git pid 4540 since 11:16:19 (455 s) parent 24480 (NOT RUNNING) cpu 64.2 s: git.exe diff --ignore-submodules=dirty --submodule=short --no-textconv --numstat -M f869fe82f9...
git pid 27468 since 11:16:19 (455 s) parent 37272 (NOT RUNNING) cpu 63.3 s: git.exe diff --ignore-submodules=dirty --submodule=short --name-status -M f869fe82f9...
git pid 2600 since 11:22:46 (69 s) parent 18492 (NOT RUNNING) cpu 11.3 s: git.exe diff ... --numstat -M f869fe82f9...
git pid 33856 since 11:22:46 (69 s) parent 9152 (NOT RUNNING) cpu 10.2 s: git.exe diff ... --name-status -M f869fe82f9...
git pid 35396 since 11:23:17 (38 s) parent 15256 (NOT RUNNING) cpu 9.8 s: git.exe status --ignore-submodules=dirty --porcelain=v2 --branch -z
# Stopping one orphan by hand (Stop-Process -Force) left this in the repo, blocking git writes:
.git/index.lock 0 bytes, created at the moment of the stop, no git process running in WSL or Windows
Every process carried the app's option set: -c core.quotepath=false -c safe.directory=* -c core.fsmonitor=false -c branch.autoSetupMerge=false -c core.useReplaceRefs=false -c core.hooksPath=\\.\NUL -c filter.lfs.clean= .... Their parents were claude.exe (C:\Program Files\WindowsApps\Claude_2.16120.0.0_x64__...\app\claude.exe) or a cmd\git.exe launcher started by it. The sessions' own tools inside WSL use Linux /usr/bin/git.
Steps to Reproduce
- On Windows with WSL 2 (Ubuntu) and Git for Windows installed the default way (
C:\Program Files\Git\cmdon PATH). - Clone a large repository (tens of thousands of tracked files) onto the WSL filesystem.
- In the Claude desktop app, open a Code-tab session whose working folder is that repository.
- Change many files in the working tree, for example by switching to a branch on a different base.
- On Windows, list
git.exeprocesses with their parent process and start time (Get-CimInstance Win32_Process). Look up each parent in the same snapshot. - Launchers exit after a few seconds; their
git.exechildren keep running for minutes with no parent.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
I have not seen it work for a WSL folder. #94655 was closed as completed on 2026-09-24, so a fix was expected, and the leak still reproduces for WSL folders on desktop 2.16120.0 (installed 2026-09-29). I have not tested whether the fix covers SMB or local-disk folders.
Last Working Version
Unknown
Claude Code Version
Desktop app 2.16120.0 (Code tab); bundled Claude Code 2.1.284 running in WSL
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
- Git for Windows 2.55.0.windows.5.
- Three Code-tab sessions were open on the same folder. If each session polls separately, that multiplies the load. I have not confirmed per-session polling.
- WSL
.wslconfig:memory=14GB,processors=6,swap=8GB.