Skip to content

Feature request: Add session rename capability (/rename command) #38173

@ruspg

Description

@ruspg

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

  1. /rename <new-name> slash command — renames the current session
  2. Session metadata file — store a {sessionId}.meta.json alongside each .jsonl file with fields like:
    {
      "title": "User-provided session name",
      "created_at": "2026-03-24T09:00:00Z",
      "auto_title": "Mar 24 – Analyst meta"
    }
  3. Session list integration/resume and 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 /resume workflow

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.json files manually, but Claude Code doesn't read them

Environment

  • Claude Code CLI
  • All platforms (macOS, Linux, Windows)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliduplicateThis issue or pull request already existsenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions