A saved Codex thread can hold plans, tool output, file context, and decisions that would be tedious to rebuild after closing the terminal. Resuming the last session reopens the newest recorded interactive thread for the current working directory, so the next prompt starts from that conversation instead of a blank terminal UI.
The codex resume command opens the session picker by default. Adding --last bypasses the picker and selects the newest recorded session, while --all disables the current-directory filter when the thread belongs to another working tree.
Resume uses the local Codex authentication, configuration, and transcript store for the current shell. Check the login state from the same terminal, start from the project that should own the resumed thread, and use the picker or a specific session ID when the newest thread may belong to another task.
Related: How to start a Codex interactive session
Related: How to check Codex login status
Related: How to run Codex exec with a prompt
$ codex login status Logged in using ChatGPT
If this prints Not logged in, complete a supported login flow before resuming the interactive session.
Related: How to check Codex login status
Related: How to log in to Codex with device authentication
Related: How to log in to Codex with an API key
$ pwd /home/user/projects/example-app
The default codex resume picker and --last selection are scoped to the current working directory.
Related: How to set the working directory for Codex
$ codex resume --help
Resume a previous interactive session (picker by default; use --last to continue the most recent)
Usage: codex resume [OPTIONS] [SESSION_ID] [PROMPT]
Options:
--last
Continue the most recent session without showing the picker
--all
Show all sessions (disables cwd filtering and shows CWD column)
##### snipped #####
$ codex resume --last
The success signal is the restored Codex terminal UI with the prior thread visible and the input prompt ready. Plain codex resume commands expect a real terminal, not a non-interactive shell.
› Continue the repository review from the last stopping point.
This continues the resumed thread instead of starting a new Codex conversation.
$ codex resume --all --last
--all --last can select a thread from another project. Use the picker first when the newest saved local session is uncertain.
$ codex resume
Highlight a session, review its summary, and press Enter to reopen it. Add --all to show saved sessions outside the current working directory.
$ codex resume 123e4567-e89b-12d3-a456-426614174000
Use the session ID shown in the picker, in /status, or in the files under $CODEX_HOME/sessions. If CODEX_HOME is unset, Codex uses /~/.codex.