Claude Code session management: resume and restore

Claude Code saves every conversation as you work and reopens it by recency, name, session ID, branch, or pull request. Four different mechanisms hide behind the word "restore". This guide separates conversation resume, transcript history, session forks, and file restoration so you stop guessing at flags.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

claude --continue reopens the most recent conversation in the current directory. claude --resume opens the picker; claude --resume <name-or-id> jumps straight to one session; /resume does the same from inside Claude Code. Fork when you want a new session ID off an existing context. When you need files back rather than conversation, that is /rewind checkpoints or Git, not resume.

What you need to know
  • claude --continue reopens the most recent conversation for the current working directory.
  • claude --resume opens the interactive picker. claude --resume <name-or-id> goes straight to one session.
  • /resume switches sessions without leaving the interface.
  • Transcripts are plaintext JSONL at ~/.claude/projects/<project>/<session-id>.jsonl, deleted after 30 days by default.
  • --fork-session mints a new session ID from --continue or --resume.
  • Resume never touches your working tree. Files come back through /rewind checkpoints or Git.

Resume the right Claude Code session

Claude Code saves the session as you work. Which resume command is fastest depends on what you mean by "the session": the latest one here, one you want to pick from a list, or one exact name or ID you already know.

Verified Claude Code resume paths

GoalCommandSelection behavior
Resume the latest session in this directoryclaude --continueSelects the most recent conversation for the current working directory
Open the session pickerclaude --resumeShows matching sessions and lets you search or preview
Resume by name or session IDclaude --resume <name-or-id>Targets the supplied identifier
Switch while Claude Code is open/resumeOpens the picker inside the current interactive session
Resume a session linked to a pull requestclaude --from-pr <number>Opens the picker filtered to sessions associated with that pull request
Common resume commands
claude --continue
claude --resume
claude --resume auth-refactor
claude --resume 550e8400-e29b-41d4-a716-446655440000

The short forms are -c and -r. Write the long forms in team documentation, where the intent has to survive someone reading it cold. The argument to --resume takes either a full session ID or a name you assigned earlier.

Use the /resume picker to list and preview sessions

There is no separate list command. The picker is the session list. Run claude --resume before startup or /resume from inside a session. It shows the current worktree by default, one row per session carrying the name or generated title, a summary or first prompt, time since activity, the Git branch, and the file size.

Type to search. Space previews a transcript, Ctrl+R renames the highlighted session, Enter resumes it. The scope shortcuts widen or narrow the results so you never have to remember a filesystem path.

Picker keyResult
Ctrl+WToggle between the current worktree and all worktrees
Ctrl+AShow sessions from all projects
Ctrl+BFilter to sessions on the current Git branch
SpacePreview the selected session
Ctrl+RRename the selected session
EnterResume the selected session

The picker covers saved CLI sessions and nothing else. The desktop app, Claude Code on the web, and the VS Code extension each keep their own history. Programmatic print-mode sessions never show up here either, though you can still resume one directly once you know its session ID.

Name sessions and find a session ID

Nobody recognizes a UUID. Name the session with -n at launch or /rename later, and the name works everywhere the ID does, including as the argument to --resume.

Name and resume a session
claude -n auth-refactor

# Inside Claude Code
/rename auth-refactor

# From the shell later
claude --resume auth-refactor

Every transcript filename is its session ID, followed by .jsonl. Headless runs give you the ID directly instead: --output-format json puts a session_id field in the response envelope.

List transcript paths and request a JSON response
find ~/.claude/projects -type f -name "*.jsonl" -print
claude -p "Reply with OK" --output-format json

With several sessions active, modification time is a bad way to pick one. Confirm identity through the picker preview, the name you assigned, or the session_id from a response. Once you have matched a filename to the right conversation, that filename is stable enough to pass straight back to claude --resume.

Start fresh without losing the old transcript

Exit and run claude in the target directory for a genuinely new session. If all you want is an empty context without leaving the interface, /clear does that. Either way the earlier conversation stays saved and reopens from history, so "start fresh" never means "lose the old one".

Start Claude Code in a project
cd /path/to/project
claude

Reach for /compact when you want less context but still need a summary of what happened. Text after the command tells Claude what the summary must keep. /context shows where the window is actually going. All of these manage context pressure. None of them replaces naming a session you will want to find next week.

ActionWhat happens to contextCan you reopen the earlier conversation?
Start claude againBegins a new interactive sessionYes, through resume history
/clearClears the active contextYes, the previous conversation stays saved
/compactReplaces older detail with a summaryThe same session continues
/resumeSwitches to a saved sessionYes, by selecting another session later

View session history and local JSONL transcripts

Ctrl+O toggles verbose transcript display in an active session. Inside the fullscreen viewer, v opens the transcript in your $VISUAL or $EDITOR and [ dumps it to terminal scrollback. In the /resume picker, Space previews a saved conversation before you commit to opening it.

On disk, transcripts live at ~/.claude/projects/<project>/<session-id>.jsonl. Every line is one JSON object holding a message or another event. Set CLAUDE_CONFIG_DIR and the whole projects directory moves under that root instead of ~/.claude.

Default transcript layout
~/.claude/projects/
└── <project>/
    └── <session-id>.jsonl

These files are plaintext, protected by operating-system file permissions and nothing else. Tool inputs and outputs land in the transcript, including any secret Claude read or any credential a command printed. Lock down filesystem access and keep credentials out of prompts and command output in the first place.

Claude Code deletes transcripts older than 30 days at startup. cleanupPeriodDays changes the window, the minimum is 1 day, and 0 fails validation rather than disabling cleanup. Export anything you need to keep before its window closes, because nothing warns you on the way out.

Fork a session instead of interleaving it

A fork mints a new session ID and hands it the selected conversation as a starting point. Pair --fork-session with --continue or --resume. The original transcript stays where it was; every message from here goes to the new session.

Fork the latest or a named session
claude --continue --fork-session
claude --resume auth-refactor --fork-session

Inside a session, /branch branches the conversation at the current point and takes a descriptive name: /branch try-streaming-approach. This is a conversation branch. It is not a Git branch and not a worktree.

Fork before you open the same session in two terminals. Resume one session ID in two places without forking and both processes append to the same transcript, interleaving messages into something neither of them can later make sense of.

Resume, fork, rewind, and restore are different

Resume restores conversation context, and only that. It does not put files back the way they were when the session stopped. Fork copies conversation history under a new session ID. /rewind opens Claude Code checkpoints, where you can roll back the conversation, the code changes, or both.

Choose the right restoration mechanism

NeedUseWhat it changes
Continue the same conversation--continue, --resume, or /resumeConversation context only
Explore a second conversational path--fork-session or /branchCreates a new session identity from prior context
Undo Claude edits from this session/rewindRestores checkpointed conversation and/or supported file edits
Restore arbitrary repository stateGit status, diff, restore, revert, or a new commitVersion-controlled files according to your explicit Git operation

Checkpoints track edits made through Claude Code's file-editing tools. They do not track what a Bash command did, what an external process wrote, what changed in a database, or what you edited by hand. Check Git status and external state before you treat a rewind as a complete rollback.

Continue a session across devices with clear identity

A handoff has to carry three things: the session identity, the repository or worktree identity, and the current live status. A copied session ID carries the first one. The receiving device still needs access to the host and the right working tree, and neither of those travels in a UUID.

To remove a session rather than reopen it, see deleting Claude Code sessions. Deleting a transcript is deliberately separate from clearing context or starting a new session, and conflating the three is how people lose work.

Questions people ask

Run claude --continue from the same working directory. The short form is claude -c. This selects the most recent conversation associated with that directory.

Run claude --resume <name-or-session-id>. Run claude --resume with no argument if you want the interactive picker instead.

/resume opens the saved-session picker from inside the interactive interface. You can search, preview, rename, and switch to another conversation without first exiting Claude Code.

By default, project transcripts are plaintext JSONL files under ~/.claude/projects/<project>/<session-id>.jsonl. A custom CLAUDE_CONFIG_DIR moves that configuration root.

Read the .jsonl filename under ~/.claude/projects, because the filename is the session ID. You can also identify the conversation in the resume picker, or pull session_id from a headless response produced with --output-format json.

Use claude --continue --fork-session or claude --resume <name-or-id> --fork-session. Inside a session, /branch creates a new conversation branch from the current point.

No. Resume restores the conversation. Use /rewind for supported Claude Code checkpoints or use Git and other system-specific recovery tools to restore files and external state.

The default cleanup period is 30 days. Configure cleanupPeriodDays to choose another window of at least 1 day. The current documentation says 0 fails validation.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Claude Code: manage sessions the resume flags, picker scopes, and fork behavior
  2. Claude Code: interactive mode the picker and transcript-viewer keys
  3. Claude Code: how it stores data transcript paths, plaintext JSONL, and cleanupPeriodDays
  4. Claude Code: checkpointing what /rewind restores and what it does not
Try it

Take the whole session,
not just the ID.

Continuum ties remote coding sessions to their real hosts and worktrees, so a cross-device handoff carries more than a transcript identifier.

free app · your subscriptions · local-first