[BUG] VS Code extension: Tab names change inconsistently on window reload
Resolved 💬 3 comments Opened Mar 28, 2026 by sumanaddanki Closed Apr 1, 2026
What's Wrong?
When reloading VS Code window (Cmd+Shift+P → "Developer: Reload Window"), Claude Code tabs get reassigned to different sessions, causing tab names to change unexpectedly.
Example:
- Tab was named "Squad Suma MCP" (from my first message in that session)
- After reload, same tab now shows "you went into a state" (a different session's first message)
The session-to-tab assignment appears random on each reload when multiple sessions exist.
What Should Happen?
- Tab names should persist across reloads (same tab = same session)
- OR: Tab names should be editable/renameable (like the CLI's
--nameflag) - OR: Users should be able to pin specific sessions to specific tabs
Error Messages/Logs
No error messages — the behavior is silent but disorienting.
Steps to Reproduce
- Open VS Code with Claude Code extension
- Create 5+ Claude Code tabs over time, each starting with a different first message (e.g., "Squad Companion", "Squad Suma MCP", "Discussion")
- Work for a while, accumulating sessions
- Run
Cmd+Shift+P→ "Developer: Reload Window" - Observe that tab names have changed — "Squad Suma MCP" might now show as "you went into a state" or another session's first message
Root Cause (Observed)
- Tab names are derived from the first user message in each session (stored in
~/.claude/projects/<hash>/<session-id>.jsonl) - Multiple sessions exist (20+ in my case)
- On reload, VS Code extension reassigns which session goes to which tab
- The assignment isn't deterministic, causing name changes
Suggested Fix
- Persist tab-to-session mapping — save which session ID was in which tab position
- Add
/renamecommand — let users rename tabs explicitly - Support
--namein VS Code — the CLI hasclaude --name "My Tab"but VS Code extension doesn't use it
Claude Code Version
2.1.84 (Claude Code)
Platform
- API Platform: Anthropic (direct)
- OS: macOS Sequoia 15.3.1
- Terminal/Shell: VS Code integrated terminal (zsh)
Additional Information
I have a complex multi-project workflow with ~20 named sessions (Squad Companion, Squad Mentor, Squad Suma MCP, etc.). Each represents a different product/context. The tab renaming on reload breaks my mental model and workflow.
The CLI's --name flag exists and works great — please bring this to VS Code extension.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗