[BUG] Sessions renamed via CLI appear in VS Code extension dropdown but open as empty sessions

Resolved 💬 2 comments Opened Feb 23, 2026 by gonnector Closed Mar 23, 2026

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

  1. Start a new session in the VS Code extension (the session is auto-titled with the first user message)
  2. Open a terminal in the same project directory and launch claude CLI
  3. Use /resume to find and resume the VS Code-originated session
  4. Use /rename my-new-name to rename the session
  5. Go back to the VS Code extension and open the session dropdown
  6. The renamed session (my-new-name) appears in the list
  7. 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: /rename support in VS Code extension
  • #14776 — CLI /rename fails 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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗