Allow codex resume to resume exec sessions
Resolved 💬 4 comments Opened Mar 13, 2026 by yiteng-guo Closed May 2, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.114.0
What subscription do you have?
API
Which model were you using?
gpt-5.3-codex
What platform is your computer?
linux
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
codex resume doesn't show session that's started by codex exec. I also tried codex resume --all and it's not there either. However, I could run codex exec <session-id> to resume the session where the session id can be found at the top of codex exec.
IMO, we still keep the current behavior for codex exec (i.e. not show exec session) to keep it clean and show exec session in codex resume --all.
What steps can reproduce the bug?
codex exec hello
codex resume --all
# or codex resume
What is the expected behavior?
_No response_
Additional information
_No response_
4 Comments
Root Cause Analysis
I traced through the codebase and found the underlying issue.
Where exec sessions are recorded:
In
codex-rs/core/src/thread_manager.rs(line 254),codex execsessions are persisted withsession_source: SessionSource::Exec.Where the resume picker filters:
In
codex-rs/core/src/rollout/mod.rs:In
codex-rs/tui/src/resume_picker.rs, the picker callsRolloutRecorder::list_threads(...)withINTERACTIVE_SESSION_SOURCEShardcoded as theallowed_sourcesfilter. This constant only includesCliandVSCode—Execis intentionally excluded.The
show_allflag today only affects the working-directory filter (filter_cwd), not the session-source filter. So even with--all, exec sessions are filtered out at the backend query level before they can ever reach the picker.Proposed Fix
Add a second constant for the
--allcase:Then in
resume_picker.rs, pre-compute which sources to use (similar to howfilter_cwdis computed) and capture it in the page-loader closure:This matches the reporter's suggested UX:
codex resume— shows only interactive (Cli/VSCode) sessions, keeping the list cleancodex resume --all— additionally showsExecsessionsThe change is minimal and isolated to the session-source filter logic. No schema or config changes needed.
Happy to submit a PR if that would be helpful.
The current behavior is by design.
I understand the argument that
codex resumeshould show exec sessions, but the issue is more complex than what's discussed above. This would open up questions about whether exec sessions should be enumerated by the app server via thethreads/listapi, which would in turn dictate whether exec sessions show up in the IDE Extension, app, and other app server clients. Plus, we're working on moving the TUI on top of the app server.I've changed this from a bug report to a feature request to see if other users want this as well. If not, we'll probably close it.
Thanks for the context. Agree that it could be annoying to see exec sessions by default. I'd hide this either behind
--allor a new flag--include-exec, but yea this is more a feature request.This feature request hasn't received enough upvotes, so I'm closing it.