How do I continue the last Claude Code session?
claude --continue Resumes the most recent session in this directory. Short form: claude -c.
Answer
Run claude --continue in the directory where you were working. It reopens the most recent session there with its conversation intact, no picker and no arguments. Session history is stored per directory, so the same flag in a different project reopens that project's last session instead.
What it does
--continue reopens the most recent session in the directory you run it from.
claude --continue
There is nothing to choose. Claude Code takes the newest session for the current directory and restores the conversation, so you carry on where you stopped. "Newest" skips three kinds of session: -p and SDK runs, background sessions, and sessions whose first prompt was /loop. A -p --continue run includes the first and the last of those.
It restores more than the transcript: the model, the agent, and the permission mode the session was in, except that a session that ended in bypassPermissions or plan mode comes back in the mode a new session would start in; the other exceptions have a page of their own. Flags such as --add-dir, --mcp-config and --settings are not restored; pass them again.
The short form is -c.
Session history is per directory. Running --continue in one project reopens that project's last session; running it in another reopens a different one. This is why the flag is unambiguous, because "most recent" is scoped to where you are.
When to use it
This is the flag for the ordinary case: you closed the terminal, made coffee, came back, and want the same conversation.
- resuming work you left an hour or a day ago
- reopening after a terminal crash or a reboot
- returning to a task where the context matters more than the command
If you know exactly which session you want and it is not the last one, use --resume instead.
Example
Continue in the current project:
claude --continue
The short form does the same thing:
claude -c
Because sessions are scoped to a directory, this is a per-project habit:
cd ~/work/api && claude -c # last session for the API project
cd ~/work/website && claude -c # a different session entirely
Continue without touching the original, on a new session ID:
claude --continue --fork-sessionCommon mistakes
Expecting it to work from anywhere. --continue looks in the current directory, plus any session that added this directory with /add-dir. Running it from your home directory will not find the session you started inside a project. --resume <session-id> is the one that searches across projects; a session that is missing everywhere is a different question.
Assuming the conversation lives forever. Transcripts are kept for 30 days by default. The cleanupPeriodDays setting in settings.json changes that window.
Reaching for it after /clear. Clearing starts a new conversation with an empty context. The old one is saved rather than continued, and /resume is what gets you back to it.