[FEATURE] Smart Session Rename
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I often work on multiple projects for one company across one or more code repositories, frequently using multiple editor-based Claude sessions in the Claude extension for VS Code. I lose track of which session is which and can't figure out which editor tab to click without trial-and-error, or worse, having to read the chat content to get detailed bearings on which chat I'm looking at.
Proposed Solution: Other-Session-Aware Smart Session Rename
1) Use Claude's compaction-style titling logic
Claude does an excellent job writing a top level heading for chats every time it auto-compacts in VS Code. Using similar logic it could just apply a shortened version of that to the session title field, on compaction, on first chat response, or on demand by user.
2) Enhance title generation with other-session-awareness using metadata
What would make it really smart though, is that it could assess other ongoing chats, and decide on unique human-differentiable titles for each session and use those brief title strings, as editor tab titles.
It should maintain awareness of which chats are currently open in editor, when they were each most recently used, and which sessions have been closed, and when they were most recently used.
The combination of giving Claude awareness of other smartly-named sessions and session metadata of other sessions would allow Claude to intelligently correlate titles when appropriate if it is clear that the user is working on a similar project across multiple chat sessions. If not, and the user is simply multitasking on relatively unrelated chat sessions, Claude could just name that chat relatively independently based on its context.
Metadata examples for Claude's "Other-Session-Awareness"
- bool
isOpen== true if session is open in editor - string
lastActive== a timestamp of user's last activity. - if
isOpen== false, check stringuser_closedtimestamp to see when user closed the window. Claude is 'smart' enough to reason that a recent closure info intelligently. - I'll leave the rest to the wonderful product people at anthropic.
Bonus sub-features:
Slash commands for renaming sessions
/autoname (forces Claude to reanalyze and rename) /autonameactive (forces Claude to reanalyze and rename all active sessions)/autoname 1, 3, 5-7 (rename by editor position in current editor window containing multiple Claude sessions) /autonameall (renames all sessions or MRU 100, 500, 1000, or some anthropic-determined setting)
/autoname <instructions on how to think about it.. e.g. "bias for most recent plan we just made"> (allows user input of arguments or free form instructions without specific formatting needed)
Free-form settings file for human-worded guidance on renaming strategy & patterns
Allow user to build a autonaming.json settings file where user can include detailed free form information that Claude should always consider when naming chat sessions. ("Always include datestring in most compact format possible at front of session name.", "Always Use Title Case", "Never use title case.", etc.)
Alternative Solution: Merely "Smart Session Rename"
Just name sessions and their editor tabs by the content in the chat, updating it on compactions.
This would do the same as proposed in primary solution, but without the awareness of other chat sessions. This would make for an excellent MVP feature release.
Claude Form Answers
Priority
High - Significant impact on productivity
Feature Category
Other
Use Case Example: Multi-Session Chat Confusion (from right now)
I have 3 Claude sessions open in VS Code. They are titled:
- "you appear to have hallucinated in some previ..."
- "deep dive the commit history, code-writing an..."
- "Audit timeouts/timers in Saturday & fuel-ba..."
The tabs show:
- "you appear to have hallu..."
- "deep dive the commit history, code-writing an..."
- "Audit timeouts/timers in..."
Excellent titles by Claude
I asked Claude what the topics of the conversations were in a format that would fit on an editor tab, which it answered perfectly:
- USDA Research & Cleanup
- Refining the /commit Skill
- Timeout & Limit Audit
As you can see, the titles miss the mark most of the time. Real world, more than 2/3 of the time, the editor titles are not only useless but distracting and confusing within a workflow. They instead could be very useful.
How I'd like my tab titles
Rationale
I recall generally three things about a session to help me "remember" it.
- How long or big was it // how much time I spent in it, as a feeling.
- How long ago it happened.
- The topic, loosely.
To maximally speed my accession of cognitive awareness of what tab I'm looking at, I'd like the following syntax in naming by Claude.
First character indicating when, second character indicating size or length, a space, then a title string generated by Claude.
First character, based on WHEN it happened.
(ie. When conversation was most active (day that had the most responses by me), or more simply, the date the session started.)
- _ OR "" = today
- d = yesterday
- D = 2-6 days ago
- w = 7 days ago
- W = 7-28 days ago
- m = 28-60 days ago
- M = 60-364 days ago
- y = 365- you get the picture.
Second char, based on LENGTH/SIZE
- S = short convo, less than 25% context used
- 0 = normal conversation, no compactions
- 1 = compacted once in convo
- 2 = compacted twice in convo
- ...
- 9 = compacted 9 times in convo
- L = compacted more than 9 times in convo.
TITLE EXAMPLES
_0 post-signup-dialog-boxdL Overhaul Purchase BackendmS formatting-claude-md
Last Claude Form Answer
Additional Context
_No response_
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is not a duplicate issue.
It is probably a high-prio feature that is going to get ever-increasing attention until implemented, given its recent implementation _outside_ the VS Code extension.
I had already read all those possible duplicate issues (#11408, #15576, & #12613) that @github-actions bot generated with Claude Code, and I even made a detailed comment mentioning them and others like them (#10747, #9198, #11808, #15050), on another "tab renaming" issue.
VS Code Claude Extension is widely used and is substantially different from Claude Code in CLI, which I virtually never use.
Specifics of duplicates proposed
Problematic "VS Code Rename Session" Issue Closures
There seems to be a pattern of VS-Code-related "Rename Session" GitHub Issues getting closed unhelpfully. This is due to bot confusion of CLI session renaming issues existing and the recent CLI session rename implementation. The VS Code implementation of session renaming is not yet built to my knowledge, and I believe that this issue I created is the best description of a possible method of doing it and proposed use case available on GitHub.
PS. In Anthropic spirit of "Do the simple thing that works."
"In markdown, start with a # heading. No meta-commentary preamble until after title heading."I'm sorry, I forgot that one of the first things I'd built in Claude was something to add titles to things. I forgot it wasn't native!
This would be valuable for CLI as well, not just VS Code.
The
autonaming.jsonconfiguration approach and template-based naming (with variables like branch, project, date) would solve the same problem for CLI users managing multiple long-running sessions./renameworks great for manual naming, but configurable auto-naming would be a nice addition - especially for users who want consistent naming patterns across sessions without manually renaming each one.I typically work with 10-20 Claude Code sessions per day for different tasks/issues, which makes switching between them difficult. Manual renaming via
/renameis a recent addition that I'm still getting used to - automatic naming based on branch/project/context would make session management much smoother.To echo the above, this is key for the CLI too - and an even simpler quick fix for now would be to allow the existing /rename command to be executed by slash commands or instructions in CLAUDE.md etc.
As a workaround for now, I currently start every claude code session with a
/new-worktreeslash command I created:https://gist.github.com/beveradb/50f5ff74041a1d871ddde4872feb69b3
Crucially, this forces me to type a few words about what i'm tackling in this session right from the start before I type my main prompt.
The final line it outputs when I run the slash command is a
/rename <keywords>command for me to immediately run - I have to copy/paste and run to rename the session before I type my main initial prompt.It works, but it's annoying that I have to copy/paste the /rename command to run it - if claude code could just be instructed to run a /rename command to rename the session itself, that could work as a much easier workaround for folks before implementing a more complex auto-rename feature.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
+1 for this, especially with the new Remote Control feature.
I use Claude Code as a daily LifeOS assistant (long-running sessions across multiple projects). With the recent Remote Control feature (
/rc), I now manage sessions from my phone via Claude App — which makes session discoverability even more critical.Two concrete suggestions to add to this discussion:
1. Locale-aware auto-naming
/rename(no args) currently always generates English titles regardless of the conversation language. For non-English users, this creates a cognitive disconnect — my entire conversation is in Traditional Chinese, but the session title is in English.A simple fix: respect the conversation's dominant language when auto-generating titles, or add a
localesetting (e.g., insettings.jsonor.claude/settings.json).2. Progressive auto-rename on compaction
Instead of requiring a manual
/rename, auto-update the session title whenever context compaction occurs — similar to how compaction already generates a summary heading. The title should evolve as the conversation focus shifts.These two changes would significantly improve the mobile Remote Control experience, where you're staring at a list of sessions with zero context about what's inside each one.
I would love smart session renaming. In the meantime, I think exposing
/renameas a tool (#37592, #33181) would get us a lot of the way there. CLAUDE.md already works as a guidance file, so you could write your naming preferences there and Claude would follow them. Not a full replacement for what's described here, but it would cover a lot of it.Until smart session renaming is built in, here are ways to make sessions identifiable:
Workaround 1 — SessionStart hook to auto-name sessions:
This injects the project directory and git branch into the session at start, giving you context about which session is which.
Workaround 2 — Use /name command (if available):
Some versions support naming sessions:
Check if your version has this command by typing
/and looking at the autocomplete.Workaround 3 — Use CLAUDE.md to identify the project:
Claude will reference this, making it clearer which project you're working on in each session.
Workaround 4 — Terminal tab naming:
Most terminals support custom tab titles:
Ctrl+B ,to rename windowName your terminal tabs by project/task to visually distinguish sessions.
I've implemented this feature as a small open-source hook: cc-session-title
It disables Claude Code's built-in English-only title generator and replaces it with a
UserPromptSubmithook that calls Claude Haiku with a system prompt that forces the output language to match your input language. Works with tmux#{pane_title}, iTerm2, Terminal.app, and any terminal that honors OSC 0/2.Install with one line:
Hope it helps until this is supported natively!
Just came back here to say, I now want most of this in Claude Code CLI as well. Probably with a bit more verbosity of naming allowed because I use Gnome and there's more space in the tab area and the prompt bar, which are the two places the session names would show.
+1 from a CLI-only user (not VS Code) — I run 6+ concurrent
claudewindows across projects and the resume picker showing "claude" for nearly every entry makes them indistinguishable except by timestamp/size./renameexists and works for the current session, but see #25090: the custom name doesn't reliably survive — reverted by a background auto-titler, sometimes even mid-session, not just across exit/resume.Worth noting for whoever picks this up: any auto-naming/context-based rename built on top of the current title storage would inherit that same revert bug, since both
/renameand an auto-namer would be writing to the same racing mechanism. Might be worth sequencing a fix for #25090 (make a set title durable) before or alongside building smarter auto-naming here — otherwise the auto-generated name would have the identical persistence problem as a manual one.