Add interactive session-management for Codex CLI:
What feature would you like to see?
I’d like to add a first-class session management experience in the Codex CLI that behaves similarly to how tmux handles sessions — enabling users to maintain multiple independent conversations (sessions), quickly switch between them, rename them, list them, and delete or create new ones — all from within the interactive TUI (and optionally via CLI subcommands).
Specifically:
/session— displays all saved/resumable sessions, showing metadata such as _alias/name_, _session ID_, _last activity timestamp_, _directory/project context_. It'll be interactive and the user can select to jump to a new session./session rename <SESSION_ID|NAME> <NEW_NAME>— assign a human-friendly alias or name to an existing session./session delete <SESSION_ID|NAME>— delete an existing session if no longer needed.- Optionally mirror all of the above with CLI subcommands (e.g.,
codex session list,codex session rename …) for non-TUI workflows.
---
Why is this important?
- When working on multiple features/tasks/projects simultaneously, it greatly improves productivity to be able to keep multiple sessions (contexts) running side-by-side, and switch among them easily — just like tmux windows/sessions.
- While Codex CLI already supports
codex resumeto pick up an old session, the workflow lacks human-friendly names/aliases, intuitive listing of sessions, and switching inside the interactive mode without dropping to shell. - This will enable better project hygiene: easier to identify which session is for which task, organize by project, reduce cognitive overload when managing many sessions.
- A more robust session management system aligns with user expectations from other CLI agents (for example, Claude Code)
---
Existing related issues/discussions
- Discussion #341: “Feature: Multi-Session Management for Codex CLI” — users requested save, name, list, switch between multiple sessions. :contentReference[oaicite:6]{index=6}
- Issue #2080: “Add Chat Session Management: chat list, chat resume or --restore-session” — highlights lack of built-in commands to list/resume sessions. :contentReference[oaicite:7]{index=7}
- Issue #146: “feat: session persistence” — earlier request to continue a previously saved session/thread via
/session. :contentReference[oaicite:8]{index=8}
While these cover parts of the session-management spectrum, none explicitly covers the full interactive in-TUI slash command workflow (/session) plus rename/delete/list/switch exactly as proposed here.
---
Are you interested in implementing this feature?
Yes — I’m willing and ready to contribute the implementation (forking the repo, writing tests, updating docs, submitting a PR) if the maintainers agree that this feature aligns with the roadmap and is open for review.
---
Thank you for considering this enhancement. I believe it will significantly improve the workflow for users managing multiple tasks/projects with Codex CLI.
Additional information
_No response_
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
@aibrahim-oai @rakesh-oai @bolinfest tagging maintainers since no response.
Is this planned or a no go? I can close this issue if it's a no go
@0xadeeb, we generally prioritize features based on community upvotes (thumbs-up reactions). This feature has had relatively few upvotes so far, so it's low on our priority queue. It's fine to leave it open for now to see if additional codex users want to see the same functionality added.
+1 to interactive session management. This fits perfectly with the
/sessionlist/rename/delete vision, and I think a quick‑switcher overlay would make it feel instant.Proposal: add a “Quick Open” session switcher inside the TUI, a la Obsidian
Ctrl+O(or/session quick) opens a palette of sessions.↑/↓orCtrl+J/K,Enterto switch,Escto close.Interactive mockup: ThreadSwitcherMockup
Linking a more focused destructive-action companion here: #14713.
This issue covers the broader interactive session-management surface. #14713 isolates one part that should be treated as non-negotiable UX: session deletion in the resume/browser flow should be a safe two-step action (
Delto mark,Enterto confirm,Escto cancel), not a one-shot destructive keypath.One important refinement from the companion delete-flow ticket (#14713): the strongest UX is probably not one-by-one confirmation.
It should be a real deletion mode:
Delenters deletion modeEnterconfirms the whole marked setEsccancels the mode and clears the marksThat gives you both safety and batching, which feels much more like a serious keyboard-driven session browser.
This would help a lot, especially for local session cleanup.
Once you have used Codex for a while, the local session history starts piling up. At that point, deleting old sessions in a safe and human-friendly way gets pretty awkward.
That is the main reason I put together a small local-only tool for myself:
https://github.com/zhengshuyun-com/codex-local-session-manager
It is just a workaround, not a replacement for built-in CLI support. But after using it for a bit, I do think filtering and deleting local sessions are all worth having in Codex itself.
If helpful, I am happy to share more concrete cleanup workflows from real usage.
need Ctrl+d or anything for deleting the selected session, rather than resume a session and use
/deletewhich will quit TUI