Improve session management UX: show session IDs and allow archive/delete from resume picker
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;"This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗