How to restore a Claude Code session

Four different commands answer to the word restore, and picking the wrong one is why this feels harder than it is. Here is the map.

The kitstarter robot lifting a labeled session card back onto a shelf

claude --resume <session-id> restores a specific session by its id. If you do not have the id, run claude --resume with no arguments and pick it from the list. That is the answer for most people, and you can stop reading. The reason this question keeps getting asked anyway is that restore means four different things depending on what you lost, and three of them are not that command.

Four things people call restoring a session

Work out which of these you actually want before you type anything. They are not variations, they are different tools:

Restore a specific oneclaude --resume <session-id>, or /resume inside a session to get a picker. Use it when the session you want is not the last one. The id is a UUID; /resume <name> works if you named it.
Restore the last oneclaude --continue (or claude -c). No picker, no id: it reopens the most recent session for the directory you are in. This is what most people mean and it is one flag.
Restore your code/rewind, or press Esc twice. This is the checkpoint menu, and it is a different feature: it walks the conversation and your code back to an earlier point in the session you are already in. If what you lost is a file the agent overwrote, this is the one you want, not --resume.
Restore your contextyou cannot. If you ran /compact, the conversation was replaced with a summary and you stay in the same session. The full text is still in the file on disk, but the agent's working memory of it is not coming back.
Same word, four tools. Most "how do I restore my session" questions are really the second or the third row.

Restoring by id, step by step

When you do want a specific old session back:

  1. Find it. Run claude --resume with no arguments. The picker lists past sessions for the current directory with their summary, time since last active, message count, and git branch. Not there? Press Ctrl+W to search every worktree of this repo, or Ctrl+A to search every project on the machine.
  2. Restore it. Pick it in the picker, or pass the id directly with claude --resume <session-id> if you already have it. From inside a session, /resume does the same without dropping to a shell.
  3. Fork it if you are about to experiment. claude --resume <session-id> --fork-session reopens it under a new session id and leaves the original untouched. Restore a good session, take it somewhere bad, and without the fork you have overwritten the thing you restored.
  4. Check the directory if it is not there. The picker is scoped to where you launched. A missing session is usually a session that belongs to a different folder, not a deleted one.

The one case where nothing brings it back

cleanupPeriodDays deletes session files older than its threshold, it defaults to 30 days, and it runs the sweep at startup. There is no undo and no warning. If you are hunting for a session from two months ago, it is not hiding behind the wrong flag, it is gone.

Worth being clear about what does not delete a session, because people assume the worst: /clear does not. It empties your current context, but the transcript is saved and stays resumable. Neither does closing the terminal, crashing, or starting a new session. Retention is the only thing that removes history, and you can change it in settings.json today for free.

The kitstarter robot reading an unfolded map while a tangled ribbon lies discarded on the ground behind it
Recovering the thread is the fallback. Keeping the map is the plan.

Restoring a session is the fallback, not the plan

Step back and notice what all four rows have in common. Every one of them is you trying to recover something that should not have been trapped in a conversation in the first place. The reason losing a session hurts is not the messages. It is that the plan, the decisions, and the reason you ruled out the other approach were only ever recorded in the messages.

So the kit does not keep them there. A kitstarter project has a .kitstarter/ folder holding journey.json (the roadmap, the step you are on, the decisions), events.jsonl (an append-only feed of what the engine did), and last-recap.txt (the receipts card the SessionEnd hook writes when a session actually earned one). None of it lives in the transcript, so none of it depends on restoring the transcript. Lose the session and you lose the wording. You still open the project and get a progress bar, the current step, and a Last time: line.

Use `--resume` for a specific session, `-c` for the last one, `/rewind` for your code, and stop needing any of them for the part that actually matters. That is what kitstarter is for. Worth reading next: how to list every session when you cannot remember which one it was, and where your conversation history is kept on disk.

Common questions

How do I restore a Claude Code session? Run claude --resume <session-id> to restore a specific session, or claude --resume with no arguments to pick one from a list of past sessions in the current directory. Inside a session, /resume opens the same picker without dropping to a shell.

What is the difference between restore, continue, and rewind? claude --resume restores a chosen past session. claude --continue reopens the most recent session for the current directory with no picker. /rewind, or pressing Esc twice, is a different feature entirely: it walks the conversation and your code back to an earlier checkpoint within the session you are already in.

Can I restore a session without overwriting it? Yes. Add --fork-session, as in claude --resume <session-id> --fork-session. It reopens the conversation under a new session id and leaves the original untouched, which is what you want before trying a risky direction from a session you like.

Can I get back a session that is gone from the picker? Only if it is in a different directory: press Ctrl+A in the picker to search every project, or Ctrl+W for every worktree of the repo. If it is older than cleanupPeriodDays, which defaults to 30 days, Claude Code deleted the file at startup and there is no undo.

Stop depending on the transcript

kitstarter keeps the roadmap, the decisions, and the receipts in plain text next to your code, so a lost session costs you the wording and nothing else. For Claude Code, Codex, and Antigravity.

Get the kit · $20 $29Read the docs