/rename
A Claude Code slash command, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
What it is
Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history. Also available in non-interactive mode (-p); requires Claude Code v2.1.205 or later. From every rename surface, including claude.ai and the desktop app, Claude Code replaces control and invisible characters in the new name with spaces and caps the name at 200 characters. If the name is empty once invisible characters are removed, Claude Code rejects it and shows That name is empty once invisible characters are removed. Usage: /rename <name>. The character replacement and length cap require Claude Code v2.1.221 or later. If another live session on this machine already uses a name you pass, Claude Code applies [a variant of it](/docs/en/sessions#name-your-sessions) instead
Anthropic's own wording. Read off Commands, captured 2026-08-28.
Presence across releases
The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
Changelog entries naming it
-
v2.1.248/list-agents can withhold session names and directories
/list-agents can hide directories and unnamed sessions, pointing you at /rename.
named in this entry
-
v2.1.232A session that loses its name to another live session is renamed and told why
If another live session already holds your session name, yours gets renamed and both you and Claude are told.
named in this entry
-
v2.1.232/rename can hand a name over to another live session
/rename can now hand a name to another live session, or report a newer rename won.
named in this entry
-
v2.1.221/rename rejects names that resolve to nothing
/rename now tells you when a name is empty or can't be generated instead of silently blanking it.
named in this entry
-
v2.1.221Renaming a session propagates the new name
Renaming a session now cleans up the title and pushes the new name everywhere, not just locally.
named in this entry
Documentation pages
- Commands reference table Claude Code CLI
- Agent SDK reference - TypeScript mentions it Claude Code CLI
- Manage multiple agents with agent view mentions it Claude Code CLI
- Best practices for Claude Code mentions it Claude Code CLI
- Claude Code changelog mentions it Claude Code CLI
- Use Claude Code on the web mentions it Claude Code CLI
- CLI reference mentions it Claude Code CLI
- Manage costs effectively mentions it Claude Code CLI
- Message your other Claude Code sessions mentions it Claude Code CLI
- Run Claude Code programmatically mentions it Claude Code CLI
- Hooks reference mentions it Claude Code CLI
- Continue local sessions from any device with Remote Control mentions it Claude Code CLI
- Manage sessions mentions it Claude Code CLI
A reference table page is one whose own table defines this name, and it is where the description above came from. A page that mentions it carries the name somewhere in its text and may say nothing about it at all. Every page carrying it.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the slash command does. All slash commands.