✻Founding-member pricing: every lesson for $19/mo. The first 3 lessons are free. Start lesson 1 →
Unit 2 · Steer the Work · Lesson 10 of 40

Sessions: Name, Resume, Branch & Export

Manage Claude Code sessions like a pro: name them, resume by name, continue from a pull request, branch conversations and export transcripts.

ACADEMY8 min+66 XP4-question quiz

🎯 By the end of this lesson you'll be able to

  • Name sessions and resume them later
  • Continue work from a pull request
  • Branch a conversation to try an alternative
  • Run parallel sessions without collisions

Sessions are saved automatically

Every conversation is saved locally as you go. Closing the terminal, rebooting or losing Wi-Fi doesn't lose your work. The trick is finding the right session again, and that's what naming is for.

Name it, resume it

text
/rename stripe-webhooks

Later, from any terminal in that project:

bash
claude --resume stripe-webhooks   # jump straight back in
claude -r                         # or pick from a list
claude -c                         # or continue the most recent one

You can also name a session as you leave it: /clear oauth-migration names the conversation you're leaving before starting fresh.

Resume from a pull request

If Claude opened a PR in a session, you can return to that exact context later, for example to address review comments:

bash
claude --from-pr 1234

Branch a conversation

Want to try a risky alternative without losing your current thread? /branch creates a new conversation branch from this point. Explore the alternative, and if it fails, the original path is still there.

✓
Fork vs. branch

/branch splits the conversation so you can explore. /fork copies the conversation into a background session that keeps working while you continue in the foreground.

Parallel sessions without collisions

Two sessions editing the same files in the same folder will step on each other. Use git worktrees: separate working directories that share one repository.

bash
claude --worktree feature-auth     # or: claude -w feature-auth

Each worktree session gets its own branch and files, so you can run several Claude sessions side by side, one on the bug fix and one on the feature, and merge them when they're done.

Export and share

text
/export session-notes.md

/export writes the conversation to a file, which is handy for documenting a debugging journey, sharing with a teammate, or attaching to a ticket.

⌨Type the command+15 XP

Type the command that resumes the session you named "stripe-webhooks"

❯
◎Which tool fits?pick the best fit
You want to run a second Claude on a different feature at the same time.
A worktree gives that session its own files and branch.
You want to try a risky alternative approach mid-conversation.
Branching keeps the original thread intact.
You'll come back to this next week and want to find it fast.
A memorable name makes claude --resume <name> easy.
A teammate wants to see how you debugged the outage.
Export the transcript to a file and share it.

Check your understanding

?Lesson quiz10 XP per correct answer · +25 for a perfect score
QUESTION 1 OF 4

How do you resume a session you named 'auth-fix'?

Why: --resume (or -r) accepts a session name or ID.
QUESTION 2 OF 4

What does claude --from-pr 1234 do?

Why: It returns you to the context in which that PR was created.
QUESTION 3 OF 4

Why use worktrees for parallel sessions?

Why: Separate working directories prevent two sessions editing the same files.
QUESTION 4 OF 4

What does /branch do?

Why: Conversation branching lets you explore alternatives without losing the original thread.
0 / 4 correct
Academy lesson

Unlock lesson 10 and the next 30

You've finished the free lessons. Join the Academy for $19/month to unlock every lesson, quiz, terminal simulation and puzzle, plus the final exam and your certificate of completion.

  • All 40 lessons across 9 units
  • 165+ quiz questions
  • Final exam + certificate
  • New lessons as Claude Code evolves
  • XP, streaks and badges
  • Cancel anytime

Already a member? Log in to continue.

Key takeaways

  • Sessions save automatically. Name them with /rename so you can find them.
  • Resume with --resume <name>, -c, or --from-pr.
  • /branch explores alternatives; /fork runs work in the background.
  • Use --worktree to run parallel sessions safely.

Nice work. Lesson 10 done?

Mark it complete to earn +66 XP, keep your streak alive and unlock badges.

Written by Curtis Cornell from Anthropic's public Claude Code documentation. Last reviewed November 14, 2026. Claude Code changes fast; if something here differs from your version, the official docs win.

Start lesson 1 free →