Tech Update / Adventures with Claude Code #15
Resuming sessions – where was I?
Friday, 5 pm. Claude and I are in the middle of a migration, the plan is set, half of it is done. Close the terminal, weekend. Monday morning: new terminal, empty context, and I explain everything from scratch again?
No. Claude Code saves every session, and you can simply pick up where you left off.
▶️ The key commands
claude --continueresumes the most recent session in the current directory.claude --resumeshows a list of recent sessions to choose from./resumedoes the same inside a running session.
🏷️ Naming sessions
If you have several topics going at once, the list gets confusing fast. So I give important sessions a name:
/rename db-migrationin the running sessionclaude -n db-migrationright at startupclaude --resume db-migrationbrings it back directly
🌿 Branch off instead of overwriting
Sometimes I want to try something from a given point without changing the original session. That's what claude --continue --fork-session is for, or /branch inside the session. The copy has the full history, the original stays untouched.
A word of caution:
A resumed session brings its full history along, and that takes up context and costs tokens (part 9). For a new task a fresh session is often the better choice. Also: anything that really matters long term doesn't belong in a chat history, but in CLAUDE.md (part 4) or a plan file (part 10).
My rule of thumb:
- Same task, just interrupted?
--continue. - One of several construction sites? Name it and
--resume <name>. - New task? Fresh session.
Deutsch
English