Sessions: resume, continue, fork
A session is a conversation tied to a directory, saved on your machine as it happens. Knowing how to come back to one, and when to branch instead, is most of working on something for more than an afternoon.
Every message, tool call and result is appended to a plain text file as you work. Those three runs from the earlier lessons each left one behind.
ls ~/.claude/projects/-private-tmp-linkshort/6cb086d7-a4b1-4f2c-8716-f4df56ce3c95.jsonl d97247c3-193e-4f0b-a094-247f74cd67a3.jsonl eebc5636-3afb-47d4-a4f7-da64a313841d.jsonl
The directory name is your project path with the slashes turned into dashes, and each file is one session. They are ordinary JSON lines, which means the record of what happened is yours to read, grep or delete.
Coming back
| Command | What it does |
|---|---|
claude --continue | Reopens the most recent conversation in this directory |
claude --resume | Opens the picker so you can choose one |
claude --resume <name> | Goes straight to a session you named |
/resume | Switches to another conversation without leaving the one you are in |
A resumed session comes back with the whole history, tool calls and results included, and continues on the model it was using. One thing does not come back: a tool that was still running when the process died does not run again, and Claude carries on without its output.
claude -p stay out of the picker and out of --continue, which is why the three files above will not appear there. You can still open one by passing its id to --resume.Forking, and why it is different
Resuming appends to the same conversation. Forking copies the history into a new session and leaves the original exactly as it was.
claude --continue --fork-sessionYou get a new session id holding a copy of the conversation. The original is untouched and still there to resume.
Use it when you want to try a second approach without losing the first, or before something you might regret. Inside a session the same thing is /branch.
Because a session belongs to a directory, two directories mean two independent sessions, which is how parallel work is done. Git worktrees give you those directories, and that is lesson 21.
- Run
claude --resumeand look at how your own sessions are named. - Open one of your
.jsonltranscripts in an editor and read a tool call.
This is what real progress feels like.