Your AI agents are leaving dev servers running
Claude and Codex are great at starting dev environments and terrible at stopping them. How to audit what's actually running on your Mac - and what it costs.
AI coding agents have a habit nobody talks about: they’re great at starting things and terrible at stopping them.
An agent working on a branch will happily create a worktree, npm install, boot a dev server, start a Docker stack, and open a tunnel - because that’s what finishing the task required. Then the task ends, the PR merges, the chat window closes… and every one of those processes keeps running. The agent doesn’t come back to turn the lights off. That’s now your job, except you don’t know which lights it turned on.
After a few weeks of agent-heavy work, a typical Mac carries:
- dev servers on ports you’ve never visited, serving branches that merged weeks ago
- Docker containers with names like
a3f81c9e2b…that map to something, somewhere wp-envenvironments whose directory names are literally MD5 hashes- gigabytes of RAM held by node processes for projects you finished
Auditing it by hand
You can reconstruct the picture manually. Listening processes and their ports:
lsof -iTCP -sTCP:LISTEN -P -n
What each one actually is and where it runs from:
ps -o pid,ppid,pcpu,rss,command -p <pid>
lsof -p <pid> | grep cwd
Running containers and what directories they’re bound to:
docker ps --format '{{.Names}}\t{{.Status}}'
docker inspect <name> --format '{{range .Mounts}}{{.Source}}{{"\n"}}{{end}}'
The tedious part isn’t running the commands - it’s the joins. Mapping a port to a process to a working directory to a worktree to a branch to a decision: am I done with this?
The plot twist: sometimes it isn’t your worktrees
Half the time the fans are spinning for reasons that have nothing to do with your dev environments. Before killing dev servers, compare their actual cost against the whole machine:
ps -axo pcpu,rss,comm | sort -rn | head -15
In our experience the top of that list is rarely a dev server - it’s the browser, Docker’s VM, Xcode indexing, or the AI apps themselves.
Making the joins automatic
This audit is what Clueprint does continuously. It maps every listening process and container back to its worktree and branch (including decoding those wp-env MD5 hashes), shows live CPU and memory per stack, detects which branches still have a Claude or Codex session attached, and, when the machine is under load, tells you honestly whether your worktrees are the problem or whether it’s Chrome’s fault again.
And when you are done with something, the cleanup flow closes the loop the agents never do - with checks strict enough that you can’t lose work doing it.