How do I resume a specific Claude Code session?

claude --resume

Opens the session picker. Pass a name or ID to skip it.

Answer

Run claude --resume to open a picker listing this project's sessions, or pass an identifier to skip it: claude --resume <name> for a name you set with /rename, or claude --resume <session-id>. The ID form works from any directory. Claude Code looks in the current project and its worktrees first, then everywhere else on the machine.

What it does

--resume opens a session you choose, rather than the newest one.

claude --resume

With no argument it shows a picker. Each row carries the session's name or title, how long since it was last active, the git branch, and its size, enough to recognise the one you want without opening it.

The picker has its own keys:

  • ↑ ↓ to move, Enter to resume, → ← to expand or collapse a group
  • Space to preview, Ctrl+R to rename
  • / or any character to search; paste a pull-request URL to find the session that opened it
  • Ctrl+A for every project on the machine
  • Ctrl+W for every worktree of this repository
  • Ctrl+B to filter by the current branch

A session from an unrelated project is not opened in place: Claude Code copies a cd and resume command to your clipboard instead.

Passing an identifier skips the picker. A name works if you set one with --name or /rename, and so does the generated title; an ambiguous name opens the picker with it pre-filled. Names resolve across the repository's worktrees. A session ID works from any directory: Claude Code looks in the current project and its git worktrees first, then in every other project on the machine (v2.1.223 and later).

The short form is -r.

When to use it

Reach for --resume when "the last one" is not what you want:

  • returning to a task you parked while doing something else
  • picking up a session from a different project or worktree
  • scripting against a known session ID in a non-interactive run

In non-interactive mode the picker cannot open, so pass the ID explicitly:

claude -p "summarise what we decided" --resume <session-id>

Example

Pick from the list:

claude --resume

Resume a session you named earlier:

claude --resume auth-refactor

Names come from /rename inside a session, or --name at startup:

claude --name auth-refactor

Resume by ID from anywhere:

claude --resume 7f3d9a2c-1b4e-4c8a-9f2d-3e5b7c1a0d6f

Transcripts live at ~/.claude/projects/<project>/<session-id>.jsonl, where <project> is your working directory path with non-alphanumeric characters replaced by -, so the IDs are discoverable on disk.

Common mistakes

Expecting the picker in a -p run. Non-interactive mode has no UI to show it. Without an explicit ID there is nothing to pick from.

Passing the default display name. A label like my-app-3f identifies a running session in listings but is not a resume handle. A name you set and the AI-generated title both work with --resume; the default label does not.

Looking for a session older than the retention window. Transcripts are kept 30 days by default; cleanupPeriodDays in settings.json changes that.

Using it when --continue would do. If you want the most recent session in this directory, --continue needs no argument and no choosing.