The folders you did not make

With an AI coding tool, a new project costs one sentence. So does a second copy of it to try another idea, a build to see whether it works, and a fresh set of packages to run it. People call it vibe coding.

What is easy to miss is that every one of those steps writes folders to your disk, and many of them stay there. The tool moves on to the next task. You never opened those folders, so you do not think of them as yours.

Storage settings will not help much. It mostly shows categories, not folders, and a lot of this sits in hidden folders it does not name.

Where the space goes

Six kinds of thing. The folder names are the ones you will see on your own disk. These tools change quickly, so the details are as their makers documented them in November 2026.

One project and three extra copies made by an AI coding tool. Each copy has its own files, packages and build output
A second copy is not a shortcut to the first. It is the project again.

Where Claude Code and Codex put the first and the fourth of these:

ToolExtra project copiesSession records
Claude CodeInside the project: a hidden .claude folder, then worktrees. It removes a copy that holds no changes when an ordinary session ends.In .claude in your home folder. Deleted after 30 days by default; sessions started in the Claude desktop app are kept until you set a limit.
Codex, now part of the ChatGPT desktop appIn your home folder: .codex, then worktrees. It keeps the 15 most recent by default.In .codex in your home folder. No age limit found in its documentation.

If your tools run code in Docker, that is one more large file of its own: see Docker and VM disk images on a Mac.

See it first, with Klarity

Klarity, the Mac disk space analyzer I build, draws a folder as a map. Every folder is a rectangle, and its size on screen is the space it takes on disk, so the biggest thing is the biggest shape.

Klarity 1.3.1’s treemap of a home folder: Pictures is 62.28 GB, and almost all of it is one blue block, Photos Library.photoslibrary at 55.83 GBView Klarity Disk on the Mac App Store
Klarity’s map of a home folder. The large rectangles are where the space is.

Click Home in the sidebar. Klarity scans hidden folders too, so .claude, .codex and package downloads such as .npm appear as rectangles beside Desktop and Documents, with their sizes. Double-click any rectangle to go inside it.

An illustration of a home folder drawn as a map: node_modules in projects left alone, an abandoned project, project copies in .claude/worktrees and .codex/worktrees, DerivedData build output, package downloads and session records, each coloured by how long since it changed
An illustration, not a real scan: the kinds of folder this post is about, as they would look on a map coloured by age.

Then look at the colours. Klarity colours each rectangle by how long since it last changed: blue for this month, through green, gold and orange, to red for three years or more. In a folder of projects, that is the question you need answered. Blue is what you are working on. A large gold or orange rectangle is probably a project nobody has touched in a year or more, still carrying its packages and its builds. Double-click it and the colours inside confirm it.

Select a rectangle and the inspector on the right shows its size, its share of the folder above, how many items it holds, when it last changed and the largest things inside. Large files in the toolbar lists the biggest single files in the folders the scan has opened. To find one very long session record, double-click into .claude and then projects first.

One honest limit. Klarity shows you size and age. It cannot tell you whether a folder holds the only copy of your work, and it does not clean anything by itself. That decision stays with you, and the next section is about making it.

Klarity is on the Mac App Store. It is $6.99 once, for macOS 14.6 or later, with no subscription, no account and no network access.

What comes back by itself, and what does not

This is the part worth reading slowly.

Two lists. Rebuilt when you need it: build folders in DerivedData, node_modules, Python virtual environments, package downloads. Not rebuilt, check first: copies with unfinished work, projects never pushed anywhere, session records, the tools’ own folders as a whole
The short version of the two lists below.

Rebuilt when you next need it:

Not rebuilt. Check before you touch these:

How to get it back, lowest risk first

  1. Old build folders. Start here, because Xcode makes them again. Follow the Xcode guide for DerivedData.
  2. Packages in projects you are not working on. Find a gold or orange project on the map, open it, and move its node_modules or .venv to the Trash. Keep the project. If it still has its list of packages, they install again when you come back.
  3. Finished copies. First make sure the work in them was merged or pushed. Then let the tool that made the copy remove it. In the ChatGPT desktop app, archiving a chat deletes its copy, and Codex saves a snapshot of the work first. Claude Code asks whether to keep or remove a copy that has work in it when you leave an ordinary session; choosing remove deletes that work, so check first. Either is better than the Trash, because the project keeps a record of its copies. Git itself will not remove a copy with uncommitted changes unless it is forced to, which is the protection you want.
  4. Old session records. Use the tool’s own settings. Claude Code deletes transcripts after 30 days unless that was changed; the setting is called cleanupPeriodDays. Sessions started from the Claude desktop app are kept with no age limit unless you set one. Codex has settings that cap its history file or turn it off; none was found in its documentation for older session records. Delete records by hand only if you are sure you will not need to go back.
  5. Abandoned projects. Open the folder and look. If it exists nowhere else and you might want it, copy it to another drive first. Then move it to the Trash.

In Klarity, right-click a rectangle or use the Move to Trash… button in the inspector. Klarity only ever moves things to the Trash. A folder of 1 GB or more needs a slide to confirm, and anything inside your Library, outside its Caches, Developer and Logs folders, gets an extra warning first, because apps keep their data there. A few folders your account depends on are refused outright. Until you empty the Trash, the space is not free, and a mistake can still be put back.

Keep it from coming back

See your disk. Clearly.

$6.99 one-time · macOS 14.6+ · Apple Silicon & Intel

Download on Mac App Store

Questions people ask

Can I delete the .claude or .codex folder to free space?

Not the whole folder. Besides session records it holds your settings, and Codex can keep your sign-in there. Look inside it on a map first, and use the tool’s own settings where it has them: Claude Code can limit how long session records are kept, and Codex can cap the size of its history file.

Is it safe to delete node_modules?

In a project that still has its list of packages, the folder can be installed again, so you lose time, not work. Move it to the Trash, and keep the project itself.

Why does one Xcode project have so many DerivedData folders?

A copy of a project in a different place gets a build folder of its own, so each copy an assistant builds leaves one behind, and it stays after the copy is removed. Apple says derived data can be re-created at any time from your source files, so the old ones can be cleared.

What is a worktree, and can I delete one?

A worktree is a second working copy of a project that shares its history with the original. Remove one only after its changes are merged or pushed, and let the tool that made it do the removing where you can.

— Mukul