Feature Request: Allow Renaming of Conversation Sessions for Easier History Management
Feature Request: Allow Renaming of Conversation Sessions for Easier History Management
Is your feature request related to a problem? Please describe.
Currently, when using claude --resume, the interactive session selector lists conversations identified by their start time and initial prompt. While this is useful, it can become difficult to distinguish between sessions when working on multiple tasks, especially if the initial prompts are similar (e.g., "fix this bug", "what does this file do?").
For example, a developer using Git worktrees might have several concurrent Claude Code sessions, one for a feature, one for a bug fix, and another for a refactor. The current history view makes it challenging to quickly identify and resume the correct session.
Describe the solution you'd like
I propose adding the ability for users to assign a custom, memorable name to a conversation session. This would make the history in claude --resume much more scannable and user-friendly.
This could be implemented in two ways:
- An interactive slash command to rename the current session.
- A CLI command to manage session names from outside the interactive REPL.
Describe alternatives you've considered
The current alternative is to rely on memory or to open each session to check its content, which is inefficient. No other workarounds seem to be available.
Additional context
This feature would significantly improve the usability of the session history and resumption features, encouraging users to leverage them more effectively for context switching between different coding tasks.
---
Proposed Implementation Details
1. Interactive TUI Command: /rename
A new slash command, /rename, would allow users to rename the current session on the fly.
Usage:
> /rename "Refactoring the authentication module"
Feedback:
The TUI should provide a confirmation message after the command is executed.
✻ Session renamed to "Refactoring the authentication module".
2. CLI Command for Session Management
A new subcommand under claude could be introduced for managing sessions.
Usage:
claude session rename <session-id> "New, more descriptive name"
To support this, a claude session list command would also be beneficial to retrieve session IDs.
3. Updated --resume Interface
The interactive session selector should be updated to display the custom name. If no custom name is set, it should fall back to the current behavior.
Mockup of claude --resume screen:
Before:
? Select a conversation to resume:
▸ 2025-08-16 14:30:15 - "implement this feature based on the issue description" (15 msgs)
2025-08-16 11:10:05 - "fix the TypeError in the user dashboard component" (22 msgs)
2025-08-16 09:05:41 - "how should I implement user authentication for this..." (8 msgs)
After:
? Select a conversation to resume:
▸ Refactor Auth Module (2025-08-16 14:30:15, 15 msgs)
Fix Dashboard TypeError (2025-08-16 11:10:05, 22 msgs)
2025-08-16 09:05:41 - "how should I implement user authentication for this..." (8 msgs)
Acceptance Criteria
- [ ] A new slash command,
/rename [new session name], is available in the interactive TUI. - [ ] Executing
/renamesuccessfully updates the metadata for the current session. - [ ] The TUI provides confirmation to the user after a successful rename.
- [ ] A new CLI command,
claude session rename <session-id> <name>, is available. - [ ] The
claude --resumeinteractive selector displays the custom session name if one is set. - [ ] If a session has no custom name, the
--resumeselector falls back to the existing display format (timestamp and initial prompt/summary). - [ ] Session names are persisted locally and are available after restarting Claude Code.
Technical Considerations
- Storage: The custom session name would need to be stored as part of the session's metadata, likely within the local session history files (e.g.,
~/.claude/projects/.../*.jsonl). - Backwards Compatibility: The system should handle old sessions that do not have a custom name field.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗