After a day of Claude Code sessions on my Windows 11 laptop I find dozens of bash.exe, sed, cat, tail, sleep, find, kubectl and git processes still alive. Nobody is waiting for their output any more. The laptop gets slow and memory fills up.
I did not want to wait for an upstream fix, so I wrote a PowerShell script that finds the leftovers and kills only those. It runs every ten minutes from Task Scheduler and again whenever a session ends. This post covers how it decides what to kill, the one surprise that broke my first design, and what it caught in its first days.
...читать далее "Reaping the orphan processes Claude Code leaves behind on Windows"