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/sessionsPast session JSONL logs — rebuildable history.
~/.codex/logCLI logs — safe to clear.
What to never delete
~/.codex/auth.jsonYour credentials — deleting logs you out.
~/.codex/config.tomlYour 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 macOSApple 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.