misonoteApp Center

Codex CLI sessions (~/.codex/sessions): safe to delete?

Check before deletingMay still be useful; Thermo moves it to the Trash by default, so you can change your mind.

Quit first: codex

Where it is

  • ~/.codex/sessions
  • ~/.codex/archived_sessions

What it is

Codex records every session as a JSONL rollout file, organized by date under ~/.codex/sessions, with archived sessions under archived_sessions. These files are what Codex reads when you resume an earlier session.

Why it gets so big

Rollouts capture the full conversation, tool calls and command output, and a new one is written for every session, so daily use builds up a large history.

Is it safe to delete?

For old sessions, yes, as long as you won't need to resume or look back at them; once deleted, they're gone. Nothing in your projects depends on these files. Quit running Codex sessions first so an active rollout isn't removed mid-write.

Tip

Codex's resume picker lists your recent sessions, an easy way to check which ones you still care about before cleaning.

See how much space it uses

du -sh "$HOME/.codex/sessions" "$HOME/.codex/archived_sessions" 2>/dev/null