sessions-index.json stops updating, custom titles not persisted to JSONL
Bug: sessions-index.json stops updating, causing session history to become stale/mixed
Environment
- VS Code: 1.112.0 (arm64, macOS Darwin 25.3.0, Apple M2)
- Claude Code extension: v2.1.79
- 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 regularly → titles are lost on extension restart/index rebuild
Additional issue: custom titles stored only in index, not in JSONL
Users DO rename sessions via the sidebar UI, and it works in real-time. However:
- The
custom-titleevent is never written to the JSONL session file - Titles are stored only in
sessions-index.json - When the index goes stale (see main bug above) or needs to be rebuilt, all custom titles are permanently and irrecoverably lost
- Confirmed: 0/75 JSONL files contain any
custom-titleevent, despite the user renaming sessions regularly (e.g., prefixing dead sessions with "MORT -") - This makes the main bug significantly worse — not only do sessions disappear from the sidebar, but when the index is rebuilt, all organizational work (renaming) is destroyed
Expected behavior
sessions-index.jsonshould be kept in sync with JSONL files on disk at all times- 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 (detect new/missing JSONL files, rebuild stale entries)
Workaround
Manual rebuild of sessions-index.json by parsing all JSONL files. Titles are permanently lost and must be re-entered.
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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗