Skip to content

Add Chat Session Management: chat list, chat resume or --restore-session #2080

Closed

Description

@sfyr111

Issue Description:

I’m currently working with Codex CLI and noticed that while .codex/history files are being recorded locally, there are no built-in commands to manage or resume chat sessions—unlike tools like Claude, which support -c -r to continue conversations.

Even though I’ve configured the history section in ~/.codex/config.json like this part:

history:
  maxSize: 1000
  saveHistory: true
  sensitivePatterns: []

…there’s still no way to list saved sessions or resume a previous chat. This severely limits usability and session continuity in real projects.

Strongly urge adding support for features such as:
• /chat list (or codex chat list) — to display saved session tags or session IDs
• /chat resume — to reload a previous conversation context
• Or even a global option like --resume-session or --load-history to reopen the last session

Such session persistence would allow smooth continuation across restarts, recover from crashes, and improve workflows—especially for long-running tasks or when working across multiple project sessions. Without this functionality, the history files exist but are practically unusable.

Hope this feature can be prioritized—thanks for considering!

Activity

  1. bachittle commented on Aug 10, 2025

    @bachittle

    +1 for this issue. I use -c and -r all the time in claude code and was disappointed that I couldn't find it for codex.

  2. added
    enhancement
    on Aug 11, 2025
  3. helLf1nGer commented on Aug 24, 2025

    @helLf1nGer

    I pressed Ctrl-Z by mistake, and couldn't resume the session, a disappointment

  4. MMZOX commented on Aug 25, 2025

    @MMZOX

    +1 for this.

  5. and-rewsmith commented on Aug 26, 2025

    @and-rewsmith
  6. reneric commented on Aug 27, 2025

    @reneric

    insane to not have a resume flag

  7. helLf1nGer commented on Sep 1, 2025

    @helLf1nGer

    @and-rewsmith, while that works in my case, the problem is inability to resume some chat. Claude Code has --resume flag, which is insanely powerful. If you worked on a feature, but want to resume some days after, you can by just resuming that chat, while Codex just is inferior at the moment

  8. vladislavdonchev commented on Sep 1, 2025

    @vladislavdonchev

    I just figured out this was missing because there is also no /login feature to change your key mid-work... So I ended up losing the entire chat.

  9. sbaechler commented on Sep 1, 2025

    @sbaechler

    I often have the issue that my session is invalidated after I have locked my computer. I have to restart Codex to continue working.
    I noticed that a session history is stored in ~/.codex/session but it seems that Codex is unable to access it.

  10. CzsGit commented on Sep 2, 2025

    @CzsGit

    I thought it had switched to some other method to retrieve past history. The fact that it doesn’t even provide this feature is just outrageous.

  11. eduhsuhn commented on Sep 2, 2025

    @eduhsuhn

    I thought it had switched to some other method to retrieve past history. The fact that it doesn’t even provide this feature is just outrageous.

    Outrageous? Womp womp 😭 It's open source buddy, get to work to add the features you want instead of getting "outraged" by an open source, generous, product. :3c

  12. gpeal commented on Sep 3, 2025

    @gpeal
    Contributor

    Duplicate of #1991

    We hear you! This is coming soon (both for the CLI and extension)

  13. Andrew-Pynch commented on Oct 2, 2025

    @Andrew-Pynch

    I thought it had switched to some other method to retrieve past history. The fact that it doesn’t even provide this feature is just outrageous.

    Outrageous? Womp womp 😭 It's open source buddy, get to work to add the features you want instead of getting "outraged" by an open source, generous, product. :3c

    silence dweeb

  14. eduhsuhn commented on Oct 2, 2025

    @eduhsuhn

    I thought it had switched to some other method to retrieve past history. The fact that it doesn’t even provide this feature is just outrageous.

    Outrageous? Womp womp 😭 It's open source buddy, get to work to add the features you want instead of getting "outraged" by an open source, generous, product. :3c

    silence dweeb

    Image
  15. simone-coelho commented on Oct 15, 2025

    @simone-coelho

    I thought it had switched to some other method to retrieve past history. The fact that it doesn’t even provide this feature is just outrageous.

    Outrageous? Womp womp 😭 It's open source buddy, get to work to add the features you want instead of getting "outraged" by an open source, generous, product. :3c

    It is not open source as you expect people to think. This is a very mean and ignorant comment. Using this product is not free. So open source or not, the man has the right to be outraged because he is absolutely right. Without resume functionality using Codex in a coding session requires careful coordination and planning to keep context fresh. Comments like this are really not helpful and childish.

  16. helLf1nGer commented on Nov 9, 2025

    @helLf1nGer

    I can't believe they would ship without the ability to resume sessions. Frankly, irresponsible. I don't know why anyone would use Codex CLI with the risk of losing sessions. If I had known I never would have fired it up in the first place.

    Resume has been in for a few months now.
    Just type codex resume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions