Claude Code sessions: resume, name and branch a conversation

Closing the terminal does not lose your Claude Code conversation. Every conversation is a saved session tied to a project folder, and you can reopen it, give it a name you will remember, or branch it to try something different without losing the original. Here is the short version.

Get back to a conversation

Name sessions so you can find them

If you work on several tasks, a name beats scrolling a list. Start with claude -n auth-refactor, rename during a session with /rename auth-refactor, or press Ctrl+R on a session in the picker. If you never name one, Claude Code makes a short title from your first prompt, and that generated title also works with --resume.

The picker

What a resumed session brings back

As we read the docs, resuming restores the conversation (if it had been compacted, you continue from the summary plus what came after), the model the session was using, an agent you started it with, the permission mode in most cases, and scheduled tasks that have not expired. A tool call that was still running when the process ended is not run again. Not everything comes back: if the session depended on flags such as --mcp-config, --settings, --plugin-dir or directories you added, pass them again, and directories added mid-session with /add-dir are not restored either. A session that ended in plan mode comes back in plan mode.

On some plans you may see a "Resume this conversation?" prompt for a long conversation after a break. It estimates how much of your usage limit the saved conversation alone would use. If your next task does not need it, start a new conversation instead and keep the old one for later (see reduce token usage).

Branch a conversation

To try a different approach without losing the path you were on, run /branch (with a name if you like, for example /branch try-streaming-approach). It copies the conversation so far into a new session and switches you into it, and the original stays untouched in the picker. From the command line, claude --continue --fork-session does the same in a new process; "allow for this session" permissions are not carried into that new process, so you approve them again. If you resume the same session in two terminals without forking, their messages are interleaved in one transcript, so fork instead. To undo code and conversation inside one session, see rewinding.

Where it is stored

Clear, compact or branch?

/clear starts with an empty context and saves the old session. /compact replaces the history with a summary and stays in the same session. /context shows what is using space (more in what survives /compact). For carrying work between sessions on purpose, a short handoff note works well, and for parallel work see git worktrees.

All the guides are in the guides index. This follows Anthropic's sessions documentation as we read it in October 2026, shortened on purpose. We are not affiliated with Anthropic. We wrote this from the documentation and have not tested every setup. Flags, menus and defaults change between versions, and where this page and the documentation disagree, the documentation wins.

The free loop-stop skill gives long tasks a limit and a stop rule. If you want a second pair of eyes on your CLAUDE.md and settings, the Tune-Up Kit is a checklist for exactly that.