[BUG] sessions-index.json stops being updated after v2.1.31 — new sessions invisible to /resume
Resolved 💬 11 comments Opened Feb 6, 2026 by Sajakhtar Closed Feb 17, 2026
Bug Description
After updating to Claude Code v2.1.31, new sessions are no longer being registered in sessions-index.json. Session .jsonl files are still being written to disk, but the index that /resume reads from stopped being updated. This makes all sessions created after the update invisible to /resume.
Reproduction Steps
- Update to Claude Code v2.1.31+ (confirmed on 2.1.31 through 2.1.34)
- Start a new session, do some work, exit
- Run
claudeand use/resumeto find the session - Session does not appear in the list
Diagnosis
# Count .jsonl session files vs indexed entries
PROJ_DIR=~/.claude/projects/<your-project-dir>
echo "JSONL files on disk: $(ls $PROJ_DIR/*.jsonl 2>/dev/null | wc -l)"
echo "Entries in index: $(python3 -c "import json; print(len(json.load(open('$PROJ_DIR/sessions-index.json'))['entries']))")"
echo "Index last modified: $(stat -f '%Sm' -t '%Y-%m-%d %H:%M' $PROJ_DIR/sessions-index.json)"
In my case:
- 98
.jsonlfiles on disk - 37 entries in
sessions-index.json - 6 real sessions created after Feb 4 are not indexed (the rest of the gap is agent sub-sessions, file-history snapshots, etc. that were never meant to be indexed)
- Index was last modified 2026-02-04 09:09 — the day v2.1.31 was installed
- The newest indexed session is from 2026-02-03
Workaround
If you know the session ID (from the .jsonl filename), you can still resume directly:
claude --resume <session-id>
But browsing/searching via /resume won't show any session created after the index stopped updating.
Environment
- Claude Code versions: 2.1.31, 2.1.32, 2.1.33, 2.1.34 (all affected)
- Last working version: Unknown, but index has entries up to 2026-02-03 (likely 2.1.30 or earlier)
- Platform: macOS Darwin 25.2.0
- Node: v22.22.0
Related Issues
- #22030 — similar symptom (stale
sessions-index.json) but different root cause (metadata drift vs index not being written at all) - #14157 — similar pattern of
/resumeregression after version update - #18311 — sessions exist on disk but not discoverable
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗