claude --resume doesn't show all sessions and loses conversation data after restart

Resolved 💬 8 comments Opened Feb 18, 2026 by J4Rv15-AI Closed Mar 27, 2026

Description

claude --resume fails to reliably track and display sessions. Specific issues:

1. Sessions not appearing in --resume list

When running claude --resume from the project directory (~/wifi_arsenal), active sessions do not appear in the browse list. The current session (77f81998) is not shown even though its JSONL file exists in the correct project folder (~/.claude/projects/-home-ov3rr1d3-wifi-arsenal/).

2. Conversation data lost after restart

  • Started a session, submitted a plan, carried out full implementation (multiple file edits, hours of work)
  • Restarted Claude
  • Ran claude --resume <session-id>
  • Session loaded but only the original plan message was present — all implementation work, discussion, and tool calls were gone
  • The JSONL file exists but the intermediate conversation was never persisted to disk

3. sessions-index.json gets stale

  • The sessions-index.json file only had 9 entries from January despite 40+ sessions existing as JSONL files in the directory
  • New sessions created in February were never added to the index
  • Claude Code does not appear to maintain this file when sessions are created or updated

4. Project directory mismatch

  • Sessions started from ~ (home directory) get stored in ~/.claude/projects/-home-ov3rr1d3/ instead of ~/.claude/projects/-home-ov3rr1d3-wifi-arsenal/
  • --resume from the project directory cannot find sessions started from a parent directory, even if the work was done in the project
  • No warning is shown when starting Claude from the wrong directory

Environment

  • Claude Code version: 2.1.45
  • OS: Kali Linux 6.12.38+kali-amd64
  • Shell: zsh
  • Binary location: ~/.local/share/claude/versions/2.1.45 (compiled ELF binary, not JS)

Expected Behavior

  • --resume should show ALL sessions for the project
  • Conversation data should be flushed to the JSONL file in real-time, not just kept in memory
  • sessions-index.json should be kept up to date automatically
  • Sessions should be associated with the project being worked on, regardless of which parent directory Claude was started from

Steps to Reproduce

  1. Start Claude Code in a project directory
  2. Have a long conversation with multiple tool calls and file edits
  3. Kill/restart Claude
  4. Run claude --resume — the session may not appear, or if it does, conversation content after the first message may be missing

View original on GitHub ↗

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