
What happened
The author ran three background commands via claude -p on Windows 11 with Claude Code 2.1.330, stopped the task with TaskStop, and three seconds later all five resulting processes — including sleep.exe 123 and cat.exe — were still alive.
Why it matters
A stop command that reports STOPPED while spawned processes keep running means a user cannot rely on it to actually end a background job, and the leftovers here only disappear on their own because they were short sleeps.
Summaries like this, every morning.
By signing up you agree to the Terms of Service and Privacy Policy.
The bug traces to how Git Bash (MSYS2) launches commands on Windows. According to the issue's explanation, Claude Code stops a background Bash task with Windows' taskkill /T, which finds children by following Windows' record of the parent process. Git Bash first creates a copy of itself, that copy starts the command as a separate process, and the copy exits immediately — so from Windows' point of view the command's parent no longer exists and taskkill /T cannot see it. The author notes they did not verify that mechanism themselves, only the resulting behavior.
The practical exposure depends on what is left behind. Short commands like sleep end on their own within minutes, but a monitoring loop such as 'tail -f log | grep error', a 'while true; do ...; sleep 30; done' loop, or an ssh connection would persist. The issue reporter described several hundred such leftovers accumulating until a 64GB machine became unusable and had to be force-restarted twice, and the author notes that a setup running claude -p every night would add to the pile on each run.
A partial mitigation the author tested: running 'timeout 20 sleep 301' in background Bash and stopping it with TaskStop left timeout and sleep alive, but both disappeared after 20 seconds. The author did not test whether wrapping a shell construct like a while loop as 'timeout 600 bash -c \'...\'' stops the inner work as well.
Pick your industry and the AI tools you use, and get news related to your work every day.
By signing up you agree to the Terms of Service and Privacy Policy.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
At re:Invent 2026, AWS announced Project Code Confidence, which pairs LLMs with the Lean theorem prover to wri…
The developer says coding is handed to worker AI agents, while the human moves cards on the kanban and answers…

Across 10 apps built with Claude Code (Sonnet 5.5), adding a single security instruction changed nothing in th…

A practitioner describes using Claude, Codex, Kiro and several other AI tools side by side, choosing which too…

A developer switched from one session handling sites in sequence to one Claude Code subagent per site from Oct…

The author found 'Solve Vision with Code' (arXiv:2611.34813) and re-ran its comparison of video generation vs
