Skip to content

Add interactive session-management for Codex CLI: #6500

Closed

Description

@0xadeeb

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

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

Activity

  1. added
    enhancement
    on Nov 11, 2025
  2. added
    CLI
    TUI
    on Nov 11, 2025
  3. 0xadeeb commented on Nov 25, 2025

    @0xadeeb
    ContributorAuthor

    @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

  4. etraut-openai commented on Nov 25, 2025

    @etraut-openai
    Contributor

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

  5. lpcode808 commented on Feb 3, 2026

    @lpcode808

    +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

  6. removed
    CLI
    on Feb 4, 2026
  7. oxysoft commented on Mar 14, 2026

    @oxysoft

    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.

  8. oxysoft commented on Mar 14, 2026

    @oxysoft

    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.

  9. tointcn commented on Mar 27, 2026

    @tointcn

    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.

  10. sunhs commented on Jul 2, 2026

    @sunhs

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

  11. etraut-openai commented on Aug 5, 2026

    @etraut-openai
    Contributor

    Resume, fork, archive, delete, rename, and search are now all first-class operations.

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

    TUIenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions