Macaroom
Guides › ~/.codex

What's in ~/.codex, and what's safe to delete?

~/.codex is where OpenAI's Codex keeps its settings, your sign-in and a log of every session. The session logs are what grows. Here's what you can clear and what to keep.

The short answer

Old session logs are safe to delete once Codex is closed. You won't be able to resume those sessions afterwards. Keep config.toml and auth.json: they're your settings and your sign-in.

What's inside

PathWhat it isDelete it?
config.tomlYour Codex settingsKeep
auth.jsonYour sign-in, when Codex stores it in a fileKeep. Deleting it signs you out
sessions/A log of each session, in folders by year, month and dayOld ones are safe to remove. You can't resume them afterwards
archived_sessions/Archived session logsSafe if you won't need them again
history.jsonlSession transcriptsSafe. You can cap its size instead (below)
.sqlite filesDatabases Codex uses for logs, history and resumable workLeave them. Never touch them while Codex is running
plugins/, cache/Installed plugins and cached filesManage plugins from Codex. The cache is safe to clear

On our Mac, ~/.codex was 2.7 GB: 977 MB of session logs going back eight months, a 386 MB log database, 403 MB of plugins and 275 MB of archived sessions.

Before you delete anything

Quit Codex completely, including the command-line tool and the app if you use both. Codex writes to its databases while it runs, and deleting files mid-write can corrupt them.

Clear old sessions

Stop history.jsonl growing

Codex has two settings for its history file. In ~/.codex/config.toml:

[history]
max_bytes = 104857600

That caps history.jsonl at 100 MB by dropping the oldest entries. Setting persistence = "none" instead stops Codex saving transcripts to history.jsonl at all. These settings only cover history.jsonl; the session logs in sessions/ stay until you remove them.

Keep it somewhere else

Codex keeps everything in the folder named by the CODEX_HOME environment variable, which is ~/.codex unless you set it. Point it at another drive if your Mac's own disk is tight.

How Macaroom handles it

Macaroom shows ~/.codex under Developer & AI tools as Codex data, marked Manage in app. It can't be selected, so your settings and sign-in are never removed by accident.

Related guides

See it on your own Mac

Macaroom scans your Mac, names what each chunk of storage is, and marks what's safe to clear. Anything you remove goes to the Trash, so you can put it back.

Get Macaroom