How to resume the last Codex session

Resuming the last Codex session restores the most recent interactive thread so work can continue with the same conversation context instead of starting again from an empty prompt.

Current local codex resume --help output describes codex resume as the command for resuming a previous interactive session, and --last continues the most recent one without showing the picker. The same help also accepts a session ID or thread name when the exact thread is already known.

--last is the fastest path only when the newest saved interactive thread is the correct one. If another session should be continued instead, use codex resume to open the picker, or add --all to disable the default current-directory picker filter and show the CWD column before choosing a thread.

Steps to resume the last Codex session:

  1. Check that the current shell still has a cached Codex login before trying to resume a saved thread.
    $ codex login status
    Logged in using ChatGPT

    Resume uses the local Codex profile from the current shell environment. If this check reports Not logged in, complete a supported sign-in flow first.

  2. Change to the project directory that the resumed terminal session should continue using.
    $ cd ~/projects/example-app
    $ pwd
    /home/user/projects/example-app

    The default codex resume picker filters by the current directory. Use codex resume --all when the needed thread lives under a different working tree.

  3. Resume the most recent interactive session without opening the picker.
    $ codex resume --last

    Current local help for codex resume says --last continues the most recent session immediately. The decisive success signal is the restored Codex terminal UI with the prior thread visible and the input prompt ready.

  4. Enter the next request after the restored prompt appears to continue the same thread.
    › Continue the repository review from the last stopping point.

    This continues the resumed interactive conversation instead of starting a fresh session.

  5. Open the session picker instead when the newest saved thread is not the correct one.
    $ codex resume

    Use the picker for older threads in the current working tree, or rerun it as codex resume --all when the desired session is hidden by the default CWD filter.

  6. Resume a specific saved thread directly when the session ID or thread name is already known.
    $ codex resume 123e4567-e89b-12d3-a456-426614174000

    Current help says the first positional argument can be a conversation UUID or thread name, and UUIDs take precedence when the value parses as one.