Left sidebar session history goes stale / sessions disappear (sessions-index.json stops being updated)
Description
The Claude Code desktop app's left sidebar session history is backed by a sessions-index.json (and a sessions-index.preview.json mirror) file per project under ~/.claude/projects/<project-folder>/. On my machine, this index periodically stops being appended to, even though new sessions keep being created and their full transcripts (<sessionId>.jsonl) are written correctly to the same folder. The result: sessions vanish from the left sidebar, even though the underlying data is intact.
Steps to reproduce
- Use Claude Code desktop normally across multiple sessions in the same project over several days.
- Periodically compare the session count in
sessions-index.jsonagainst the number of<sessionId>.jsonlfiles present in the same folder. - At some point the index stops gaining new entries while new
.jsonltranscript files continue to appear.
Observed behavior
- The index file's
updatedAt/mtime freezes at some point in the past. - New sessions (confirmed across multiple days, and surviving at least one full app restart + version upgrade) are written to disk as complete
.jsonltranscripts but never get appended to the index. - The sidebar only shows sessions through the last time the index was updated; everything after that is invisible, though the data is recoverable directly from the
.jsonlfiles. - Manually rebuilding the index from the
.jsonlfiles is a working stopgap, but the underlying append process doesn't resume afterward.
Expected behavior
The session index should stay in sync with the transcripts actually being written, so the sidebar reflects all real sessions, including across app restarts and upgrades.
Environment
OS: Windows 11 Pro / Claude Code Desktop app
Additional notes
Recurred at least twice over about a week of normal use, including after an app upgrade, so it does not appear to be a one-time corruption.