Skip to content

/rename session name not indexed — cannot resume by name #26249

Description

@umitkacar

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

  1. User renames a session: /rename transfer
  2. 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>"}
  3. The sessions-index.json has no name or displayName field — only sessionId, summary, firstPrompt, etc.
  4. claude --resume transfer does not find the session
  5. 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

  1. Start a new session: claude
  2. Do some work
  3. Rename the session: /rename my-important-session
  4. Exit: /exit
  5. Try to resume by name: claude --resume my-important-sessionfails
  6. 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

  1. Add displayName field to sessions-index.json schema
  2. Update /rename to write both to JSONL (for history) AND to sessions-index.json
  3. Support claude --resume <name> with exact/fuzzy name matching
  4. Show display names in session picker / claude sessions list

Environment

  • Claude Code: v2.1.42
  • OS: macOS Sequoia 15.3.2
  • Shell: zsh

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions