Named sessions for --resume

Resolved 💬 6 comments Opened Sep 24, 2025 by sherifkozman Closed Feb 4, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

Feature Request: Named Sessions for --resume

Problem
The current --resume feature shows multiple sessions without clear identifiers. For developers who work across several projects, it’s easy to get lost and accidentally pick the wrong session since there are no names or tags to distinguish them.

Proposal
Introduce optional session names and tags:

  • codex --name "checkout-fix" to assign a human-friendly name.
  • Support --tags payments,urgent for lightweight grouping.
  • /session name <newName> and /session tags +tag -tag to rename or retag interactively.
  • Update the --resume picker to show name, repo, tags, and last_activity.
  • Allow fuzzy matching:

codex --resume checkout → resumes session with matching name.

Why

  • Reduces confusion when resuming across many sessions.
  • Keeps everything local, backwards-compatible, and low-risk.
  • Minimal implementation: store metadata (name, tags, repo, branch, last_activity) in a meta.json file alongside existing session history.

Example UX
▸ checkout-fix [repo: shop-web] [tags: payments, urgent] [updated: 12m]
flaky-tests [repo: svc-orders] [tags: tests] [updated: 2h]
spike-mcp [repo: tools] [tags: research] [updated: 3d]

Next Steps
If maintainers agree this is valuable, I can prepare a PR implementing:

  • Metadata file write/read
  • CLI flags for --name and --tags
  • Resume picker rendering improvements
  • Basic interactive /session commands

Would love feedback on whether this direction makes sense before starting work.

Are you interested in implementing this feature?

Yes

Additional information

_No response_

View original on GitHub ↗

6 Comments

andylizf · 11 months ago

That's a good point. I've always found the session list confusing because it only shows the first message, which doesn't always reflect what the session is actually about. To address this, I implemented a tool to quickly glance at both the first and last messages for better context. https://github.com/andylizf/codexer

zippoxer · 10 months ago
m-ar-c · 7 months ago

From the PR :

Thanks for the contribution, and apologies for the slow response. We've received many PRs, and we don't have the bandwidth on the codex team to review all of them. We've updated our contribution guidelines to clarify that we're currently accepting contributions for bugs and security fixes, but we're not generally accepting new features at this time. We need to make sure that all new features compose well with both existing and upcoming features and fit into our roadmap. If you would like to propose a new feature, please file or upvote an enhancement request in the issue tracker. We will generally prioritize new features based on community feedback.

Until this issue get enough upvote and zippoxer's PR get merged by openai, we can directly and manually look for the title to modify in the ~/.codex/sessions/YYY/MM/DD/*.jsonl files, as a workaround.

f-gueguen · 7 months ago

If that helps, a small TUI to handle rename / tags / archive: https://github.com/lucent-lab/codex-session-manager
It comes with no warranty

edit: more simply use this npm https://www.npmjs.com/package/codex-session-manager

etraut-openai contributor · 6 months ago

This feature is now implemented. In the CLI, you can use the /rename slash command, and the name will appear in the resume list.

The Codex app also supports a "Rename thread" option (either right click on the thread or double click it).

nguyenbs · 6 months ago

+1