Allow programmatic renaming of the VS Code extension session tab (skill/setting/API)
Feature request
Provide a way for a Claude Code session running inside the VS Code extension to set its own visible tab label — either from a skill/slash command, a settings.json key with template variables, an environment variable, or an extension API.
Use case
I run 8 parallel Claude Code sessions, one per git worktree slot (slot/1 through slot/8). Each slot is a permanent domain-based unit (Client Implementation, Data Ops, Infrastructure, etc.). At a glance I need to know which tab is which slot — the auto-generated "summary from first prompt" titles look interchangeable across slots once you have more than two open.
I'd like a /good-morning skill (run at the start of each session) to rename the tab to something like:
Wed, May 27, 2026 — slot/8
…so the tab self-labels with the date and the worktree branch. After context compaction or session resume, the date stays accurate because the skill runs at session start.
What would solve this
Any one of these would work, ordered by preference:
- Settings.json template — e.g.
"claude-code.sessionTabTitle": "${date} — ${gitBranch}"with substitution at session start. - Slash command —
/rename-tab "Wed, May 27, 2026 — slot/8"that a skill can invoke. - Environment variable / file — Claude Code reads
$CLAUDE_TAB_TITLEor.claude/tab-titleat session start and on demand. - Hook event —
SessionStarthook return value sets the tab title.
What I've already checked
/renameandCtrl+Rrename in the session-history picker are manual UI actions, not programmatic.- Terminal OSC sequences (
\e]0;...\a) work for terminal tabs but not the extension's chat panel. - No documented hook, env var, settings.json key, or skill mechanism currently controls the tab label.
Workarounds today
None I'm aware of. Manual Ctrl+R rename works once but doesn't survive session reload or apply automatically.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗