Feature request: Add session rename capability (/rename command)
Resolved 💬 3 comments Opened Mar 24, 2026 by ruspg Closed Mar 25, 2026
Feature Request
Problem
Claude Code sessions are auto-named based on date + context (e.g., "Mar 24 – Analyst meta"), but there is no way to rename them. When working on multiple tasks, sessions accumulate with generic or unhelpful names, making it hard to find past conversations.
Current State
- Session data is stored as
~/.claude/projects/{encodedPath}/{sessionId}.jsonl - There is no centralized session index or metadata file
- Session titles are generated on-the-fly — no persistent "title" field exists
- No CLI command, slash command, or API to rename a session
Proposed Solution
/rename <new-name>slash command — renames the current session- Session metadata file — store a
{sessionId}.meta.jsonalongside each.jsonlfile with fields like:
``json``
{
"title": "User-provided session name",
"created_at": "2026-03-24T09:00:00Z",
"auto_title": "Mar 24 – Analyst meta"
}
- Session list integration —
/resumeand session picker should display the custom title when available, falling back to auto-generated title
Why This Matters
- Power users run many sessions (scheduled tasks, feature work, debugging) and need to distinguish them
- Auto-generated names are often generic ("Mar 24 – ...") and don't reflect actual content
- Being able to rename sessions would significantly improve the
/resumeworkflow
Alternatives Considered
- Hooks: Session lifecycle events (start/end) are not exposed to hooks, so this can't be solved with user-side automation
- Manual meta files: Users could create
.meta.jsonfiles manually, but Claude Code doesn't read them
Environment
- Claude Code CLI
- All platforms (macOS, Linux, Windows)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗