Agents · Claude Code

What Claude Code leaves on your Mac.

Session logs, checkpoints, scratch workspaces, worktrees. Devbroom finds them all, and tells you which ones Claude Code deletes itself, which are left to you and which are never touched.

From a sample scan
37.8 GBClaude Code data
297sessions
98for folders that no longer exist
2running now
What it looks at

Every folder has its own rule.

Devbroom handles every place the way Claude Code itself behaves. What the agent cleans itself it leaves to the agent; what has its own command it does with that command.

AssessedEach item is checked on its own; if it comes out Ready you can clean it.
With claude purgeThrough Claude Code's own command, confirmed by holding the button.
Claude Code deletesThe agent cleans up old ones itself; Devbroom only shows them.
Never touchedShown, never deleted.

Scratch workspaces

Sessions' workspaces and temporary files. Those of finished sessions can be cleaned after a look, before Claude Code deletes them itself; a running session's stays Blocked.

/private/tmp/claude-<uid>
Assessed

MCP and error logs

Log files only.

~/Library/Caches/claude-cli-nodejs
Assessed

Session logs

Deleting the files by hand breaks resuming sessions and memory. Devbroom uses Claude Code's own command for this; the history of projects whose folders no longer exist is cleared in one go. Instead of deleting, you can archive a project's conversations (Pro): nothing moves until the archive is verified, memory stays in place, and you can reopen it from History.

~/.claude/projects
With claude purge

Checkpoints

Claude Code deletes the ones older than cleanupPeriodDays (30 days by default) itself.

~/.claude/file-history
Claude Code deletes

Logs and caches

Debug logs, shell snapshots, pasted content and images. Claude Code deletes the old ones itself.

~/.claude/debug~/.claude/shell-snapshots~/.claude/paste-cache~/.claude/image-cache
Claude Code deletes

CLI versions

The updater keeps the current, the running and the two newest versions.

~/.local/share/claude/versions
The updater manages

Plugins

/plugin manages them; a plugin in use shouldn't be deleted.

~/.claude/plugins/cache~/.claude/plugins/marketplaces
Never touched

Desktop app data

The app's state; it also holds the bundled CLI and virtual machine images.

~/Library/Application Support/Claude
Never touched
Protected

Your account and settings stay untouched.

These files and folders are protected. No verdict ever opens them to cleaning; they stay where they are whatever their size.

Account and global state~/.claude.json
Credentials~/.claude/.credentials.json
Settingssettings.json · settings.local.json
Prompt history~/.claude/history.jsonl
Agent memory~/.claude/agent-memory
Installed plugins~/.claude/plugins
Worktrees

Recognizes Claude Code's worktrees by their traces.

It tells a worktree belongs to Claude Code from these traces; the stronger the trace, the more certain the ownership it shows.

  • CertainThe CLAUDE_BASE marker in git metadata
  • CertainA worktree lock placed by Claude Code
  • LikelyInside a .claude/worktrees folder
  • LikelyInside a Claude Code workspace
  • PossibleA branch name starting with worktree-
  • Blocked if it holds unsaved work. git won't remove such a worktree without --force; Devbroom never uses --force.
  • Blocked if a session runs in it or in its parent folder.
  • Review if it has ignored files: git worktree remove deletes them without asking.
Running sessions

Sees them, leaves them alone while they run.

Devbroom knows which Claude Code sessions are running. It never touches a running session's processes; its folder and scratch space stay Blocked while the session lasts.

2 sessions running

Claude Code scratch spaceshop · session 23f5b61713.2 GBBlocked: holds data for the session running in this folder.
Claude Code scratch spaceshop · session ab041197 · done7.3 GB
Compatibility

Checks Claude Code's files first.

Before trusting an agent's data, Devbroom checks that its files are in the expected format. If they aren't, that data is only read; none of it counts as ready to clean.

Tested versions2.1.0 - 2.1.292

A version outside this range still works if the format holds, and shows as “not tested yet”.

Format checkcwd and sessionId

The logs in ~/.claude/projects must carry these two fields, which tie a session to a folder.

Your versiondevbroom compat

If its folders live elsewhere, it follows CLAUDE_CONFIG_DIR, CLAUDE_CODE_TMPDIR.

Let Claude Code work. Devbroom cleans up after it.