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

Resolved 💬 16 comments Opened Aug 9, 2025 by sfyr111 Closed Sep 3, 2025
💡 Likely answer: A maintainer (gpeal, contributor) responded on this thread — see the highlighted reply below.

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 <session> — 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!

View original on GitHub ↗

16 Comments

bachittle · 11 months ago

+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.

helLf1nGer · 11 months ago

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

MMZOX · 11 months ago

+1 for this.

jiangying000 · 10 months ago

when comparing the UX, codex is very far away from claude code.

I can't believe Codex is missing such a basic functionality.

and-rewsmith · 10 months ago

@helLf1nGer https://www.man7.org/linux/man-pages/man1/fg.1p.html

you can just bring it back with fg

reneric · 10 months ago

insane to not have a resume flag

helLf1nGer · 10 months ago

@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

vladislavdonchev · 10 months ago

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.

sbaechler · 10 months ago

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.

CzsGit · 10 months ago

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.

eduhsuhn · 10 months ago
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

gpeal contributor · 10 months ago

Duplicate of #1991

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

Andrew-Pynch · 9 months ago
> 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

eduhsuhn · 9 months ago
> > 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

<img width="460" height="460" alt="Image" src="https://github.com/user-attachments/assets/52aff28f-08e7-4b35-9437-cad633a68625" />

simone-coelho · 9 months ago
> 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.

helLf1nGer · 8 months ago
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