How to Recover a Lost Claude Code Session When --continue Fails A developer documented how to recover a lost Claude Code session when the `claude --continue` flag fails to find the previous conversation. Because Claude Code stores sessions per project folder under `~/.claude/projects/`, `--continue` only opens the most recent session in the current directory; the developer recommends grepping the `.jsonl` transcript files for a distinctive term, then using the resulting file path to extract the folder and session ID and resume with `claude --resume `. I ran claude --continue to pick up where I left off, and it didn't find my previous session. Here's why that happens and how I got it back. Claude Code saves sessions per folder, under ~/.claude/projects/ . Each project gets a subfolder named after the full path where you launched claude , with slashes and underscores turned into dashes. --continue only opens the most recent session in your current folder. So it picks the wrong one if: ls ~/.claude/projects/ Look for folders that match your project path. In my case there were two candidates: one for the parent claude skills folder and one for the anki-skill subfolder. Each session is a .jsonl file, so you can grep for something distinctive you know came up in the conversation, like a config key, filename, or error message: ls -lt $ grep -l "webCorsOriginList" ~/.claude/projects/-Users-yourname-path-to-project / .jsonl grep -l lists the files that contain the word, and ls -lt sorts them newest first. My top result was: ~/.claude/projects/-Users-yourname-...-anki-skill/aaa6d99e-356e-4148-982e-e6e7a3133939.jsonl The folder name tells you where the session was started, and the filename minus .jsonl is the session ID. cd /path/to/anki-skill claude --resume aaa6d99e-356e-4148-982e-e6e7a3133939 Run this from the folder the session belongs to, or Claude Code won't find it. It's fine to resume a session while a different session is open in another terminal tab. Just don't resume the same session in two tabs at once, since both would write to the same transcript. Also avoid having two sessions edit the same files at the same time. Skip the guesswork and go straight to Step 2: grep for a word unique to the conversation you want. The file path gives you the folder and the session ID, and claude --resume