Codex CLI fix: Older Codex sessions are gone from the resume picker

Codex CLI cannot find your older sessions

A session that dropped off the picker is almost always still on disk. Codex keeps sessions in more than one shape, and a picker reads one of them.

Comes from Codex CLI.

Diagnosis

What it actually is

Cold sessions are compressed in place

A rollout starts as rollout-....jsonl and is later compressed to .jsonl.zst. The data is intact, and any reader needs zstd support to see it: on Node that means 22.15 or newer, and a reader without it fails on the file rather than on the session.

The layout moved to a thread inventory

Newer Codex keeps a state database of threads beside the rollout files, and codex migrate-rollouts exists to move legacy sessions into it. A session written under the old layout can be present on disk and absent from a picker reading the new one.

Archived is not deleted

Archive, unarchive and delete are three separate subcommands. An archived session leaves the picker and stays on disk, which looks exactly like a loss and is not one.

Check

Confirm it before you fix it

Run thisWhat a good answer looks like
codex migrate-rolloutsWithout --apply it only reports the sessions eligible for migration. That report is the answer to whether the picker and the disk disagree.
codex doctor --summaryThe threads row says whether the rollout files and the state database agree, and the state row whether the databases are healthy.
ls ~/.codex/sessionsRollouts are grouped by date, so the day you are missing is a directory. A .jsonl.zst in there is a session, not a leftover.

Every command here has been run on a real machine. Termdeck answers the same questions for every machine you have connected, without opening a terminal on any of them.

Fix

Cheapest thing first

1. Migrate the legacy sessions

Run the report first, then codex migrate-rollouts --apply once it lists what you expected. The flag is what publishes the migration; without it nothing is written.

2. Unarchive it by id or name

If the session was archived, unarchiving puts it back. There is nothing to recover, because nothing was lost.

3. Read the file directly

A rollout is line-delimited JSON, compressed or not, so the transcript is readable with a zstd-capable reader even when no picker will show it.

Not this

What will not help

Deleting $CODEX_HOME to start clean

That removes the only copy of every session you were trying to find, and the login with it. Nothing about a missing picker entry is fixed by it.

FAQ

Older Codex sessions are gone from the resume picker, answered

Does Codex delete old sessions?

Not on its own. It compresses them, and it can archive them when asked. Both keep the file.

Can I still read a compressed rollout?

Yes, with any zstd-capable reader. The contents are the same line-delimited JSON the warm file holds.

Is migrate-rollouts safe to run?

The plain command only reports. Nothing is published until you pass the apply flag.