AI agentsCleaning agent data
Cleaning agent data
What census finds in the folders AI coding agents use, what it deletes, and what it never touches, agent by agent.
AI coding agents leave old versions, caches, temporary files and logs on your Mac. census finds them, deletes the ones that rebuild themselves, and shows how much space each agent’s history takes without ever offering to delete it.
# Everything census found for AI agents
census findings --category ai_agents --limit 0
# Only what clean would delete
census findings --category ai_agents --safety safe
In JSON, each finding’s tool is the agent’s name as people know it (“Claude Code”, “Codex”, “Cursor”), so you can group by agent. census breakdown counts all of each agent’s folders, settings and history included, in its own ai_agents bucket, labeled “AI agents”.
The three tiers
| Tier | For agents, that means | What happens |
|---|---|---|
safe | Old versions, caches, temporary and staging files, crash reports and logs | census clean deletes them when they aren’t in use |
review | Things that cost something to get back: Codex’s log database, Claude’s VM bundles, Antigravity’s browser recordings | Wait for a person to choose |
keep | Each agent’s history: sessions, conversations, projects | Shown with their size, never offered |
Old versions
Agents that update themselves keep every version they download. One rule covers all of them: census keeps the version the launcher points to (such as ~/.local/bin/claude), any version that is running, and the two newest. The rest are safe.
If the launcher is a script rather than a link into the versions folder, census can’t tell which version it needs, so it keeps them all.
Agent by agent
| Agent | Safe | Review | Keep |
|---|---|---|---|
| Claude Code | Old versions in ~/.local/share/claude/versions, debug logs, MCP logs, the old todos, statsig, logs and image-cache folders, temporary files 7 days and older | — | ~/.claude/projects, ~/.claude/file-history |
| Claude (desktop app) | Caches, logs, bundled Claude Code versions | VM bundles | Local agent sessions |
| Codex | Old releases, ~/.codex/tmp, staging and update files, crash reports (7 days and older), caches | Log database (~/.codex/logs_*.sqlite) | ~/.codex/sessions, ~/.codex/archived_sessions |
| Cursor | Caches, logs, a state backup, old agent versions | — | state.vscdb |
| Cursor Agent | Old versions | — | ~/.cursor/chats, ~/.cursor/projects |
| Copilot CLI | Old versions | — | Session state |
| Windsurf | Caches, logs | — | Cascade history and memories |
| Kiro | Caches, logs | — | Agent history and sessions |
| Antigravity | Caches, logs, browser caches | Browser recordings | Conversations and brain |
| Gemini CLI | — | — | ~/.gemini/tmp, ~/.gemini/history |
| Zed | Caches, logs | — | Threads |
| Warp | Update files, cache, log | — | — |
| OpenCode | Cache | — | Storage, snapshots and databases |
| Goose | Caches | — | Sessions |
| Grok Build | — | — | Sessions |
| Cline, Roo Code, Kilo Code | — | — | Task history |
| Puppeteer | Chromium copies (.chromium-browser-snapshots) in ~/Library/Application Support | — | — |
Never offered
Whatever an agent stores, census never offers these, in any tier:
- credentials and auth files, settings and config, including
~/.claude.json; - plugins, skills and extensions;
jobs/,daemon/andagent-memory/folders;- Cursor’s
state.vscdbandworkspaceStorage; - browser profile state: cookies, local and session storage, IndexedDB.
Claude Code’s plans and backups, and the session folders a running session uses, aren’t offered either.