[FEATURE] Smart Session Rename

Status Open
Maintainer reply None cached
Activity 11 comments · opened Dec 30, 2025

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 string user_closed timestamp 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-box
dL Overhaul Purchase Backend
mS formatting-claude-md

Last Claude Form Answer

Additional Context

_No response_

View original on GitHub ↗

11 Comments

github-actions[bot] · 8 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/11408
  2. https://github.com/anthropics/claude-code/issues/15576
  3. https://github.com/anthropics/claude-code/issues/12613

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

DrAlexHarrison · 8 months ago

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

  1. #11408 does not pertain to VS Code.
  2. #15576 proposes multiple features (rename & delete) across multiple platforms (CLI & VS Code) and proposes _manual UI controls_. The present issue (#15762) proposes that Claude generate the names. I am in support of the separate features proposed in #15576, in addition to those proposed in the present issue, and have upvoted it, but they are separate features entirely.
  3. #12613 does not pertain to VS Code.

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."

  1. Prompt Claude for a compaction heading.

"In markdown, start with a # heading. No meta-commentary preamble until after title heading."

  1. Copy-paste Claude's first compacting header text as title and show it on editor tabs.
  2. There is no step 3.

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!

oliver-kriska · 7 months ago

This would be valuable for CLI as well, not just VS Code.

The autonaming.json configuration approach and template-based naming (with variables like branch, project, date) would solve the same problem for CLI users managing multiple long-running sessions.

/rename works 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 /rename is a recent addition that I'm still getting used to - automatic naming based on branch/project/context would make session management much smoother.

beveradb · 7 months ago

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-worktree slash 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.

github-actions[bot] · 6 months ago

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.

Raymondhou0917 · 6 months ago

+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 locale setting (e.g., in settings.json or .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.

jedijashwa · 5 months ago

I would love smart session renaming. In the meantime, I think exposing /rename as 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.

yurukusa · 5 months ago

Until smart session renaming is built in, here are ways to make sessions identifiable:
Workaround 1 — SessionStart hook to auto-name sessions:

{
  "hooks": {
    "SessionStart": [
      {
        "hook": "bash -c 'DIR=$(basename \"$PWD\"); BRANCH=$(git branch --show-current 2>/dev/null || echo \"no-git\"); echo \"{\\\"message\\\": \\\"Session: $DIR ($BRANCH)\\\"}\"'"
      }
    ]
  }
}

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:

/name fix-auth-bug

Check if your version has this command by typing / and looking at the autocomplete.
Workaround 3 — Use CLAUDE.md to identify the project:

<!-- CLAUDE.md at project root -->
Project: acme-api-gateway
Branch context: Check git branch on every session start

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:

  • iTerm2: Right-click tab → "Edit Session Name"
  • VS Code: Terminal tab → right-click → "Rename"
  • tmux: Ctrl+B , to rename window

Name your terminal tabs by project/task to visually distinguish sessions.

jkgeekJack · 4 months ago
这对 CLI 来说也很有用,而不仅仅是 VS Code。 autonaming.json 配置方式以及基于模板的命名规则(使用 branch、project、date 等变量),能够解决 CLI 用户在管理多个长时间运行的会话时所遇到的同样问题。 /rename 在手动命名方面表现很好,但如果能配置自动命名功能那就更棒了——尤其是对于那些希望在不同会话中保持一致的命名方式,而不想手动为每个会话重新命名的用户来说。 我通常每天会使用 10 到 20 次 Claude Code 来处理各种任务/问题。这样一来,要在不同的会话之间切换就变得很麻烦。最近新增了通过 /rename 手动重命名会话的功能,我还在适应中。如果能够根据分支、项目或上下文自动命名会话,会话管理就会容易得多。

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 UserPromptSubmit hook 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:

curl -fsSL https://raw.githubusercontent.com/jkgeekJack/cc-session-title/main/install.sh | bash

Hope it helps until this is supported natively!

DrAlexHarrison · 3 months ago

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.

DnaMes · 29 days ago

+1 from a CLI-only user (not VS Code) — I run 6+ concurrent claude windows across projects and the resume picker showing "claude" for nearly every entry makes them indistinguishable except by timestamp/size. /rename exists 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 /rename and 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.