Command reference ยท Claude Code
/rename
Renames the current session and shows the name in the prompt bar.
Renames the current session and shows the name in the prompt bar. Without a name, one is generated automatically from the history. Also non-interactive (-p), requires v2.1.205+.
โ WHEN TO USE IT?
Make a long session easy to find again
Name a multi-hour debugging session with /rename login-bug-session so it's easy to spot later via /resume.
Rename automatically via script
In a non-interactive (-p) setup on v2.1.205+, name sessions consistently at start instead of relying on the auto-generated name.
โ WHEN NOT TO?
A quick throwaway question
For a session that's ending with /clear right after, a custom name isn't worth the effort.
Better: Leave it unnamed โ the auto-generated name is fine for such brief use.
SOURCES
- Claude Code Doku (offiziell) โ code.claude.com