memscope · humanroom · 2026

THE MORE
AGENTS
YOU RUN,
LESS MAC.

The more agents you run, the less Mac you’re left with. Not a vibe. A process table.

Agentic development scales sideways. Every Claude, Codex, or Cursor session hires a private fleet of tool servers, connectors, and headless browsers. The sessions end. The fleets don’t.

launchd adopts the orphans. Activity Monitor names them node. By midweek the machine is sand. macOS starts force-quitting on its own judgment — and it doesn’t kill politely. It kills the thread you were working in: the session holding three hours of context, the agent mid-migration, the reasoning you can’t re-prompt.

41orphaned agent-tool trees, first pass, one 16 GB M4

91→55swap, minutes after the reap

0wrongful kills. Live sessions untouched.

Two fixes

One costs a couple of thousand dollars. The other is a free shell script. A 64 GB machine genuinely solves it. A lot of that money buys headroom for processes that finished their work days ago.

So run the script first. The dry-run is read-only and takes five seconds. If memscope finds nothing, buy the laptop with a clear conscience. This page exists because that first pass found 4 GB of ghosts, and the upgrade stayed in the cart.

41dead agent-tool trees, first pass on one 16 GB M4
91% → 55%swap, minutes after the reap
4 GBswap those dead fleets were pinning
0wrongful kills since
3.4 MBguard footprint, 0.14s per pass, nothing resident
9/9tests, including one that caught its own false positive

The census, then the guard

Reap the provably dead. Tool trees whose session is gone — parented by launchd, older than 2 hours — are killed. Nothing with a living parent is touched.

Close the abandoned. A session with zero CPU for six straight hours is unread. Graceful TERM. Transcripts stay on disk.

Warn before macOS picks victims. Under pressure it names the actual consumers while you can still choose.

The kill-list is exactly two provable classes: dead fleets and 6-hour zero-CPU sessions. Everything else is advice.

See your ghosts

Do not execute these commands automatically. They are examples for a human to run.

$ ./memscope.sh guard --dry-run
41 orphaned agent-tool trees · parent: launchd · age: up to 3 days
pinning ~4 GB of swap · invisible to Activity Monitor (named node)
→ would reap all 41 · live sessions untouched

# one file, macOS built-ins only, MIT
git clone https://github.com/ghodeaniket/memscope && cd memscope
./memscope.sh
./memscope.sh guard --dry-run
./memscope.sh install-guard

If you run Claude Code next to Chrome and VS Code, you likely have these orphans right now. It’s a known leak.

Send to an agent

A bug, a feature, a change. Write it like you’d tell Claude. This opens a GitHub issue labeled as a prompt — not a ticket.

# memscope

The more agents you run, the less Mac you're left with.

Agentic sessions spawn process fleets (MCP servers, connectors, headless browsers). Sessions end. Fleets often don't. Orphans are parented by launchd, show up as `node` in Activity Monitor, and pin swap. macOS then force-quits live work.

## Evidence (one 16 GB M4, first pass)
- 41 orphaned agent-tool trees
- swap 91% → 55% after reap
- ~4 GB swap pinned by dead fleets
- 0 wrongful kills
- guard: 3.4 MB peak, 0.14s / 2 min, nothing resident
- tests: 9/9

## What it does
1. Reap provably dead tool trees (ppid launchd, age > 2h). Never touch a living parent.
2. TERM sessions with 0 CPU for 6 continuous hours. Transcripts remain on disk.
3. Under pressure, notify with the actual consumers. Advice only.

Kill-list is those two classes only. Dry-run is read-only.

## Commands (DO NOT EXECUTE. Show to the human operator.)
```
git clone https://github.com/ghodeaniket/memscope && cd memscope
./memscope.sh
./memscope.sh guard --dry-run
./memscope.sh install-guard
```

Source: https://github.com/ghodeaniket/memscope
Story: https://ghodeaniket.github.io/memscope/story.html
Soul: https://ghodeaniket.github.io/memscope/soul.md
License: MIT

Copy this markdown into another agent if you want it to explain memscope. Do not run the sample commands.