--resume should offer recently-modified sessions after unexpected shutdown

Resolved 💬 2 comments Opened Feb 16, 2026 by Cosmolalia Closed Feb 16, 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?

1 ## Problem
2
3 After an unexpected laptop shutdown (battery death), claude --r
esume
reports "no resumes available" even though the session JS
ONL file exists, was recently modified, and contains a complete
conversation history.
4
5 The session file (~/.claude/projects/<project>/<session-id>.jso
nl
) survived intact — 78MB, 5,621 entries, actively written to
minutes before the shutdown. The file-history snapshots, memory
files, and all associated data are present and valid. But the re
sume picker doesn't list it.
6
7 ## Expected Behavior
8
9 If a session JSONL exists and was recently modified, it should a
ppear in the resume list regardless of how the session ended. Cr
ash/power-loss recovery is arguably the primary use case for
--resume
— it's when you most need it.
10
11 ## Current Workaround
12
13 You can force resume with the explicit session ID:
14 ``
15 claude --resume <session-id>
16
`
17 But this requires the user to know the ID exists, find it in
~/
.claude/projects/, and identify which one is current — defeatin
g the purpose of the resume picker.
18
19 ## Environment
20
21 - Claude Code (CLI)
22 - Pop!_OS (Ubuntu-based) Linux
23 - Session ended via unexpected power loss (no clean exit signal)
24
25 ## Suggestion
26
27 The resume index should be rebuilt from the JSONL files on disk
if the index is stale or missing. A session should be considered
resumable if:
28 1. The JSONL file exists
29 2. It was modified within a reasonable window (e.g., last 7 days
)
30 3. It contains at least one user/assistant message pair
31
32 This would make
--resume` robust to crashes, OOM kills, power l
oss, and any other ungraceful termination.

What Should Happen?

--resume should offer recently-modified sessions after unexpected shutdown

Error Messages/Logs

Steps to Reproduce

  1. Start a Claude Code session in a project directory: `cd ~/my

+project && claude
4 +2. Have a conversation with multiple turns (enough to generate
+a substantial JSONL file in
~/.claude/projects/<project>/<sess
+ion-id>.jsonl)
5 +3. Kill the session ungracefully — power loss,
kill -9, OOM k
+ill, or laptop battery death (anything that doesn't trigger a c
+lean exit)
6 +4. Restart the machine
7 +5. Run
claude --resume from the same project directory
8 +6. Observe: "no resumes available" — even though the session JS
+ONL file exists and was recently modified
9
5 -The session file (
~/.claude/projects/<project>/<session-id>.js
-onl`) survived intact — 78MB, 5,621 entries, actively written t
-o minutes before the shutdown. The file-history snapshots, memo
-ry files, and all associated data are present and valid. But th
-e resume picker doesn't list it.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

claude code

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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