Local History Guide / Codex

Find and Search Old Codex Sessions on macOS

Codex sessions are often the record of how a task actually happened: the prompt, plan, tool call, patch output, command error, image input, or final reasoning boundary. Agent Sessions makes that local Codex history searchable across Codex CLI, Codex Desktop, and Codex VS Code surfaces.

Agent Sessions reads local Codex rollout files. It does not upload Codex transcripts or turn them into hosted project memory.

Download Agent Sessions View on GitHub Product page
Agent Sessions showing Codex and Claude local history rows with a readable transcript preview.
Primary storage~/.codex/sessions or $CODEX_HOME/sessions
FormatsDate-sharded rollout-*.jsonl session logs.
SurfacesCodex CLI, Codex Desktop, and Codex VS Code sessions in one Codex corpus.

How to Find an Old Codex Session

  1. Open Agent Sessions and choose Codex in the source filter.
  2. Search for a phrase from the prompt, command output, error, file path, or response you remember.
  3. Open the matching transcript and use in-session Find to jump between occurrences.
  4. For a resumable session, copy its resume command or open it in your preferred terminal.

If the session is absent, check whether CODEX_HOME points somewhere other than the default location. Agent Sessions cannot recover a rollout file that Codex deleted or never wrote.

Where Codex Stores Local Data

Codex session logs use JSONL rollout files. The default root is:

~/.codex/sessions

If CODEX_HOME is set, Agent Sessions follows:

$CODEX_HOME/sessions

Codex stores sessions in date-sharded folders:

YYYY/MM/DD/rollout-*.jsonl

Agent Sessions also scans archived Codex session folders when they exist, so restored or archived Codex Desktop sessions can remain visible.

What Agent Sessions Does

What This Does Not Do

Related Guides

Sources