Skip to content
,

How to Resume a Claude Code Session (2026): Continue, Resume, Name and Branch

6–10 minutes
Woman in a minimalist grey studio holding a tablet with a RESUME SESSIONS card, hook pick up where you left

Closed the terminal in the middle of a Claude Code task? Ran /clear and wanted the old conversation back? Nothing is lost. Claude Code saves every session as you work, and you can pick any of them up again with one command.

This guide covers every way to resume in Claude Code: claude --continue, claude --resume, the session picker, resuming by name or ID, naming and branching sessions, what a resumed session restores, and where the transcripts live on disk. It follows Anthropic’s Claude Code documentation as of December 2026.

TL;DR

  • Last session here: claude --continue (or claude -c).
  • Pick one: claude --resume or /resume inside a session.
  • By name: start with claude -n auth-refactor, return with claude --resume auth-refactor.
  • Rename: /rename new-name, or Ctrl+R in the picker.
  • Try another approach: /branch or claude --continue --fork-session.
  • Files: ~/.claude/projects/<project>/<session-id>.jsonl, kept 30 days by default.

All Resume Commands

Command What it does
claude --continue Reopens the most recent session in the current directory
claude --resume Opens the session picker
claude --resume <name> Resumes the named session directly
claude --resume <session-id> Resumes the session with that ID, from any directory
claude --resume <path.jsonl> Resumes from a transcript file at that absolute path
claude --from-pr <number> Opens the picker filtered to sessions linked to that pull request
/resume Switches to another session from inside a session

The full list of flags is in our Claude Code commands cheat sheet.

Continue Your Last Session

  1. Open a terminal in the same project folder you were working in. Sessions are stored per project directory.
  2. Run claude --continue. The most recent conversation in that directory opens with its full history.
  3. Type your next message. Claude continues from where you stopped.

A few sessions are skipped by --continue: ones started with claude -p, Agent SDK sessions and sessions whose first prompt was /loop. If your most recent conversation is still running in the background, Claude Code exits with that session’s ID so you can attach to it instead.

The “Resume this conversation?” dialog

On Pro, Max and Ultra plans, you may see this dialog when you resume a long conversation after a long break or on a different model. Its estimate is the share of your 5-hour usage limit that re-reading the saved conversation would use.

Choose Resume if you still need that history, or Start a new conversation if your next task does not. Our Claude plans comparison explains the limits.

Use the Session Picker

Run claude --resume with no argument, or /resume inside a session, to open the picker.

Key Action
Up/Down or k/j Move between sessions
Enter Resume the highlighted session
Space Preview the session content
Ctrl+R Rename the highlighted session
/ or any letter Search; paste a GitHub, GitLab or Bitbucket PR URL to find the session that created it
Ctrl+A Show sessions from all projects on this machine
Ctrl+W Show sessions from all worktrees of this repository
Ctrl+B Filter to the current git branch
Esc Exit the picker or search

Each row shows the first label that exists: your name, the AI-generated title, a summary or one of your prompts. Background sessions are marked bg.

If you pick a session from another worktree, Claude Code resumes it in place. If you pick one from an unrelated project, it copies a cd and resume command to your clipboard. Working with worktrees? See our Claude Code worktrees guide.

Name Sessions and Resume by Name

Names make sessions easy to find, especially when you run several tasks in parallel.

When How
At startup claude -n auth-refactor
During a session /rename auth-refactor (shown on the prompt bar)
In the picker Highlight and press Ctrl+R
After accepting a plan The session gets a title based on the plan, unless you named it
From claude.ai or the desktop app Rename a Remote Control or desktop session

Then return with claude --resume auth-refactor or /resume auth-refactor. An exact match resumes directly, even from another worktree. If the name matches several sessions, claude --resume opens the picker with it as a search term, while /resume reports an error.

Unnamed sessions still get an AI-generated title that works as a resume handle. The default display name such as my-app-3f does not.

Running /rename with no name generates one from the conversation. Names are capped at 200 characters.

What a Resumed Session Restores

  • Conversation history: messages, tool calls and results. A compacted session opens at a “Conversation compacted” row and continues from the summary.
  • Model: the model the session was using, except in some cases such as a retired model or a pinned alias variable. Pass --model to choose another; see our guide to changing the model.
  • Permission mode: restored when you resume from the terminal with --continue or by ID or unique name. A session that ended in bypass mode starts in the normal default mode instead.
  • Active goal and session-scoped scheduled tasks.
  • Unfinished background work appears as a note; Claude reads it with your next prompt but does not restart it.

Plan mode is special: a session that ended in plan mode resumes in plan mode in most cases. More on that in our plan mode guide.

Flags You Must Pass Again

Launch flags are not saved with the session. When you resume, pass these again if you used them:

  • --mcp-config for MCP servers
  • --plugin-dir for local plugins
  • --add-dir, for example claude --continue --add-dir ../shared, including folders you added with /add-dir
  • --settings, --fallback-model
  • --tools, --allowedTools, --disallowedTools

Branch or Fork a Session

Branching copies the conversation so far and switches you into the copy, leaving the original untouched. Use it to try a different approach without losing the path you were on.

/branch try-streaming-approach

# from the command line
claude --continue --fork-session

/branch prints two session IDs: the new branch and the original. Return to the original with /resume. A branch made with /branch keeps your “allow for this session” permissions because it runs in the same process; a --fork-session process asks again.

To run a copy in the background while you keep working, use /fork instead. Rewinding within one session is a different feature; see our checkpoints guide.

Warning: if you resume the same session in two terminals at once, both write to one transcript and messages can go missing later. Add --fork-session to each command to keep both.

Where Sessions Are Stored

Transcripts are JSONL files at:

~/.claude/projects/<project>/<session-id>.jsonl

<project> is your working directory path with non-alphanumeric characters replaced by dashes. The file format is internal and changes between versions, so use /export or the script options below rather than parsing it.

To Use
Export a readable copy /export or /export notes.txt
Move storage off ~/.claude CLAUDE_CONFIG_DIR
Keep sessions longer than 30 days cleanupPeriodDays in settings.json
Delete a project’s sessions now claude purge
Skip saving one -p run --no-session-persistence

Settings keys like cleanupPeriodDays are covered in our Claude Code settings guide.

Resume From Scripts

You can send a follow-up prompt to a saved session and capture the answer as JSON:

claude -p --resume <session-id> --output-format json "summarize what we changed" | jq -r '.result'

Sessions created with claude -p do not appear in the picker, but claude --resume <session-id> still finds them, and claude -p --continue includes them. See our headless mode guide for more.

Troubleshooting

“No conversation found with session ID”

The ID does not exist on this machine, or two projects hold copies of it. Check the ID, or open the picker and press Ctrl+A to search all projects.

My session is not in the picker

The picker shows the current worktree by default. Press Ctrl+W for all worktrees or Ctrl+A for all projects. -p, SDK and /loop sessions are hidden; resume them by ID.

MCP tools are missing after resuming

Pass --mcp-config and any other launch flags again.

Resuming by name does nothing

You may be using the default display name, which is not a resume handle. Use /rename to set a real name.

Old sessions disappeared

Transcripts older than 30 days are cleaned up by default. Raise cleanupPeriodDays to keep them longer.

FAQ

How do I resume a Claude Code session?

Run claude --continue for the last session in this folder, or claude --resume to pick one.

What is the difference between –continue and –resume?

--continue opens the most recent session automatically; --resume lets you choose by picker, name or ID.

Can I get back a conversation after /clear?

Yes. Run /resume and pick it. In the same process you can also restore it from the rewind menu.

How long does Claude Code keep sessions?

30 days by default, adjustable with cleanupPeriodDays.

Can I resume a session on another computer?

Transcripts are local files, so a CLI session resumes on the machine that has them. For working across devices, see Claude Code Remote Control.

Does resuming use my usage limits?

Yes. Your next message sends the saved conversation again, which is why long resumes can show the usage estimate dialog.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman in a minimalist grey studio holding a tablet with a RESUME SESSIONS card, hook pick up where you left