Improve session management UX: show session IDs and allow archive/delete from resume picker

Open 💬 3 comments Opened Jun 17, 2026 by MainArgs

Problem

Managing saved Codex sessions is currently hard from the CLI.

codex resume --all shows a picker for sessions, but it does not expose an easily copyable session ID. However, commands like:

  • codex archive <SESSION>
  • codex delete <SESSION>
  • codex unarchive <SESSION>

require a session UUID or exact session name.

As a result, users have to inspect internal files such as ~/.codex/state_5.sqlite to find the session ID, which feels like an internal implementation detail leaking into normal usage.

Expected UX

One or more of the following would make this much easier:

  1. Show session IDs in codex resume --all, or provide a toggle to display/copy them.
  2. Add a dedicated command, for example:
  • codex sessions list
  • codex sessions archive <id>
  • codex sessions delete <id>
  1. Allow actions directly inside the resume picker:
  • Enter resume
  • a archive
  • d delete
  • c copy session ID
  • / search/filter

Why this matters

Users often need to clean up old sessions or identify the current directory's sessions. The current flow requires too much hidden knowledge and makes simple session management feel unnecessarily difficult.

Current workaround

Querying the internal sqlite database works, but should not be required:

sqlite3 -header -column ~/.codex/state_5.sqlite \
"select id, datetime(updated_at,'unixepoch','localtime') as updated, cwd, title from threads where archived=0 order by updated_at desc limit 30;"

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗