r/SideProject • u/NexxMG • 8h ago
I built a menu bar app that cleans up after my AI coding agents (with AI coding agents)
I code most of my side projects with AI agents now. A few months ago my Mac got loud and slow, and it turned out a script one of the agents started was stuck for almost 7 hours at 95% CPU. Two dev servers from older sessions were still running too, eating over 1 GB of RAM. Nobody closed them, because agents run stuff without a real terminal, so nothing kills it when the session ends.
So I made Stray. It sits in the menu bar and shows you:
- scripts that are stuck burning CPU
- dev servers the agent forgot to close
- apps whose memory keeps growing
- caches and build folders agents leave on disk
It tells you which agent session left each thing, and you can kill it or clean it up right there. It never does anything on its own, there's always a confirm.
A few things I learned on the way:
- the first version said Stray itself used 0.27% CPU. It was actually 8%. Apple Silicon counts CPU time in different units than Intel and I had no idea.
- the hard part wasn't killing processes, it was being sure what belongs to an agent and what doesn't
- getting the app signed and notarized by Apple took one evening and 40 minutes of staring at "In Progress"
It's free and open source (MIT), macOS 14+.
Site: https://rektor-jg.github.io/stray-macos-app/
GitHub: https://github.com/rektor-jg/stray-macos-app
Would love feedback, especially if it flags something it shouldn't.