bug: Sessions missing from claude --resume list
Bug Description
Sessions are missing from the claude --resume session list. When a session ends, Claude prints a resume command like:
Resume this session with:
claude --resume "session title here"
But when you run claude --resume, the session does not appear in the list at all — it is simply absent, not a search issue.
Steps to Reproduce
- Start a Claude Code session and do some work
- Exit the session — Claude prints
Resume this session with: claude --resume "..." - Run
claude --resume - The session that just ended is not in the list
- Searching for the session title also returns "No sessions match"
Expected Behavior
All sessions (including recently closed ones) should appear in the claude --resume list.
Actual Behavior
Sessions are randomly missing from the list. The full session list shows a limited number of sessions (e.g. "1 of 23") and recently closed sessions or sessions from certain projects/contexts are not included — even immediately after they close.
This appears to affect both old and new sessions across different projects.
Environment
- Claude Code CLI (latest)
- macOS
- Reproducible across multiple sessions and projects
Screenshots
(Screenshots to be attached — showing a session that just ended with a resume command, then the resume list missing that session, and additional examples of sessions not found)
8 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
<img width="657" height="289" alt="Image" src="https://github.com/user-attachments/assets/9d1f9d53-bdff-4ca3-a318-647c76d9e897" />
<img width="861" height="757" alt="Image" src="https://github.com/user-attachments/assets/c0b402dc-f1d9-4b76-ba85-c00af056731a" />
<img width="896" height="1237" alt="Image" src="https://github.com/user-attachments/assets/93e488f2-6d7b-45b4-9b33-fb7810e9147e" />
<img width="2524" height="952" alt="Image" src="https://github.com/user-attachments/assets/0d9087cc-49b3-4def-a2dc-4811e8c8e9d5" />
Ran into this less than an hour after creating a session. Was given a resume ID (
3184712f-12a7-4759-862a-d3b862a9d2d2) via the /resume link, but running/resume 3184712f-12a7-4759-862a-d3b862a9d2d2returned "Session was not found." The session also did not appear in the /resume picker list. This was on macOS, same machine, same working directory, within ~1 hour of the original session.The picker just isn't reading them correctly. The underlying JSONL is intact; you're not losing work.
Workaround that's gotten me unstuck:
Pass the session ID directly — you don't need to go through the picker:
If you don't remember the ID but remember what you were working on, I built a small open-source CLI called ccfind (claude-grep) specifically for this — it does full-text search across all your ~/.claude/projects/ JSONL files, bypassing the broken index entirely. You search by anything you remember from the conversation (function name, error message, question you asked), and it gives you a one-keypress resume. Sharing it here since it was born from this exact frustration — full disclosure, I'm the maker.
The root cause here seems to be the sessions index not updating reliably (related to #26123). Would be good to get a fix upstream, but at least the data isn't gone.
So, I've had this issue as well and I've found a potential cause (or Claude found it ;))
In my case, I started the session via
--remote-control. That caused the session to get"entrypoint":"sdk-cli".It seems that the picker is ignoring all sessions that have that entrypoint entry. Modifying that to
"entrypoint": "cli"caused the sessions to get actually listed.Additional reproduction case: in-session
/resumecauses permanent session data loss (Windows)Environment
Steps to Reproduce
/resumeto switch to a different session (Session B).jsonlfile is never written to disk — it is permanently lostEvidence
Inspecting
~/.claude/projects/<project>/:.jsonlfiles exist, but none correspond to sessions from today (2026-06-23) or yesterday (2026-06-22).jsonlfiles were never persisted.jsonlfiles themselves do not exist on disk/resume→ Session A vanishes entirelyKey difference from the original report
This is not just "session missing from the picker list" — the session data is permanently destroyed. The
.jsonlfile is never flushed/written when switching sessions via in-session/resume. This means:claude --resume <session-id>also cannot recover it (there is nothing to resume from)Workaround
Avoid using
/resumewithin an active session. Instead:/exitor Ctrl+C)claude --resumeorclaude -cThis ensures the current session's
.jsonlis properly flushed before switching.Correction & updated root cause (follow-up to my comment above)
After further investigation, my earlier comment was incorrect in attributing the data loss to in-session
/resume. The actual root cause is different and more fundamental:Actual root cause: sessions started inside tmux never create
.jsonlfilesAny Claude Code session started inside a tmux (psmux) session fails to persist its transcript — the
.jsonlfile in~/.claude/projects/<project>/is never created. This is independent of/resume.Evidence
| Launch context |
--teammate-mode|.jsonlcreated ||---|---|---|
| Normal terminal (no tmux) | (none) | ✅ Yes |
| Inside tmux |
tmux(auto-injected) | ❌ No || Inside tmux |
in-process(explicit CLI flag) | ❌ No || Inside tmux, with
$env:TMUXcleared |tmux(still auto-injected) | ❌ No |Key findings from
--debug-fileoutput:[TeammateModeSnapshot] Captured from CLI override: tmux— Claude Code auto-detects tmux and injects--teammate-mode tmuxinto its own command line, even when theTMUXenv var is unsetGet-CimInstance Win32_Processshowsclaude.exe --teammate-mode tmuxfor tmux sessions vs bareclaude.exefor working sessions[concurrentSessions] updatePidFile failed: ENOENT— repeated PID file write failures in~/.claude/sessions/~/.claude/session-env/<uuid>/directories ARE created (session infrastructure works), but~/.claude/projects/<project>/<uuid>.jsonlfiles are notEnvironment
teammateMode: "auto"in settings.json (changing to"in-process"had no effect since the CLI auto-detection overrides it)Impact
Since I primarily use Claude Code inside tmux, no session transcripts have been saved since 2026-06-16 — only pre-existing sessions that were resumed via
--continuecontinued to be written to. All new sessions silently lost their data.This is likely related to the teammate/team feature's tmux detection conflicting with users who run their primary Claude session inside tmux.
Adding a data point that reproduces on a current version (2.1.210), which might narrow this down.
Repro: I have several sessions whose
.jsonltranscripts were initiated via the internal enqueue/dequeue queue mechanism (the file starts with{"type":"queue-operation","operation":"enqueue",...}/"dequeue"records before the first realuserturn), rather than a normally typed-and-run command. For these sessions:/resume <session-id>— tried both an 8-char prefix and the full UUID — reports "Session was not found.".jsonltranscript is fully intact and readable at~/.claude/projects/<project>/<session-id>.jsonl.~/.claude/history.jsonl(the{sessionId, project, display, timestamp}per-command index) by exact match — this may or may not be the actual file/resume's ID-lookup path consults; I don't have source access to confirm which index is authoritative here vs.sessions-index.json.Proof it's a lookup bug, not data loss:
This succeeds via the same
--resumemechanism, on the identical session ID that/resumereports as not found — so the transcript and its data are completely fine; the bug is purely in discovery/lookup.Hypothesis: sessions whose first turn arrives through the internal queue path (rather than a direct interactive prompt) may never get written into whatever index
/resume's ID-based lookup checks, even when the.jsonlitself is written normally afterward.Workaround for anyone hitting this: don't trust
/resume's "not found" as proof of data loss — verify first withclaude --resume <full-id> -p "test"from a shell.