[BUG] Session custom names reset to firstPrompt after Developer: Reload Window

Resolved 💬 3 comments Opened Mar 5, 2026 by FbeainiAstra Closed Mar 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Renamed sessions in the VS Code extension lose their custom names after Developer: Reload Window. The names revert to the truncated first prompt.

Custom titles are persisted correctly — each rename appends a {"type":"custom-title","customTitle":"..."} entry to the session's .jsonl file. However, sessions-index.json (the lightweight cache used to populate the session list on startup) does not include a customTitle field.

On reload, the session list is built from the index cache, which only has firstPrompt — so custom names disappear. The full JSONL parse that extracts customTitle happens lazily when a session is opened/interacted with.

What Should Happen?

Custom session names should persist across window reloads. The customTitle field should be written into sessions-index.json entries when a session is renamed, so the cached index serves the correct display name immediately.

Error Messages/Logs

No error — the rename silently reverts to firstPrompt display.

Steps to Reproduce

  1. Open Claude Code in VS Code
  2. Start a new session and send a message
  3. Rename the session to a custom name (e.g. "My Custom Name")
  4. Confirm the custom name appears in the session list
  5. Run Developer: Reload Window (Ctrl+Shift+P → Reload Window)
  6. Open the Claude Code session list — custom name is gone, replaced by the first prompt text

Claude Model

claude-opus-4-6 (not model-specific — this is a VS Code extension UI issue)

Is this a regression?

Unknown — may have always been this way since session renaming was introduced.

Claude Code Version

2.1.69 (VS Code extension)

Platform

Anthropic API (direct)

Operating System

Windows 11 Pro 10.0.26200

Terminal/Shell

bash (Git Bash)

Additional Information

Investigation findings:

  • Custom titles ARE durably stored in the session .jsonl files as {"type":"custom-title","sessionId":"...","customTitle":"..."} entries
  • The extension code does parse customTitle from JSONL during full session loading: eV(x,"customTitle")||eV(x,"lastPrompt")||eV(x,"summary")||D
  • The sessions-index.json cache file does NOT include customTitle — its schema only has: sessionId, fullPath, fileMtime, firstPrompt, messageCount, created, modified, gitBranch, projectPath, isSidechain
  • Suggested fix: Persist customTitle in sessions-index.json entries and update it when renameSession() is called

View original on GitHub ↗

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