No conversation found with session ID: what Claude Code is telling you
the file for that id is not where claude --resume looks, and there are five ways that happens
The full message is one line:
$ claude --resume 7b1d2c3e-1111-4222-8333-444455556666 No conversation found with session ID: 7b1d2c3e-1111-4222-8333-444455556666
Claude Code keeps each conversation as one file, <session-id>.jsonl, in a directory per project under ~/.claude/projects. Resuming by id means finding that file. The error says it found none, or found one with no conversation in it. It never means the session is stored somewhere Claude Code forgot about: there is no database behind the list, only those files.
Everything below was reproduced on Claude Code 2.1.295 with a throwaway CLAUDE_CONFIG_DIR.
What it is not: the wrong directory
The usual advice is to cd into the project the session ran in. For a resume by id that does not matter on current versions: the lookup searches every project directory under ~/.claude/projects, and a session started in one repository resumed by id from another. The interactive picker, claude --resume with no id, is different: it lists the sessions of the directory you are in, so a session from a renamed or moved project is missing from the list while its id still works.
The five causes
- The file was swept.
cleanupPeriodDaysin~/.claude/settings.jsondefaults to 30 days, and Claude Code deletes transcripts older than that without saying so. An id from last month's notes is the most common way to hit this error. How the sweep works. - The file was deleted. By hand, by
claude project purge, or by a cleanup script that removed old.jsonlfiles. - A different config directory. With
CLAUDE_CONFIG_DIRset, Claude Code reads$CLAUDE_CONFIG_DIR/projectsand nothing under~/.claude. A shell, a container or an IDE task that sets it differently from the one that wrote the session gets this error for every id from the other tree. - The session was headless. Sessions written by SDK-driven and headless clients can land in
<config>/transcripts/instead ofprojects/. A file there is not found by--resume; in the test it gave exactly this message until it was moved underprojects/. - The file holds no conversation. An empty
.jsonl, or one with only a summary line and no messages, gives the same error even though the file is right there.
A near miss prints something else: with -p, a short id prefix is refused with --resume requires a valid session ID or session title, because claude -p --resume takes a full UUID or a session title, not a prefix.
A program that drives Claude Code, such as the Agent SDK or an editor extension, runs the same CLI underneath, so the same message and the same causes apply when it surfaces as part of a longer error.
Find the file
# is it anywhere under the default tree, transcripts/ included
find ~/.claude -name '<session-id>.jsonl' -ls
# which config directory this shell uses
echo "${CLAUDE_CONFIG_DIR:-~/.claude}"
# the id mentioned inside another file, e.g. a subagent or a renamed copy
grep -rl '<session-id>' ~/.claude 2>/dev/null
If find lists a file with a size of zero, or a few hundred bytes, it is cause 5 and there is nothing to resume. If it is under transcripts/, move it into any project directory and resume by id:
mv ~/.claude/transcripts/<session-id>.jsonl ~/.claude/projects/<project-dir>/ claude --resume <session-id>
If it is under another config directory, run claude --resume with that CLAUDE_CONFIG_DIR, or copy the file across. If find prints nothing, the file is gone: a Time Machine or other snapshot taken before the sweep is the only copy Claude Code itself can use.
Keep it from happening again
Raise the retention so the sweep stops taking sessions you still reference:
# ~/.claude/settings.json
{ "cleanupPeriodDays": 3650 }
That covers cause 1. It does nothing for a session already gone, and nothing for the others.
When the file is already gone
An index built while the file existed is the one copy that survives the sweep. deja reads every Claude Code transcript on the machine, and a session it has read stays in its index after Claude Code deletes the file. Find it by what it was about, then write it back where claude --resume looks:
deja "the migration that broke the staging build" # the hit carries the session id deja show <id> # read the conversation deja kept deja resume <id> --write-back # put it back in ~/.claude/projects, print the resume command
The written file holds the conversation, user and assistant turns; tool calls and their output stay in deja. Bare deja opens a screen whose Deleted tab lists every session whose agent deleted it and deja still holds, and R on one does the same write-back. None of this helps for a session deja never read, so it has to be in place before the sweep:
curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh deja install --auto
The first index reads the history already on disk, so it covers the sessions you have now. Indexing and search run locally.
Recover a deleted session · Deleting Claude Code sessions · Resuming yesterday's session
Found this useful? Star deja-vu on GitHub.