[BUG] Session custom names reset to firstPrompt after Developer: Reload Window
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
- Open Claude Code in VS Code
- Start a new session and send a message
- Rename the session to a custom name (e.g. "My Custom Name")
- Confirm the custom name appears in the session list
- Run
Developer: Reload Window(Ctrl+Shift+P → Reload Window) - 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
.jsonlfiles as{"type":"custom-title","sessionId":"...","customTitle":"..."}entries - The extension code does parse
customTitlefrom JSONL during full session loading:eV(x,"customTitle")||eV(x,"lastPrompt")||eV(x,"summary")||D - The
sessions-index.jsoncache file does NOT includecustomTitle— its schema only has:sessionId,fullPath,fileMtime,firstPrompt,messageCount,created,modified,gitBranch,projectPath,isSidechain - Suggested fix: Persist
customTitleinsessions-index.jsonentries and update it whenrenameSession()is called
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗