Skip to content
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.

On this page

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.

Terminal
# 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

TierFor agents, that meansWhat happens
safeOld versions, caches, temporary and staging files, crash reports and logscensus clean deletes them when they aren’t in use
reviewThings that cost something to get back: Codex’s log database, Claude’s VM bundles, Antigravity’s browser recordingsWait for a person to choose
keepEach agent’s history: sessions, conversations, projectsShown 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

AgentSafeReviewKeep
Claude CodeOld 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 versionsVM bundlesLocal agent sessions
CodexOld releases, ~/.codex/tmp, staging and update files, crash reports (7 days and older), cachesLog database (~/.codex/logs_*.sqlite)~/.codex/sessions, ~/.codex/archived_sessions
CursorCaches, logs, a state backup, old agent versions—state.vscdb
Cursor AgentOld versions—~/.cursor/chats, ~/.cursor/projects
Copilot CLIOld versions—Session state
WindsurfCaches, logs—Cascade history and memories
KiroCaches, logs—Agent history and sessions
AntigravityCaches, logs, browser cachesBrowser recordingsConversations and brain
Gemini CLI——~/.gemini/tmp, ~/.gemini/history
ZedCaches, logs—Threads
WarpUpdate files, cache, log——
OpenCodeCache—Storage, snapshots and databases
GooseCaches—Sessions
Grok Build——Sessions
Cline, Roo Code, Kilo Code——Task history
PuppeteerChromium 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/ and agent-memory/ folders;
  • Cursor’s state.vscdb and workspaceStorage;
  • 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.

In use

An agent’s files are skipped while it runs. An item is in use when the agent’s app is open, when a program runs from inside it, or when a launcher such as ~/.local/bin/claude points to it. Quit the agent and clean again to free them.

Default locations only

census looks only in each agent’s default folders. The app starts census without your shell’s environment, so CODEX_HOME, CLAUDE_CONFIG_DIR, GROK_HOME and XDG_* overrides aren’t followed anywhere.

Updated · census JSON schema 5