Description
The /rename command in Claude Code allows users to rename their sessions (e.g., /rename transfer). However, the renamed session cannot be found or resumed by its name — only by UUID.
Current Behavior
- User renames a session:
/rename transfer
- The rename is stored only as a message inside the session JSONL file:
{"type":"user","message":"<command-name>/rename</command-name><command-args>transfer</command-args>"}
- The
sessions-index.json has no name or displayName field — only sessionId, summary, firstPrompt, etc.
claude --resume transfer does not find the session
- User must know the UUID to resume:
claude --resume 253352ca-a890-4dd8-8083-c378f38e45b5
Expected Behavior
/rename should update sessions-index.json with a displayName field
claude --resume <name> should search by display name (exact or fuzzy match)
claude --continue or session picker should show the renamed display name
Steps to Reproduce
- Start a new session:
claude
- Do some work
- Rename the session:
/rename my-important-session
- Exit:
/exit
- Try to resume by name:
claude --resume my-important-session → fails
- The only way to resume is by UUID from
sessions-index.json
Impact
/rename is effectively a cosmetic-only feature with no functional benefit
- Users who rename sessions expect to find them by name later
- Without name-based lookup,
/rename creates a false sense of organization
Proposed Solution
- Add
displayName field to sessions-index.json schema
- Update
/rename to write both to JSONL (for history) AND to sessions-index.json
- Support
claude --resume <name> with exact/fuzzy name matching
- Show display names in session picker /
claude sessions list
Environment
- Claude Code: v2.1.42
- OS: macOS Sequoia 15.3.2
- Shell: zsh
Description
The
/renamecommand in Claude Code allows users to rename their sessions (e.g.,/rename transfer). However, the renamed session cannot be found or resumed by its name — only by UUID.Current Behavior
/rename transfer{"type":"user","message":"<command-name>/rename</command-name><command-args>transfer</command-args>"}sessions-index.jsonhas nonameordisplayNamefield — onlysessionId,summary,firstPrompt, etc.claude --resume transferdoes not find the sessionclaude --resume 253352ca-a890-4dd8-8083-c378f38e45b5Expected Behavior
/renameshould updatesessions-index.jsonwith adisplayNamefieldclaude --resume <name>should search by display name (exact or fuzzy match)claude --continueor session picker should show the renamed display nameSteps to Reproduce
claude/rename my-important-session/exitclaude --resume my-important-session→ failssessions-index.jsonImpact
/renameis effectively a cosmetic-only feature with no functional benefit/renamecreates a false sense of organizationProposed Solution
displayNamefield tosessions-index.jsonschema/renameto write both to JSONL (for history) AND tosessions-index.jsonclaude --resume <name>with exact/fuzzy name matchingclaude sessions listEnvironment