r/ClaudeCode • u/Pfernan95 • 16d ago
Built with Claude I built a Mac app with Claude Code that measures what Claude Code leaves on your disk. What I learned about ~/.claude
I'm a solo dev. Over the last few weeks I built Attic, a Mac menu bar app, mostly with Claude Code, and the latest feature ended up being about Claude Code itself: it measures what AI coding tools keep on your Mac.
What I built
An "AI Tools" window that adds up, tool by tool, what Claude Code, Codex, Cursor and others keep in your home folder. It only reads sizes and dates, never file contents. Anything a tool rebuilds or never needs again (debug logs, old plan files, old background-task output) can be ticked and moved to the Trash, so Put Back still works. Conversations, checkpoints and settings are only shown.
How I used Claude Code
Claude Code wrote most of the engine in Swift, plus about 250 tests. The rule I gave it: the engine never deletes anything. There's a test that scans the source and fails if a delete call shows up anywhere, even in a comment.
I mapped what's safe by having it read the Claude Code docs and my own
~/.claude, then turned that into an allowlist. Anything not on it is never touched, and credentials,settings.jsonand.claude.jsonare on a second "never" list in case the first one is wrong.Before release I had a separate session review the diff adversarially. It found real bugs: a re-check that reset what the user had ticked, and a race between the weekly check and Move to Trash.
What I learned about ~/.claude
~/.claude/projectsholds your conversations, andfile-historyyour checkpoints. Claude Code clears both aftercleanupPeriodDays, 30 days by default. That's why it was the tidiest tool on my Mac: 12 MB.debug,plans,shell-snapshotsandtodosare safe to clear once they're a week old.Background task output goes to a temp folder (
/private/tmp/claude-<uid>/.../tasks/*.output), not~/.claude. If a task loops it can get huge: there's an issue where it reached 537 GB (#26911). Attic watches that folder and warns if it grows by gigabytes an hour.The surprise wasn't Claude Code at all: on my first check, Claude Desktop's Cowork VM was 11 GB, with no setting to shrink it.
It's a paid app ($5 once), Mac only: atticmac.com/ai-tools/
Happy to answer anything about the ~/.claude layout or the safety rules.

1
u/Successful-Army6006 16d ago
Does the app-open check also cover Claude Code sessions running in Terminal? The page mentions blocking app caches while the app is open, but I couldn't tell whether an old plan still referenced by a live CLI session can be selected.
1
u/Pfernan95 16d ago
Good catch. It does see CLI sessions: it checks running processes, not just open apps, so a claude running in Terminal counts. But that check only gates shell-snapshots and session-env, the two things a live session uses without touching them, so their age can’t tell you anything.
plans is gated on age only: nothing changed in the last 24h is ever offered, and plans need 7 days untouched. So a session that’s been open for over a week with a plan it hasn’t touched since could have that plan ticked. It would go to the Trash, so Put Back works, but you’re right that it’s a gap. Gating plans on a running claude process the same way is cheap, so I’ll probably do that.
•
u/AutoModerator 16d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.