[FEATURE] allow mid-session tab rename via a slash command or hook.
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
When I open multiple Claude Code sessions in VS Code, each tab gets named after my first message (e.g., "goto shake", "goto karaoke madness"). After working in a session for hours, the first message no longer reflects what the session is about.
I have 5-10 Claude Code tabs open simultaneously across different projects. The only way to identify them is by the tab title, which is locked to whatever I typed first. There's no way to rename a tab mid-session.
Proposed Solution
A built-in /name slash command that renames the current session and immediately updates the VS Code tab title:
/name Shake email orchestrator fixes
Expected behavior:
Tab title updates instantly from "goto shake" to "Shake email orchestrator fixes"
The name persists when resuming the session later via /resume
Running /name with no argument shows the current name
Running /name again overwrites the previous name
Alternative Solutions
Alternative: If a slash command is too heavy, even a hook event like onSessionRenamed that fires when chat-names.json is updated would let plugins like claude-chat-namer trigger a tab rename through the extension API.
Priority
Low - Nice to have
Feature Category
CLI commands and flags
Use Case Example
I'm a freelance developer managing 12 client projects simultaneously in VS Code. Each morning I open Claude Code sessions for the projects I'll work on:
I open a session and type "goto shake" - the tab becomes "goto shake"
I open another and type "help me with the karaoke search bug" - tab becomes "help me with the karaoke search bug"
I open a third and type "check the boards pipeline" - tab becomes "check the boards pipeline"
By noon, my work has evolved:
The "goto shake" session is now deep into building a Scout feature with email discovery
The "karaoke search bug" session pivoted to implementing proxy rotation
The "boards pipeline" session is now focused on a tenant migration
My tabs no longer match what's happening inside them. I'm constantly clicking the wrong tab, losing my train of thought, and wasting time re-reading context to figure out which session is which.
With /name:
/name Shake - Scout + email discovery
/name Karaoke - proxy rotation
/name Boards - tenant migration
Tabs instantly reflect the current work. I can Alt+Tab between them without guessing. When I resume tomorrow, /resume shows the same friendly names instead of UUIDs.
Without /name:
I either live with misleading tab titles all day, or I close the session (losing streaming context and scroll position) and resume it with claude --resume <id> -n "new name" just to fix a label - a disruptive workaround for what should be a one-line command.
Additional Context
Similar features in other tools:
VS Code terminals: Right-click > "Rename" updates the tab title instantly
iTerm2: Cmd+I opens a dialog to rename any tab mid-session
tmux: Ctrl+B , renames the current window
Chrome DevTools: Workspaces can be renamed at any time
GitHub Codespaces: Sessions can be renamed from the dashboard
Existing partial support in Claude Code:
The -n / --name flag already sets session names at launch, proving the infrastructure exists
The chat-names.json file in .claude/projects/ already stores session names (used by the community claude-chat-namer plugin)
The VS Code extension already sets panel.title at creation time from the first user message - the same setter could be called again mid-session
Community plugin ecosystem:
The claude-chat-namer plugin (MIT licensed, 200+ conversations managed) demonstrates real user demand for conversation naming. It auto-names sessions via a Stop hook, provides /chat-rename and /chat-search skills, but cannot update the VS Code tab title because the extension API isn't exposed to plugins. A built-in /name command or an onSessionRenamed hook event would unlock this for the entire plugin ecosystem.
Technical constraint:
Plugins and hooks run in subprocesses and cannot access the VS Code extension API. OSC escape sequences (\033]0;title\007) don't reach the terminal emulator because Claude Code intercepts shell output. This means only the Claude Code extension itself can update the tab title - no workaround exists from userland.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗