Skip to content

feat: add session-rename plugin with /rename command#38182

Closed
ruspg wants to merge 1 commit intoanthropics:mainfrom
ruspg:feat/session-rename-plugin
Closed

feat: add session-rename plugin with /rename command#38182
ruspg wants to merge 1 commit intoanthropics:mainfrom
ruspg:feat/session-rename-plugin

Conversation

@ruspg
Copy link
Copy Markdown

@ruspg ruspg commented Mar 24, 2026

Summary

  • Adds a session-rename plugin that provides a /rename slash command
  • Creates .meta.json sidecar files alongside session .jsonl files to store custom titles
  • Does not modify existing session files — fully non-breaking
  • Updates the plugins README table with the new entry

Closes #38173
Related: #17536 (IDE extension naming), #11408, #32593

Context

This is a highly requested feature across CLI and IDE users:

The plugin establishes a .meta.json sidecar convention that the core CLI can adopt for:

  • Displaying custom titles in /resume session picker
  • Supporting --resume name for scripted session recovery
  • Exposing session names to hooks and status lines

How it works

  1. User runs /rename Fix auth bug in any session
  2. The command locates the current session .jsonl file in ~/.claude/projects/
  3. It writes a {sessionId}.meta.json with the custom title and timestamp
  4. Future /resume integration can read .meta.json to display custom names

Meta.json format

{
  "title": "Fix auth bug",
  "renamed_at": "2026-03-24T09:00:00Z",
  "auto_title": null
}

Test plan

  • Install plugin and run /rename My custom name
  • Verify .meta.json is created alongside the session .jsonl
  • Run /rename without arguments — should prompt for a name
  • Run /rename again to verify it updates existing .meta.json

Future integration path (for core CLI)

Based on community feedback in #17536:

  1. /resume reads .meta.json and shows custom title when available
  2. claude --session-name X flag writes .meta.json at session start
  3. CLAUDE_CODE_SESSION_ID env var exposed in tool-call shell
  4. IDE extension reads .meta.json for tab naming

Adds a plugin that allows users to rename Claude Code sessions for easier
identification when using /resume. Creates .meta.json sidecar files
alongside session .jsonl files without modifying the originals.

Closes #38173

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pwinnski
Copy link
Copy Markdown

There's already a /rename command.

@ruspg
Copy link
Copy Markdown
Author

ruspg commented Mar 25, 2026

Closing — /rename is already a built-in command in Claude Code CLI with full integration into /resume, terminal tab titles, VS Code session list, and context compaction. The feature requested in #38173 already exists. Apologies for the noise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants