[BUG] `sessions-index.json` stops updating, causing session history to become stale/mixed

Resolved 💬 3 comments Opened Mar 19, 2026 by Lolog9 Closed Mar 22, 2026

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

  1. Use Claude Code VS Code extension heavily (5-10+ concurrent sessions over multiple days)
  2. Restart VS Code or let it idle
  3. Observe that sessions-index.json stops being updated (its mtime freezes)
  4. New sessions created after that point don't appear in sidebar
  5. 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.json last 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-title events 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

  1. sessions-index.json should be kept in sync with JSONL files on disk
  2. Custom session titles should be persisted in the JSONL file (as custom-title events) so they survive index rebuilds and extension restarts
  3. 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_

View original on GitHub ↗

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