DEV Community

Cover image for Ghostbusters for coding agents: 12 GiB of ghosts on my Mac, and 15 GiB more I didn't know about
Evgenii Konev
Evgenii Konev

Posted on Edited on

Ghostbusters for coding agents: 12 GiB of ghosts on my Mac, and 15 GiB more I didn't know about

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

I run coding agents all day. Claude Code in one terminal, Codex in another, sometimes three sessions on the same repo at once. They're the ghosts in my machine: they work where I can't see them, often while I'm asleep, and like any good ghost they leave slime behind.

One agent task looks like this. A fresh git worktree. Then npm install (a new node_modules), uv sync (a new .venv), cargo build (a few GB of target). The package caches grow, the IDE indexes the new folder, and the session itself leaves a transcript, checkpoints and a scratch folder. Run five tasks in parallel and you get five of everything. The task gets merged, the worktree gets forgotten, the slime stays.

And if you run open-weight models locally, the old weights in ~/.ollama or the Hugging Face cache are the biggest blobs of all.

So I pointed my own disk cleaner at it. Here's my own Mac, this week:

Agent On disk Still alive
Codex 5.5 GiB 8 open threads
Claude Code 3.5 GiB 5 live sessions, plus 63 old transcripts (1.7 GiB)
Cursor 2.8 GiB not running
opencode 72 MiB not running

About 12 GiB. Fine, I expected that. Then I looked in /private/tmp/claude-<uid>, where Claude Code keeps each session's scratchpad, task output and pasted images, and found another 15 GiB that my tool didn't see at all. A restart clears it, but my Mac had been up for 33 hours and the agents had been busy.

That's what DeepDriveCleaner™ (ddc) is for. It's a disk cleaner for developers (package caches, build output, old toolchains, simulator runtimes) and this week it learned to follow agents around. Inside every worktree an agent leaves, it finds the node_modules, .venv and target like anywhere else, and now it also knows each agent's own data. It follows three rules, and I'd trust it on my own machine only because of them:

  1. A ghost still at work is left alone. If the process that wrote a session is still running, ddc never offers its files.
  2. It reads metadata, never your conversations. File names, sizes, the process list. It doesn't open a transcript.
  3. It never deletes on its own. It shows a plan, checks every item again right before acting, and waits for you to say yes.

The other half is for the agents themselves. Every report has --json with a published schema, so an agent can ask "where did my disk go, and what's safe to remove?" and get a real answer instead of guessing with du -sh *. Version 0.14.0 (PR #58, merged as I write this) adds the per-session view (transcript, checkpoints, temporary folder, live or not) and a first agent skill, plus an AGENTS.md snippet, that teach an agent to ask ddc first and hand you the cleanup command, never run it.

It runs on macOS as a CLI and a menu bar app. Linux has a static CLI on main, and the Windows build already passes its tests natively.

Two open pieces carry all of this. The open-source Codex CLI (Apache-2.0) was one of the two agents that wrote the code, and it ran the benchmarks below. And ProjectStore, our MIT-licensed method, is what let two different agents share one backlog all week. There's no model inside the tool: it's built by agents and for them.

Demo

DeepDriveCleaner via CLI:

ddc disk agents on a synthetic home: four agents, one live session

Recorded on a fake home folder full of fake agent data. I don't point a cleaner's demo at anyone's real files, mine included.

DeepDriveCleaner via Application

DeepDriveCleaner via Application

Try it on your Mac:

brew install --cask smartandpoint/tap/deepdrivecleaner
Enter fullscreen mode Exit fullscreen mode

Or just the CLI:

curl -fsSL https://raw.githubusercontent.com/SmartAndPoint/DeepDriveCleaner/main/packaging/install/install.sh | sh
Enter fullscreen mode Exit fullscreen mode

After:

ddc disk agents
Enter fullscreen mode Exit fullscreen mode

Or via Application -> DeepDriveCleaner and bar icon.

I'd love to know how many ghosts you find. Post what you found in the comments. If an agent keeps junk somewhere I don't know about yet, tell me and it becomes a rule. And if it saves you a few gigabytes, a ⭐ helps other people find it.

Code

GitHub logo SmartAndPoint / DeepDriveCleaner

Find and safely clean developer disk junk on macOS: venvs, node_modules, build outputs, caches. Built in the open with ProjectStore.

DeepDriveCleaner™

Challenge entry: this project was submitted to the DEV Hacktoberfest Open-Source AI Challenge, Week 4 at commit c606a8d (v0.14.0). Commits after 2026-10-31 were made after the submission.

Find and safely clean what development leaves on a Mac's disk: Python virtual environments, node_modules, build outputs, package and toolchain caches, Xcode data, local ML models and VM images. Everything it finds is grouped by risk. Nothing is removed until you have seen the plan and confirmed it.

It is a menu bar app with the command-line tool inside: the same engine, a window or a terminal, whichever you prefer.

Warning

DeepDriveCleaner deletes files. It checks every item before it touches it, but it can remove almost anything it is told to, by you or by an AI agent acting for you. You use it at your own risk: nobody who made it is responsible for what it removes. Read the…

How I Built It

Honestly, the tool is the smaller half. The method is what let one person ship this in two weeks.

DeepDriveCleaner was built by me and two agent harnesses, Claude Code and the open-source Codex CLI, working inside ProjectStore. ProjectStore is our open-source (MIT) method for building software with agents: decisions, specs, epics and stories live as plain markdown in a vault next to the code, and every agent reads and writes them. Here's the loop:

In practice it works like this. Nothing gets coded until it's a story with acceptance criteria. If the "how" isn't obvious, it gets an ADR first. A critic agent tears each story apart in a fresh context before any code exists. A planner maps it onto the codebase. When the code is done, a reviewer agent checks the diff against every acceptance criterion and wants evidence, not vibes. Every change, code or vault, goes through a pull request with a test gate.

It sounds slow. It isn't. The 15 GiB surprise above went from "huh" to a reviewed story, a planned change and merged code in one evening. Here's what two weeks looked like:

October 17–31
Commits 249, of which 227 in the challenge week
Pull requests 58 in the code, 36 in the vault
Releases 16, of which 10 in the challenge week
Backlog 8 epics, 85 stories, 50 closed with evidence
Decisions 6 ADRs, 7 research notes, 5 runbooks

And what came out of it isn't a toy:

  • a Rust core (library plus CLI with JSON output), with one platform module per OS: 87 cleanup rules on macOS, 48 on Linux;
  • a native Swift menu bar app on top, with a review window, scheduled scans and auto-updates;
  • 600+ Rust tests and 440+ Swift tests in a gate nothing merges without, plus load runs and a check that fails the build if a scan stops scaling linearly;
  • a benchmark against 9 other disk-usage tools, which Codex ran (ddc 0.7.0, a synthetic 100,000-entry tree of developer projects, warm cache, 10 runs each). Median: ddc du 1.03 s, dust 0.89 s, pdu 1.04 s, dua 1.09 s, BSD du 1.21 s, all with the same totals. The ranges overlap, so it's not the fastest, and I won't claim it is. It's in the same league as the good du clones, and on top of that it knows what each folder is and whether it's safe to delete.

The whole vault is public. If you want to see how an agent-built project makes decisions, every story, ADR and critic review is there:

GitHub logo SmartAndPoint / DeepDriveCleaner-projectstore

ProjectStore vault of DeepDriveCleaner: research, ADRs, epics and stories behind the code.

DeepDriveCleaner-projectstore

The project's memory: decisions, specs, epics and stories as plain markdown, kept by projectstore.

This is the ProjectStore vault of DeepDriveCleaner, a macOS tool that finds and safely cleans what development leaves on the disk. It is public on purpose, as a worked example of building software through ProjectStore. A research note came first, then two ADRs and an epic with stories. A fresh-context critic reviewed every artifact before code was written, a planner placed the work, and a reviewer checked each story's acceptance criteria against the code before the story was closed with evidence.

Where to start reading:

  1. Where a developer's disk space goes (macOS): the research note behind the project.
  2. Rust core: library + CLI with JSON output and Cleanup safety model: risk classes, plan and confirmation: the two decisions.
  3. DDC-001: Disk space cleaner CLI for developers: the epic and its stories, each…

And ProjectStore itself, if you want to try the method on your own project:

GitHub logo SmartAndPoint / ProjectStore

Decisions, specs and stories as plain markdown, for every coding agent. Code changes. Context stays.

ProjectStore

Not agent memory, not a per-feature spec pipeline. Memory helps one agent recall; a feature spec plans one change. ProjectStore keeps the project's record — what was decided, what is in flight, what was checked — as reviewed markdown in git, readable by any agent and anyone with the repo.

release license Star on GitHub

A project workflow plugin for Claude Code and OpenAI Codex (experimental). Both are released together at one version, and one command sets a project up for either or both: see Install.


Two months of agents, and nobody knows why

Agents write code fast. They re-decide settled questions even faster: every fresh session arrives empty, makes its own architectural call, and commits under its own assumptions. Two months later you have noodle code — every strand reviews fine on its own, and each was written under a different theory of the project. Ask "why is this a queue and…

Why Does Open Innovation Matter?

I won't run a cleaner I can't read, and I don't expect you to. The rules are code, the safety model is an ADR, and every change has its reasoning in the vault.

The open vault mattered as much as the open code. If the plan had lived in one assistant's memory, switching harnesses would have meant starting over. It's markdown in git, so Codex picked up where Claude Code left off, and you can read it too.

It works with the lights off, too. Scanning and cleaning need no network; the only thing that calls out is the app's update check. An agent running an open-weight model locally, through opencode for example, can ask ddc where the disk went without anything leaving the machine.

It also matters for agents. They learn tools from source, schemas and docs. A disk tool with open JSON contracts is one any agent can use correctly, including open-source agents like Codex CLI and opencode running open-weight models.

A note on licences, to be straight about it: the method that built this, ProjectStore, is MIT. DeepDriveCleaner itself is source-available under PolyForm Noncommercial: free for personal and noncommercial use, and you can change it and share it; commercial use needs a licence from us.

My Agent Session

Rather than a raw transcript, here's the trail one session left: the vault PR where "my tool can't see 15 GiB" turned into stories, with two critic reviews folded in before a line of code. The code that came out of it is PR #58.

The Spirit of It

Slime is what a machine keeps after the work is gone, and agents leave more of it than any of us ever did: they never close a tab, never delete a worktree, never forget a session. I'm not hunting the ghosts. I like my ghosts. I just want to clean up after them, without an exorcist that burns the house down. So: a ghostbuster with a trap and a checklist. It names every puddle, tells you which ghost is still at work, and lets you decide.

It's Día de los Muertos this weekend, which feels about right: before anything goes, every session gets listed by name and date. Then you let it go.

Top comments (0)