Where the Codex CLI stores its cache — and how to clear it safely

Last updated June 14, 2026

The Codex CLI stores its data in ~/.codex (set by CODEX_HOME), including session JSONL logs and model cache. Old session logs are safe to delete; your config and auth are not. Tokki Clean finds and sizes the prunable artifacts and previews every removal before it goes to the Trash.

Size it before clearing

See what's accumulating in CODEX_HOME:

Safe to delete

~/.codex/sessions

Past session JSONL logs — rebuildable history.

~/.codex/log

CLI logs — safe to clear.

What to never delete

~/.codex/auth.json

Your credentials — deleting logs you out.

~/.codex/config.toml

Your configuration — keep it.

Do it in one click

Tokki Clean finds codex cli cache for you, sizes it, shows an itemized preview, and sends removals to the Trash — free, native, nothing leaves your Mac.

Download free for macOS

Apple silicon · macOS 12+ · no account

Frequently asked questions

Where is the Codex CLI cache stored?

Under ~/.codex by default (overridable with the CODEX_HOME environment variable). Session logs sit in ~/.codex/sessions.

Can I delete the ~/.codex sessions folder?

Yes — session JSONL logs are history you can safely remove. Keep auth.json and config.toml.

More cleanup guides

Tokki Earn — coming soon

A tiny native macOS app. Opt in, keep 50% of every sponsored impression, cash out real money.

Apple silicon & Intel · off by default