Skip to content
Checked against codex-cli 0.146.0 · October 9, 2026

How to archive and unarchive Codex sessions

Archive a saved Codex session by ID or name, restore it with codex unarchive, and avoid confusing an archived session with deleted history.

Short answer

Run codex archive <session> with a session UUID or name to move saved work out of the normal active list. Restore it with codex unarchive <session>. UUIDs take precedence when the value parses as one. Archiving is reversible; codex delete is a separate, permanent command and should not be used as cleanup shorthand.

When to use it

A long session list becomes difficult to scan, but deletion throws away recovery value. Archive changes visibility while retaining the saved conversation, and unarchive reverses that organization step.

Use it safely

1. Resolve the exact session

Use the resume picker or your session inventory to confirm the UUID or unique name. Names can collide, so prefer the UUID for scripted maintenance.

codex resume --all

2. Archive completed work

Pass the chosen identifier to archive. The operation targets saved session metadata; it does not remove the repository or revert files that conversation changed.

codex archive <session-id>

3. Restore before resuming

If archived work becomes active again, unarchive it with the same identifier and then resume it. Keeping these as separate commands makes the visibility change explicit.

codex unarchive <session-id>
codex resume <session-id>

Important distinctions

  • Do not substitute codex delete for archive unless permanent removal is the explicit goal and the target has been verified.
  • Archive state belongs to the selected CODEX_HOME; another Codex home can contain a different session with the same display name.
  • An archived session missing from a default picker is not evidence that its rollout was erased.

Where Crowsnest fits

Crowsnest's gallery has local organization and search surfaces, while Codex remains authoritative for its native archive operations. Crowsnest reads Codex through app-server instead of editing the internal store behind the CLI.

Source and version

The exact text and flags on this page were checked against the installed codex-cli 0.146.0 binary on October 9, 2026. Version-specific behavior can change, so compare your own --help output before scripting around it. Official CLI documentation →

Reviewed from first-party CLI output and the released Crowsnest product source. No command on this page bypasses provider limits, billing, authentication, or native history rules.