https://github.com/user-attachments/assets/d56b8996-09ee-49c4-8125-85eba52c32e0
brew install --cask swordfish444/tap/burnzombies
curl -fsSL https://raw.githubusercontent.com/swordfish444/BurnZombies/main/install.sh | bash
How it works
- Install it. One command. A flaming skull joins your menu bar and shows what it found within a minute.
- Run your agents. Claude Code, Codex, Antigravity, Cursor: as many sessions, worktrees, dev servers and builds as you like. Nothing about how you work changes.
- BZ burns the exhaust. From the first minute, and every 15 minutes after, it stops orphaned processes and deletes stale worktrees and rebuildable junk, backing up each worktree first. When it isn't sure, it asks you once, and your answer becomes a rule.
What happens next
- Minute one: BZ shows what it found, burns what's clearly safe and asks about the rest. With
--look-only it shows and asks but burns nothing until you choose Start burning.
- Around minute 10: if Claude Code or Codex is signed in, the first AI sweep judges what the rules don't cover.
- From then on: BZ looks every 15 minutes, quietly. AI sweeps run only when there's something new to judge, at most every 30 minutes.
- After a restart: BZ starts again when you log in, so it keeps going without you. Start at login in Settings turns that off.
What it burns
To BZ, burning means stopping a program or deleting a folder.
- 🧟 Zombie processes: robot browsers that Playwright, Puppeteer or an MCP server left open (often 1–3 GB each), plus Node workers and build watchers left running after their app or chat is gone.
Safety net: a polite
SIGTERM, sent only after an exact identity check.
- 📁 Stale worktrees nothing is using.
Safety net: first, a Git ref inside the repo saves committed HEAD and encrypted recovery saves uncommitted, untracked and ignored files up to 512 MB (browser profiles left by test runs aren't kept). If BZ can't verify that backup, the worktree stays. Branches are kept. Restore in one click from Findings for 7 days by default (configurable from 1–365 days, or off with a warning, in Settings → Backups).
- 🗑️ Rebuildable junk:
node_modules, build output, DerivedData.
Safety net: your tools rebuild it when needed.
Safe by default
- Hands off what's in use: never macOS, your apps, your AI tools, your main project folders, or anything a program or an open chat is using.
git worktree lock is a hard rail: locked worktrees are never removed and their inner node_modules / build folders are never stripped.
- Agent worktrees, siblings and slot pools wait for your yes: Claude Code, Codex, Conductor and Cursor worktrees, sibling checkouts beside your main repo, and reusable worktree pools (like
slot1..N) are ask-only by default, and No or Keep forever always wins.
- Every worktree is backed up before removal (7 days by default, customizable or opt-out in Settings); restore it in one click or by hand.
- Starter rules (switch each off in Settings → Burns without asking or via
--disable-starter):
- robot browsers nothing can drive anymore, once idle 10+ minutes;
- programs still driving a robot browser, an hour after their chat ended;
- orphaned programs from finished chats, once idle 1+ hour with no open port;
- orphaned programs that have barely used the CPU for 6+ hours and have no open port;
- merged worktrees with no local changes untouched for a month (never agent-owned, sibling or reusable pool worktrees);
- junk inside non-locked, non-pool worktrees untouched for two weeks;
- the throwaway profiles and recordings that robot browsers leave in your temp folder;
- settled scratch folders finished AI chats left behind (
$TMPDIR/claude-<uid> untouched 2+ days, ~/.codex/*artifacts untouched 3+ days, and Antigravity scratch / browser_sandbox untouched 2+ weeks, while keeping transcripts and conversation files).
- Robot browsers are browsers a tool started with automation flags: a control pipe, or a debugging port plus headless mode, a fake keychain or a throwaway profile. The browser you use has none of these, so it is never touched, and neither are logged-in profiles a tool keeps.
- The AI, if on, may burn a low-risk item only when it rates itself at least 85% sure: an orphaned program with no open port, a known junk folder, or an eligible non-agent, non-sibling, non-pool worktree nothing uses. Every burn it asks for passes BZ's own checks.
- Never on its own: worktrees made by Claude Code, Codex, Conductor or Cursor, sibling checkouts beside your main repo, reusable worktree pools, and anything locked with
git worktree lock.
- Your yes answers: a question says what it covers, like "Burn 5 tool caches?", and Yes also covers new matches later. Switch any rule off in Settings → Burns without asking. Settings → Never touches lists what BZ leaves alone, and you can add any folder or app (or pass
--never-touch at setup).
- Limits: at most 20 worktrees, 20 junk folders and 50 programs per look. BZ knows an idle Claude Code, Codex or Antigravity chat is still open from the session records those tools keep.
The tests check these rules on every code change. How cleanup stays safe →
FAQ
Without Claude Code or Codex signed in there's no AI at all; with one, AI sweeps are on by default and run on your login: roughly $0.30–$1.20 a sweep at API prices, or plan usage on a subscription. Background sweeps wake only when at least 250 MB of quiet, actionable items (or a busy CPU program) wait for judgment, back off when sweeps find nothing new to burn or ask, and enter Lean mode (2 GB minimum, 6h spacing) automatically if recent sweeps spend heavily for little space freed. Settings → Used this week shows what sweeps used alongside Token efficiency (space freed by zero-token rules, space freed by AI sweeps, and noisy sweeps skipped). Turn them off with Which AI → Off in Settings; the starter rules and your answers keep cleaning. Model and cost →
The plain facts BZ gathered about each item, like where it is, its size and what started it, plus any project files it reads in the folders it's judging, such as package.json, READMEs and configs. It's told never to read secrets such as .env files, keys or credentials. Its shell and web tools are switched off: it reads, then asks BZ to burn, and every burn it asks for passes BZ's own checks. All of it goes through your own Claude Code or Codex login, like any other request you make with it.
Yes: install with --look-only (curl … | bash -s -- --look-only). BZ finds, sizes and asks exactly as usual, and Findings lists everything it found, why, and what burning it would do. Nothing burns on its own: not the starter rules, not your yes answers, not the AI. The menu says Look-only · nothing burns and how much it would burn. When you're ready, choose Start burning there, or choose another level in Settings, and BZ starts burning what waited right away. A Burn now you click on one item still burns that item.
Already installed? Choose Look only in Settings. --observe-only is not a dry run: it only turns the AI off, and the rules keep burning.
Worktrees, yes: Restore in Findings for 7 days by default (customize to 1d, 3d, 7d, 14d, 30d, or any 1–365 days in Settings → Backups, or turn backups off with an explicit use at your own risk warning). Before burning a copy, BZ saves committed HEAD in a local Git ref (refs/burnzombies/retired/<id>) and preserves uncommitted, untracked and ignored files (such as .env) up to 512 MB in encrypted local recovery; rebuildable caches and browser profiles left by test runs aren't kept. A copy with more than 512 MB of other unsaved files waits for a question that names them; a Yes deletes those for good. Expired recovery archives and their Git refs prune automatically after your retention window, or you can restore by hand while kept:
git for-each-ref refs/burnzombies/retired # list restore points
git worktree add --detach ../my-copy refs/burnzombies/retired/<id>
git -C ../my-copy reset HEAD^ # only if the top commit is a "BurnZombies safety copy"
Junk folders get rebuilt by your tools. Programs get a graceful stop, which can't be undone.
Click Keep forever on one in Findings, and BZ and the AI leave it alone. On its own, BZ only stops a program whose app or chat is gone and that has no open port.
No. Without it, BZ skips the places macOS protects (Desktop, Documents, Downloads, iCloud Drive and other apps' data) and tells you what it skipped. With it, the same rules cover those folders too. To grant it, click Allow Full Disk Access in the menu. Access setup →
It downloads the release it pins, checks it against that release's SHA-256 checksums, checks the archive's paths and the app's code signature, and puts BurnZombies.app in ~/Applications. No sudo. Prefer a fixed version? Swap main in the URL for a release tag, such as v0.21.0, or install via Homebrew (brew install --cask swordfish444/tap/burnzombies) or the .dmg on Releases. Safe-trial flags like --look-only, --observe-only, --no-login-item, --no-failover, --never-touch, --disable-starter, and --backup-days pass straight through. Read install.sh · Installer options →
One app in ~/Applications, with its burnzombies command inside it, a data folder in ~/Library/Application Support/BurnZombies, and a login item so BZ comes back after a restart (switch off Start at login in Settings to remove it; updates keep your choice). Setup writes only BZ's own settings, not your agents'. The top of Settings shows your version and build. Choose Check for Updates, then Update and Restart when a newer release is available. BZ verifies the download and its release certificate, finishes current cleanup, replaces the app and restarts it; a failed restart restores the previous version. If you use v0.20.0 or earlier, run the install line once to switch to the Apple Developer ID release. The old updater trusts the previous signing certificate. Your BurnZombies settings are kept. macOS may ask you to grant Full Disk Access again after this change.
There's no telemetry or automatic update polling. Update checks and downloads contact GitHub only when you ask. Other traffic is your AI sweeps through your own Claude Code or Codex login and, on request, a GitHub CLI lookup of a worktree's pull request.
Yes. Give it this prompt:
Install and set up BurnZombies using https://raw.githubusercontent.com/swordfish444/BurnZombies/main/llms.txt. Preserve my existing agent settings and verify setup without running cleanup.
Switch off Start at login and stop BZ, then delete the app and its data folder. Restore points stay in your repos until you delete them. Three steps →
Learn more
User guide · How Autopilot decides · Safety · Privacy · Install options · MCP server · Feedback