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

Source: https://diskcity.app/guides/ai-coding-agent-logs-mac (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

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

### Claude Code

- **Transcripts** in `~/.claude/projects` ([details](https://diskcity.app/folders/agents-claude-code-transcripts)) 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](https://diskcity.app/folders/agents-claude-code-debug-logs)) and **shell snapshots** in `~/.claude/shell-snapshots` ([details](https://diskcity.app/folders/agents-claude-code-shell-snapshots)) are safe to delete; Claude Code writes new ones as it runs.
- **The cache and MCP logs** in `~/Library/Caches/claude-cli-nodejs` ([details](https://diskcity.app/folders/agents-claude-code-cache)) 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](https://diskcity.app/folders/agents-codex-sessions)), 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](https://diskcity.app/folders/agents-codex-logs)) 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](https://diskcity.app/folders/agents-cursor-code-cache)) are safe to delete with Cursor closed.
- **Logs** in `~/Library/Application Support/Cursor/logs` ([details](https://diskcity.app/folders/agents-cursor-logs)) are safe to delete.
- **Workspace state** in `User/workspaceStorage` ([details](https://diskcity.app/folders/agents-cursor-workspace-storage)) 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](https://diskcity.app/folders/agents-worktree)). 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](https://diskcity.app/) to hear when it launches.
