Cursor kept draining my MacBook
Biome stuck at 900% CPU, orphaned node processes, a next-server eating 9 GB+
So I built a watchdog
It checks every minute, three strikes and the process is gone - 208 kills in 8 weeks, all battery issues fixed
The prompt, if you want your own 👇
"Build a macOS watchdog for runaway dev processes.
- Bash + launchd only, no dependencies
- Check every minute, only while I'm using the Mac
- Watch node, next-server, bun, biome, tsc, esbuild
- Stricter CPU and memory limits on battery than on AC
- 3 strikes in a row before acting
- Only kill my own processes inside ~/[my work dir]
- Never kill a dev server attached to a terminal
- Kill orphaned leftovers older than 4 hours
- SIGTERM first, SIGKILL after 5 seconds
- Stop after 3 kills per hour and notify me instead
- Start in notify-only mode
- Log every decision, never log command lines or env vars"
TIL you can build your own Control Center toggles on macOS
I made one that keeps my Mac awake with the lid closed
Now my coding agents keep running when I leave the laptop at home or bring it with me in my backpack on a hotspot
Apple will probably ship this eventually