[BUG] Sessions renamed via CLI appear in VS Code extension dropdown but open as empty sessions
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] I can reproduce this bug consistently
Bug Description
When a session originally created in the VS Code extension is resumed and renamed via the CLI (/rename), the renamed session appears correctly in the VS Code extension's session dropdown (Past Conversations). However, clicking on it does not restore the original conversation — instead, it opens a blank/empty session with no message history.
Steps to Reproduce
- Start a new session in the VS Code extension (the session is auto-titled with the first user message)
- Open a terminal in the same project directory and launch
claudeCLI - Use
/resumeto find and resume the VS Code-originated session - Use
/rename my-new-nameto rename the session - Go back to the VS Code extension and open the session dropdown
- The renamed session (
my-new-name) appears in the list - Click on it to resume
Expected Behavior
The renamed session should open with the full original conversation history intact — the same session that was renamed in the CLI.
Actual Behavior
Clicking the renamed session in the VS Code dropdown opens a blank/empty session with no messages. The conversation history is lost from the extension's perspective, even though the session data likely still exists on disk.
Analysis
This appears to be a session ID/path mismatch between the CLI and VS Code extension after a rename operation. The extension's dropdown correctly reads the updated session name from the index, but fails to resolve the correct session file when attempting to load it.
Related issues for context:
- #11145 — Feature request:
/renamesupport in VS Code extension - #14776 — CLI
/renamefails with ENOENT error - #23933 — Named sessions from older versions not resumable
Impact
This bug effectively forces users to choose between:
- Using the VS Code extension without session naming
- Using the CLI with session naming but losing VS Code integration
Session management is a critical workflow feature, especially for users running multiple parallel sessions. The inability to rename and reliably resume sessions across CLI and VS Code extension significantly impacts productivity.
Environment
- Claude Code: VS Code extension + CLI (latest versions as of 2026-02-24)
- OS: Windows 10 (MSYS2/Git Bash)
- VS Code: Latest stable
Priority
High — Session management is fundamental to multi-session workflows, and this cross-environment inconsistency undermines trust in session persistence.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗