Skip to content

Claude Code, Codex and Cursor logs filling your Mac's disk

Last updated 28 October 2026

If you use AI coding agents every day, their history can quietly become one of the biggest folders on your Mac. On one developer's 245 GB MacBook we measured 16.5 GB of agent logs and sessions. Some of it is cache that comes back on its own; some of it is your conversation history, which doesn't. Here's which is which.

See how much space your agents use

du -sh ~/.claude ~/.codex ~/Library/Application\ Support/Cursor ~/Library/Caches/claude-cli-nodejs 2>/dev/null

Claude Code

  • Transcripts in ~/.claude/projects (details) are your conversation history, one file per session. They can't be rebuilt, so only delete ones you're sure you won't want to resume or read again. Old ones are usually the bulk of the folder.
  • Debug logs in ~/.claude/debug (details) and shell snapshots in ~/.claude/shell-snapshots (details) are safe to delete; Claude Code writes new ones as it runs.
  • The cache and MCP logs in ~/Library/Caches/claude-cli-nodejs (details) are safe to delete too.
  • Leave ~/.claude/settings.json, CLAUDE.md files, skills and memory folders alone: those are your configuration, not logs.

Codex

  • Sessions in ~/.codex/sessions (details), organised by date, are your history and can't be rebuilt. Delete old months only if you won't need them.
  • Logs in ~/.codex/log (details) are safe to delete.
  • Keep ~/.codex/config.toml and your sign-in files.

Cursor

  • Caches in ~/Library/Application Support/Cursor (Cache, Code Cache, GPUCache; details) are safe to delete with Cursor closed.
  • Logs in ~/Library/Application Support/Cursor/logs (details) are safe to delete.
  • Workspace state in User/workspaceStorage (details) holds each workspace's chats and state. Delete folders only for projects you've finished with.

Worktrees agents leave behind

Agents that work in parallel often create git worktrees (details). A worktree can hold unpushed commits that exist nowhere else, so check git worktree list and git status in each before removing it with git worktree remove.

How DiskCity handles agent data

DiskCity is in development. It recognises Claude Code, Codex and Cursor data, clears caches and logs that rebuild themselves, and treats transcripts, sessions and worktrees as personal: it only suggests them after 90 days (30 for worktrees) and sends them to the Recycling Yard for 30 days instead of deleting them. Join the waitlist to hear when it launches.

Hear when DiskCity launches

We'll tell you about new versions and sales, with their end dates.