Claude Code keeps chats in ~/.claude/projects and plugins in ~/.claude/plugins/cache; Codex keeps chats in ~/.codex/sessions and a SQLite history beside it. Claude Code deletes chats older than 30 days (cleanupPeriodDays) and old plugin versions 14 days after an update on its own. Codex has no age limit. MCP servers add their own caches, such as a full Chrome profile in ~/.cache/chrome-devtools-mcp. Check sizes with du, lower cleanupPeriodDays if chats pile up, and use claude purge rather than Finder to remove a project's chats.
How much space do AI coding tools use?
I measured my own Mac on 3 November 2026 (macOS 26.5.1, Claude Code 2.1.317, Codex CLI 0.159.3), after about five weeks of daily use across a dozen projects:
| Folder | Size | What's in it |
|---|---|---|
~/.claude/projects | 4.4 GB | 2,427 chat transcripts in 119 project folders |
~/.claude/plugins | 2.7 GB | 2.4 GB of it is one plugin, in three versions |
~/.codex | 2.3 GB | Skills, plugins, a SQLite history, images, sessions |
~/.cache/chrome-devtools-mcp | 1.8 GB | The Chrome profile one MCP server uses |
~/.cache/codex-runtimes | 1.8 GB | The Codex app's runtime, plus three leftover install folders |
~/Library/Application Support/Claude | 705 MB | The Claude desktop app's own copy of Claude Code, and its data |
That's about 13 GB, all in hidden folders that Finder doesn't show by default.
Check your Mac
These only read:
$ du -sh ~/.claude ~/.codex ~/.cache/* "$HOME/Library/Application Support/Claude" 2>/dev/null | sort -h $ du -sh ~/.claude/* 2>/dev/null | sort -h | tail -6 $ du -sh ~/.claude/projects/* 2>/dev/null | sort -h | tail -5
The last line shows which projects hold the most chat history. Folder names are your project paths with every / turned into -.
Claude Code chats: ~/.claude/projects
Every session is one .jsonl file named after the session ID. Next to it, a folder of the same name holds the transcripts of its subagents and large tool outputs that didn't fit in the chat. Anthropic's docs say a transcript holds the messages, tool calls and tool results, and also the system prompt and tool definitions sent with each request. That's why a long session with many subagents gets big: my largest single session takes 296 MB, 293 MB of it subagents.
Claude Code already cleans this up. At startup it deletes transcripts and their folders once they're older than cleanupPeriodDays, 30 days by default, along with file-history snapshots, plans, debug logs and the paste cache. My oldest transcript is from 30 September, 34 days before I measured: the sweep keeps it to about a month.
To keep less, set a lower number in ~/.claude/settings.json:
{
"cleanupPeriodDays": 14
}The minimum is 1. 0 fails validation instead of turning history off. Fewer days also means fewer plain-text copies on disk: transcripts aren't encrypted, so anything a tool printed, an .env file included, sits in them until the sweep removes it.
To remove one project's chats now, use claude purge. It prints the plan and asks before deleting:
$ claude purge ~/Projects/my-app --dry-run # show what would go $ claude purge ~/Projects/my-app # delete, after a y/N prompt
It removes the project's transcripts and auto memory, its file-history, task and debug entries, its lines in history.jsonl, and its entry in ~/.claude.json. On versions before 2.1.288 the command is claude project purge.
Deleting chats costs you /resume, --continue and rewind for those sessions, and the auto memory Claude Code saved for that project. Keep ~/.claude/settings.json, ~/.claude.json, .credentials.json, agent-memory/ and jobs/.
Plugin versions: ~/.claude/plugins/cache
This was the surprise on my Mac. 2.4 GB of the plugin cache was one memory plugin, in three folders of about 800 MB each: 15.8.2, 15.8.3 and 15.9.0. Each version carries its own 785 MB node_modules. Three updates in one day left three full copies.
Claude Code handles this, slowly. When a plugin updates, it writes an .orphaned_at file into the old version's folder and removes that folder 14 days later, so a session that still runs the old version doesn't break. My two old copies were marked on 2 November and would go by themselves around 16 November.
See which versions are waiting:
$ find ~/.claude/plugins/cache -maxdepth 4 -name .orphaned_atEach line is an old version. Once every Claude Code session started before the update has ended, you can move those folders to the Trash early. Leave the version without .orphaned_at alone: that's the one you run. The sweep only runs while at least one plugin is installed, so if you uninstall your last plugin, old folders stay until you install another.
Smaller leftovers sit next to them: on my Mac, 13 temp_git_… folders from plugin installs, about 1 MB each.
Codex: ~/.codex
Codex writes each session to ~/.codex/sessions/YEAR/MONTH/DAY/rollout-….jsonl, one line per event, which is also what codex resume reads. My sessions folder is only 130 MB. The rest of my 2.3 GB:
- Skills, 692 MB. One skill I'd installed kept 686 MB of its own output inside its folder. Check
du -sh ~/.codex/skills/*for the same. thread_history_1.sqlite, 384 MB, andsqlite/, 76 MB: the Codex app's thread database.- Plugins, 380 MB.
generated_images, 170 MB: 95 images Codex generated.
Codex's configuration reference has no age limit for session files. history.persistence = "none" and history.max_bytes only control history.jsonl, the prompt history. So Codex chats stay until you remove them. To see how much each month holds:
$ du -sh ~/.codex/sessions/*/* 2>/dev/nullMoving a month's folder to the Trash is safe for Codex; you just can't resume those chats. Don't delete auth.json or config.toml.
MCP servers and agent runtimes: ~/.cache
~/.cache is where several tools put downloads that never show up anywhere else:
chrome-devtools-mcp, 1.8 GB on my Mac. The Chrome DevTools MCP server runs Chrome with its own profile, by default in~/.cache/chrome-devtools-mcp/chrome-profile. It grows like any Chrome profile, with caches and history. Deleting it is safe, but that browser is then signed out of every site you logged into through it. Starting the server with--isolateduses a temporary profile that's removed when the browser closes, so nothing builds up.codex-runtimes, 1.8 GB. 1.6 GB is the runtime the Codex app runs. The other 249 MB were threecodex-runtime-install-…folders, left behind by updates. Keepcodex-primary-runtime.
The Claude desktop app
~/Library/Application Support/Claude held 705 MB on my Mac: 433 MB in claude-code (the copy of Claude Code that the desktop app runs) and 240 MB in claude-code-vm. The app's web caches (Cache, Code Cache, GPUCache) come back when needed. Quit the app before you touch anything here.
Editor extensions add more: the Claude Code extension for VS Code and Cursor is 250–320 MB per version, because it bundles its own binary. VS Code and Cursor remove replaced versions on their own; on my Mac, all 17 old versions Cursor had marked were already gone.

What not to delete
~/.claude/settings.json,~/.claude.jsonand~/.claude/pluginsas a whole: your settings, account details and installed plugins.~/.claude/.credentials.jsonand~/.codex/auth.json: your logins.- The plugin version folder without
.orphaned_at, andcodex-primary-runtime. - Chats of work you still want to resume. Lower
cleanupPeriodDaysinstead of emptyingprojects/by hand.
Sources
- Explore the .claude directory, Claude Code docs: what's cleaned up automatically, what to keep,
claude purge - Plugin loading: cleanup of previous versions, Claude Code docs: the
.orphaned_atmarker and the 14-day delay - Data usage, Claude Code docs: transcripts kept for 30 days by default
- Codex configuration reference, OpenAI:
history.persistence,history.max_bytes - Chrome DevTools MCP configuration: the default
--user-data-dirand--isolated