Add interactive session-management for Codex CLI:

Open 💬 8 comments Opened Nov 11, 2025 by 0xadeeb
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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 resume to 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_

View original on GitHub ↗

8 Comments

github-actions[bot] contributor · 8 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #4727
  • #5926
  • #5912
  • #5412
  • #6360

Powered by Codex Action

0xadeeb contributor · 7 months ago

@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

etraut-openai contributor · 7 months ago

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

lpcode808 · 5 months ago

+1 to interactive session management. This fits perfectly with the /session list/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

  • Shortcut: Ctrl+O (or /session quick) opens a palette of sessions.
  • Search across session title + recent message body, but rank title matches above body matches.
  • Results show title, cwd/project, last activity, and a short snippet for body matches.
  • Navigate with ↑/↓ or Ctrl+J/K, Enter to switch, Esc to close.
  • Optional: inline actions for rename/delete.

Interactive mockup: ThreadSwitcherMockup

oxysoft · 4 months ago

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 (Del to mark, Enter to confirm, Esc to cancel), not a one-shot destructive keypath.

oxysoft · 4 months ago

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:

  • Del enters deletion mode
  • statusline/action hints switch to deletion-mode actions
  • users can move through sessions and mark multiple conversations for deletion
  • Enter confirms the whole marked set
  • Esc cancels the mode and clears the marks

That gives you both safety and batching, which feels much more like a serious keyboard-driven session browser.

toint-cn · 3 months ago

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.

sunhs · 18 days ago

need Ctrl+d or anything for deleting the selected session, rather than resume a session and use /delete which will quit TUI