Claude Code --resume and --continue: pick up sessions without starting over
The most frustrating moment with any terminal assistant is the next day: I reopen the project and have to re-explain everything from scratch. With Claude Code I don't, because every conversation is a session — a file saved continuously as I work, tied to the project directory — that I can reopen exactly where I left off. The two entry points I type every day are --continue, which fishes out the most recent session in this directory without asking me anything, and --resume, which opens a list I pick the right conversation from. Memory isn't a trick: it's the default behavior. In this article I look at when I use each, how I find an old session with the picker, how I duplicate a conversation to try a different path, and the limits worth knowing.
🧭 What a session is and why I don't start over
A session in Claude Code is simply a saved conversation tied to a project directory. As I work, the assistant writes it to disk continuously: I can exit, run /clear, shut down the machine, and that conversation stays there ready to resume. Saving is automatic, I don't have to remember to export anything.
The detail that changes everything is that sessions are per directory. Claude Code doesn't keep one global pot: each project has its own history, so when I resume the last conversation I get the one for this repo, not the last thing I did elsewhere. It's the same logic I follow when I split work across several Git worktrees.
There are several ways back into a session, from the terminal or from inside an already-active conversation. I use them all, but the two I type every day are --continue and --resume.
# resumes the most recent session in this directory
claude --continue # short form: claude -c
# opens the interactive session picker
claude --resume # short form: claude -r
# resumes a session directly by name
claude --resume auth-refactor
# from inside an active session: switch conversation
/resumeOfficial docs · Claude Code sessions ↗
🔁 --continue or --resume: the choice I make every day
--continue (short form -c) is the one I use almost always: it resumes the most recent session in the directory I'm in, with no ID and no configuration. I type claude --continue and I'm back inside the last conversation, with all the context in place. Nothing to remember: it's the gesture I start a project's day with.
I can also have it do something right away: claude -c "do the tests pass now?" resumes the last session and sends it the prompt already. Handy when I reopen specifically to close a task left half-done, without an extra round-trip.
--resume (short form -r) comes in when the last session isn't the one I want. With no arguments it opens the session picker, the interactive list of conversations; with a name — claude --resume auth-refactor — it resumes that one directly. It's the tool for when I have several threads open in parallel or need to fish out a conversation from a few days ago.
claude --continue (-c)
- Resumes the most recent session in the directory
- No IDs to remember, no configuration
- Daily work on a single thread
- With a prompt: claude -c "do the tests pass now?"
claude --resume (-r)
- Opens the picker or resumes by name or ID
- For when I have several threads open in parallel
- Reaches old sessions or ones in other directories
- Resumes a claude -p session by passing its ID
🎛️ The session picker: finding the right conversation
When I run claude --resume with no arguments — or /resume from inside a session — the picker opens: a list where each row shows the session name, if I set one, otherwise the summary or the first prompt, along with time since last activity, message count and Git branch. From here I move with the arrows and resume with Enter.
The part that saves me time is the shortcuts to widen the search. By default I see the sessions of the current worktree: I press Ctrl+A to see them all, from every project on the machine, Ctrl+W to widen to the repo's worktrees and Ctrl+B to filter the ones on the branch I'm on. With Space I peek at a conversation's content before opening it.
A trick I use often: I paste a pull request URL into the picker — GitHub, GitLab or Bitbucket — and it finds the session that created it. It's the fastest way back to the work behind a PR without remembering when I opened it.
- 01Open the pickerclaude --resume with no arguments, or /resume from inside a session.
- 02Search or widenType to filter; Ctrl+W widens to worktrees, Ctrl+A to all projects, Ctrl+B to the branch.
- 03Preview the contentSpace shows a preview of the conversation before opening it.
- 04Resume with EnterEnter reopens the highlighted session; I rename it on the fly with Ctrl+R.
Source: official Claude Code documentation — Manage sessions.
🏷️ Naming your sessions so you can find them
The single habit that makes everything else easier is naming your sessions. An anonymous session I only find from its summary or first prompt; one I've called auth-refactor I reopen by name without even going through the picker. It's the highest-ROI investment in session management, and it costs one word. On a team, I even resume the conversation tied to a pull request.
I set a name at different moments, each handy in its own way:
- At startup, with claude -n auth-refactor: the session is born already labeled.
- During the session, with /rename auth-refactor: the name also appears on the prompt bar.
- From the session picker, by highlighting a row and pressing Ctrl+R.
- On accepting a plan in plan mode: Claude Code derives the name from the plan, unless I've already set one.
# name at startup
claude -n auth-refactor
# rename during the session
/rename auth-refactor
# resumes the session linked to a pull request
claude --from-pr 1234🌿 Branch and --fork-session: experiment without losing your thread
Sometimes I'm at a good point and want to try a different path — another library, a riskier approach — without throwing away the conversation that got me there. That's what branching is for: it creates a copy of the session up to that point and moves me into it, leaving the original intact.
I do it two ways: from inside the session with /branch try-streaming, or from the command line by combining --continue or --resume with --fork-session. Either way I get a new session with its own history, while the starting one stays in the picker, grouped together with its branches. The original is untouched.
One warning I noted down after banging my head on it: the fork copies the conversation, not the files. If the branch edits the code, those changes are real and visible to any session working in the same directory. To branch and be able to roll back the files you need checkpointing, not the branch.
# from inside the session: copy the history and enter it
/branch try-streaming
# from the CLI: resume the most recent and fork it
claude --continue --fork-session
# the original stays intact: I return to it by name
claude --resume <original-name>⚠️ The limits to know: headless, transcripts and double terminals
Sessions started with claude -p (the non-interactive mode) or with the Agent SDK don't appear in the picker. They're not lost, though: if I know their session ID I resume them with claude --resume <session-id>, provided I launch it from the same directory they started in — the ID lookup is scoped to the current project and its worktrees.
From there I can also query them without opening the TUI: claude -p --resume <session-id> "summarize what we changed" sends a follow-up and returns the answer, handy inside scripts. If instead a run shouldn't leave a trace, --no-session-persistence runs it without saving the session.
Two things not to forget. Transcripts live in ~/.claude/projects/, in JSONL format, and their schema is internal: better not to parse them by hand but to use /export. And if I resume the same session in two terminals without forking, the messages from both interleave into one file — an accidental relay that muddles the context.
# transcripts saved per project, in JSONL
~/.claude/projects/<project>/<session-id>.jsonl
# non-interactive follow-up on an existing session
claude -p --resume <session-id> "summarize what we changed"
# a headless run that doesn't save the session
claude -p --no-session-persistence "..."✅ The flow I follow so I never lose work
Put together, these commands become a single habit: I never close a piece of work hoping to remember it — I leave it in a session I know I can find. The mini-flow I follow, in order:
- Name the important sessions with claude -n the moment they start: that's what makes them findable.
- Resume with *-c* for daily work on a single thread, and switch to --resume only when I have more than one open.
- Fork before I gamble: a --fork-session costs nothing and saves the good path if the experiment doesn't hold up.
- Attach PRs with --from-pr, so the session and its review stay together.
- Export with */export* when a conversation is worth archiving beyond the default 30-day retention.
Frequently asked questions about Claude Code --resume command
What's the difference between claude --continue and claude --resume?
--continue resumes the most recent session in the current directory, without asking me anything: it's the everyday gesture. --resume opens the session picker or resumes a session by name or ID, and it's what I use when I have several conversations open or need to go back to one that isn't recent.
How do I resume a session started with claude -p or the Agent SDK?
Those sessions don't appear in the picker, but I resume them by passing their session ID to claude --resume <session-id>. I have to launch it from the same directory the session started in: the ID lookup is scoped to the current project and its Git worktrees.
How do I name a session so I can find it?
At startup with claude -n name, during the session with /rename name, or from the picker with Ctrl+R. Once named, I resume it with claude --resume name or /resume name. A descriptive name is the highest-ROI habit when I work on several tasks in parallel.
Can I duplicate a session to try another path?
Yes: /branch from inside the session, or --fork-session combined with --continue or --resume from the CLI. The fork copies the conversation and diverges, leaving the original intact. Careful though: it copies the history, not the files, so code changes stay real and shared in the directory.
Where are session transcripts saved?
In ~/.claude/projects/<project>/<session-id>.jsonl, one JSONL file per session. The format is internal to Claude Code and changes between versions, so to work with it I use /export instead of parsing it by hand. The default retention is 30 days, configurable from settings.json.
Let's talk
If this topic is relevant to you, write to me: comparing notes on code and AI is always time well spent.