[BUG] `sessions-index.json` stops updating, causing session history to become stale/mixed
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment
- VS Code: 1.112.0 (arm64, macOS Darwin 25.3.0, Apple M2)
- Claude Code extension: latest (as of 2026-03-19)
- OS: macOS Sequoia
Description
sessions-index.json stops being updated by the extension after some point, causing the sidebar session list to become stale. New sessions are created on disk (JSONL files) but never added to the index. Existing sessions show outdated timestamps and titles.
This has happened 4 times in 10 days for the same project:
- March 8, March 10, March 11, March 19
Reproduction
- Use Claude Code VS Code extension heavily (5-10+ concurrent sessions over multiple days)
- Restart VS Code or let it idle
- Observe that
sessions-index.jsonstops being updated (its mtime freezes) - New sessions created after that point don't appear in sidebar
- Existing sessions show stale "modified" timestamps (all showing same time)
Evidence
| Date | Index entries | JSONL on disk | Gap |
|------|--------------|---------------|-----|
| Mar 10 | 26 | ~40 | 14 missing |
| Mar 11 | 93 | ~60 | stale timestamps |
| Mar 19 | 93 (unchanged since Mar 11!) | 75 | 8 days stale |
sessions-index.jsonlast modified: March 11 22:45 — not updated for 8 days despite daily usage- 75 JSONL session files exist on disk, all with correct data
- 0 out of 75 sessions have
custom-titleevents persisted in JSONL files, despite user renaming sessions via the UI every time → titles are lost on extension restart
Additional issue: custom titles not persisted
When renaming a session in the sidebar, the custom-title event is never written to the JSONL file. Titles appear to be stored only in memory or in the index. When the index goes stale or is rebuilt, all custom titles are permanently lost.
Workaround
Manual rebuild of sessions-index.json by parsing all JSONL files. Backup + rebuild script available on request.
Impact
High — Users lose access to their session history, can't find previous work, custom titles are permanently lost. Particularly painful for power users with many concurrent sessions.
What Should Happen?
Expected behavior
sessions-index.jsonshould be kept in sync with JSONL files on disk- Custom session titles should be persisted in the JSONL file (as
custom-titleevents) so they survive index rebuilds and extension restarts - On extension startup, the index should be reconciled with actual files on disk
Error Messages/Logs
Steps to Reproduce
/
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
- Claude Code extension: v2.1.79
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗