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

  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:

``json
{
"title": "User-provided session name",
"created_at": "2026-03-24T09:00:00Z",
"auto_title": "Mar 24 – Analyst meta"
}
``

  1. 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)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗