Claude Code session history disappeared? Try claude --resume
Claude Code session history disappeared after restarting VS Code or Claude Desktop? Your files are usually still on disk. Resume them with claude --resume.
GuideUpdated 6 min read
On this page
You reopened VS Code, reloaded the window, or signed back in to Claude Desktop, and your earlier Claude Code conversations are gone from Session History. Public bug reports describe this in three forms: an empty list under Local > Session History in VS Code, "all my prior sessions were deleted" after a window reload, and zero sessions in the Desktop app after logout and login. In those reports the files were still on disk, and the /desktop suggestion did nothing for at least one person.
Why the list can be empty while the sessions still exist
No one has published a confirmed root cause, so treat these as the likely explanations rather than settled facts.
- The list in the app is a separate view from the stored sessions. The bug reports show the files present while the VS Code or Desktop list was empty. That points at the list, not the data.
- The CLI and Claude Desktop appear to keep separate histories. A session started in one is not guaranteed to show in the other.
- Sessions are tied to a folder. Anthropic's support FAQ says sessions are stored locally per project directory. Run the CLI from a different folder and you will see a different (maybe empty) list.
- A reload or sign-out resets the app's own state. The reports tie the empty list to window reloads, restarts and logout/login. Why that happens is not documented, as far as we can tell.
- You cleared the session.
/clearwipes the conversation history, and it cannot be undone. That is a different problem from the ones above, and the steps below won't recover it.
| Where you started the session | Where to look first | Fallback |
|---|---|---|
| Terminal (CLI) | claude --resume in the project folder | claude --continue |
| VS Code extension | Session History in VS Code | claude --resume in the same folder |
| Claude Desktop | Desktop's own session list | claude --resume, with no guarantee it shows up |
Step-by-step fixes
1. Confirm the files are still there
Run this in Terminal. It only lists the contents of the .claude folder in your home folder and changes nothing.
ls -a ~/.claudeIf the folder exists and has contents, the problem is most likely the app's list. If it is missing or empty, skip to "If nothing works".
2. Resume from the CLI in the right folder
Open Terminal.
Go to the project folder you were working in:
bash cd ~/path/to/your/projectRun:
bash claude --resumeAnthropic's FAQ says
claude --resumeopens a list to pick from.Pick the session you want and press Return.
If you only want the last conversation, claude --continue resumes the most recent one. Inside a running session, /resume reopens a previous session; /continue is an alias.
3. Try the other place the session might live
Because the histories are reported to be separate, check both. If you started in Claude Desktop, look at Desktop's list again after it finishes loading, then try the CLI. If you started in the CLI, don't expect the Desktop list to show it.
4. Check the installed version
Run claude --version and claude --help. Flags and slash commands can differ between releases, and updating Claude Code is a reasonable step if your version is old. If claude isn't found at all, see How to install Claude Code on a Mac.
5. Export what you can in the future
Anthropic's FAQ notes that /export writes the whole conversation to a file. For a session that matters, export it before you close the window. It is a plain backup that doesn't depend on any session list.
Checklist before you try again
ls -a ~/.claudeshows contents.- You are in the same project folder as the original session.
- You tried
claude --resumeandclaude --continue. - You looked in the app where you started the session (CLI, VS Code or Desktop).
- You did not run
/clearon the session you are looking for.
Avoid depending on an extension's session list: Sledbot
We make Sledbot, a Mac app (macOS 14 or later) that runs coding agents in real terminals. It covers only part of this problem. It does not repair the list in VS Code or Claude Desktop, and it does not import sessions you started elsewhere.
What it does for agents you start inside it:
- Agents run in a background engine called Sled Core, so quitting the Sledbot window does not stop them. Reopen the app and it reattaches to the live screens.
- Agent terminals are kept by default. If an agent's program is gone after a crash or reboot, the next Sled Core start runs that agent's resume command in the same folder. For Claude Code that is
claude --resume <id>, and Sledbot reports "Resumed Claude Code session". - With no session id, it resumes the latest session in that folder, but only if no other kept terminal of that agent shares the folder. Otherwise, or if the resume fails, it opens a shell there.
- On a stopped agent, Restart brings it back with its conversation where possible. From a terminal,
sled resumedoes the same.
Sledbot calls Claude Code's own resume command, so it can only resume what Claude Code still has stored. To turn automatic resume off, set SLED_NO_RESUME=1. See Start an agent on a task and Keep Claude Code running after you close the terminal. Sledbot is part of MacSuite and runs free for 7 days; after the trial, starting or restarting agents needs a license.
If nothing works
If ~/.claude is missing or empty and claude --resume finds nothing in the right folder, the data may really be gone. Report it to Anthropic through its support channels or the Claude Code issue tracker, and include:
- Your Claude Code version (
claude --version). - Whether you used the CLI, VS Code or Claude Desktop.
- What you did just before the sessions vanished (restart, window reload, logout and login).
- The output of
ls -a ~/.claude.
Anthropic's support FAQ also covers getting a previous session back.
Subject: Claude Code sessions missing after restart
Claude Code version: (output of claude --version)
Where I used it: VS Code extension / Claude Desktop / CLI (pick one)
What happened: Session History was empty after (window reload / restart / sign-out and sign-in).
Checked: ls -a ~/.claude shows (contents / nothing).
Tried: claude --resume and claude --continue from the original project folder.
Result: (what the list showed)
Expected: my earlier sessions listed and resumable.Common questions
Does claude --resume show sessions from VS Code or Claude Desktop?
Not reliably. Reports say the CLI and Desktop keep separate histories, and the VS Code list is another view again. Try it from the project folder, but don't count on it for Desktop sessions.
What is the difference between --resume and --continue?
--resume opens a list so you choose a session. --continue jumps straight to the most recent one.
Will Sledbot bring back sessions I already lost track of?
No. It only auto-resumes agents you ran in Sledbot, using Claude Code's own resume command. For older sessions, use the CLI steps above.
Is /clear the same as losing the list?
No. /clear wipes the conversation history, and Anthropic's guidance says it can't be undone. An empty session list after a restart is a different problem, and the files are often still there.