Skip to main content

Module paths

Module paths 

Source
Expand description

Filesystem layout for Codex CLI state.

Sessions live at ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl. Unlike Claude and Gemini, Codex sessions aren’t keyed by project path — they’re global, bucketed by date. A session is identified by its UUIDv7 (session_meta.id) or equivalently by its filename stem (rollout-<timestamp>-<uuid>).

Structs§

PathResolver
Builder-style resolver over the ~/.codex/ filesystem.

Functions§

session_id_from_stem
The session id embedded in a rollout filename stem (rollout-<timestamp>-<uuid>): the trailing UUID when present, otherwise the whole stem. This is the same fallback identity the reader assigns a session whose file has no session_meta line, so ids derived from filenames agree with Session.id — and either form resolves through PathResolver::find_rollout_file.