[Windows] Auto-updater freezes when child processes (git, node, python) are still running
Summary
On Windows, when Claude Code spawns child processes (e.g. git.exe, node.exe, python.exe, dotnet.exe, sh.exe) via Bash tool calls and the user then triggers an in-app update, the updater hangs. The .exe cannot be replaced on Windows while any process holds a file handle open — and orphaned child processes do exactly that.
Steps to reproduce
- Run any Bash tool call that spawns
git,node,python, ordotnet(e.g.git status, a Python script, etc.) - Interrupt the call mid-way, deny the permission prompt, or let it time out
- Open Task Manager — the child process is still running (orphaned)
- Click "Check for updates" / trigger the auto-updater
- The app freezes or the update silently fails
Expected behavior
Child processes spawned by Claude Code should be terminated when:
- The parent tool call finishes or is cancelled
- The user triggers an update
- The app exits
Actual behavior
Child processes remain running indefinitely. The auto-updater cannot replace the binary because one or more child processes hold open handles to the install directory.
Environment
- OS: Windows 11 Pro 10.0.26200
- Shell: PowerShell + Git Bash (via Bash tool)
- Observed orphaned processes:
git.exe,git-remote-https.exe,sh.exe,bash.exe,node.exe,python.exe,dotnet.exe
Root cause
Windows process management does not cascade SIGTERM/SIGKILL to child processes the way Unix does. The fix requires associating spawned processes with a Windows Job Object (AssignProcessToJobObject) so that all children are forcibly terminated when the parent job handle closes.
Workaround
Kill known child processes manually before updating:
"git","git-remote-https","sh","bash","node","python","dotnet" | % { Stop-Process -Name $_ -Force -EA 0 }
Impact
- Users on Windows cannot reliably update the app without manually killing orphaned processes first
- Task Manager fills up with zombie dev-tool processes over the course of a session
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗