Improve session management UX: show session IDs and allow archive/delete from resume picker
Open 💬 5 comments Opened Jun 17, 2026 by MainArgs
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
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:
- Show session IDs in
codex resume --all, or provide a toggle to display/copy them. - Add a dedicated command, for example:
codex sessions listcodex sessions archive <id>codex sessions delete <id>
- Allow actions directly inside the resume picker:
Enterresumeaarchiveddeleteccopy 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;"
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
A read-only
codex sessions listwould remove the need to query sqlite directly.Useful columns: id, title, cwd/project, model, updated_at, archived/deleted state, source path, and size. Then archive/delete can take id and return a lifecycle receipt with before/after state.
Putting the same ids behind a copy action in the picker would cover the interactive flow without exposing implementation tables.
---
_Generated with ax._
Ran into the same friction — needed a session's real id/cwd without digging into state_*.sqlite. I put together a small workaround: a
/bookmarkskill that (for Codex) parses the rollout jsonl to get the real session id + cwd, tags whatever you're working on, and writes it to a local JSON file, plus a tiny offline dashboard to browse/filter afterward (https://github.com/Ar9av/bookmark-agent). Doesn't give you archive/delete like proposed here — just a way to keep a findable pointer to a session without querying sqlite directly.This is a critical feature
I’d also like to request a configurable limit for the number of sessions shown in the
codex resumepicker.For example:
This would keep the picker manageable while preserving access to older sessions through session IDs or search. The existing dense view helps with layout, but does not limit the number of entries.
Environment: Codex CLI 0.149.1 on macOS.