Table of Contents
What this lesson is about
Every conversation you have with Claude Code is saved as a session — a complete record of everything said, decided, and done — and knowing how to navigate, continue, and organise those sessions is what separates a frustrating experience from a smooth one. This lesson explains where your conversation history lives, how to pick up exactly where you left off, and how to manage a project that unfolds across many days without losing a single thread of context.
Core concept: the paper trail on your desk
Imagine you are working on a large client proposal over several days. Each day you pull out your notes from the previous day, pick up where you left off, and add to the pile. At the end of the week you have a full paper trail — every draft, every revision, every margin note — all in order.
Now imagine two ways of working with that pile. The first is simply continuing from where you stopped yesterday — you flip to the last page and carry on. The second is going back to a specific earlier draft — say, Tuesday’s version — because you want to retrieve an idea you had then but did not pursue.
Claude Code’s session system works exactly like this. Continuing picks up from your most recent stop. Resuming lets you return to any specific earlier session by name. Both are simple to do, and both are far more useful once you understand the difference.
Where conversation history is stored
Claude Code saves every session automatically to your computer — nothing is lost when you close the terminal window. The sessions are stored as structured files in a hidden folder inside your home directory.
On a Mac or Linux machine, the path looks like this:
~/.claude/projects/your-project-name/sessions/
The ~ symbol means “your home folder” — the one with your name on it. You do not need to navigate there manually; Claude Code gives you commands to list and access sessions directly. But it is useful to know the files exist, are readable, and can be backed up just like any other folder on your computer.
Each session file has a unique session ID — a long string of letters and numbers that identifies it, something like a3f8c2d1-4b7e-4f9a-9c3d-1e2f3a4b5c6d. You will not need to memorise these; Claude Code displays them in a readable list when you ask.
Continuing vs resuming: the key difference
These two options look similar but serve very different purposes.
| Option | Command | What it does | When to use it |
|---|---|---|---|
| Continue | claude --continue | Picks up from the most recent session, exactly where you left off | Starting work again after a break — the normal daily workflow |
| Resume | claude --resume | Shows a list of past sessions and lets you choose a specific one to return to | When you need to go back to an earlier conversation — retrieving a decision, an idea, or a draft |
Using --continue
This is the command you will use most often. When you finished yesterday’s session mid-task and want to pick up this morning, simply type:
claude --continue
Claude Code loads the most recent session in full and drops you back in as if you never left. It is the equivalent of reopening a document to the last page.
Using --resume
When you need to return to a specific earlier session rather than the most recent one, --resume opens an interactive list. First, list your recent sessions to find the one you want:
claude --list-sessions
Claude Code will display something like this:
Recent sessions:
1. a3f8c2d1 2025-04-21 14:32 "Started homepage copy and nav structure"
2. b7e4f9a2 2025-04-22 09:15 "Pricing page draft and client feedback notes"
3. c1d2e3f4 2025-04-23 11:40 "About page — waiting on Thandi's bio"
4. d5e6f7a8 2025-04-24 08:55 "Product descriptions batch one"
Once you have the session ID, resume that specific session:
claude --resume b7e4f9a2
Claude Code loads that conversation in full — everything said, every file touched, every decision made in that session — and you can work from it directly.
Exporting a conversation to a file
Sometimes you want a permanent, readable record of a session — not to continue working in it, but to refer back to it, share it, or keep it as documentation. Claude Code lets you export any session to a markdown file with a single command:
claude --export b7e4f9a2 --output pricing-session-notes.md
This creates a file called pricing-session-notes.md in your current folder. It is a plain text document containing the full conversation, formatted for easy reading. You can open it in any text editor, attach it to an email, paste it into a shared document, or keep it as part of your project archive.
Exporting is particularly useful at the end of a significant working session — a client meeting recap, a strategy discussion, a session where important decisions were made. Having a clean written record costs nothing and saves you from trying to reconstruct what was agreed.
When to start a new session vs continue an old one
This is a judgment call that affects both your workflow and the quality of Claude’s responses. Here is a practical guide:
| Situation | Best approach | Why |
|---|---|---|
| Picking up the same task after a break | --continue | Preserves all context — Claude knows exactly where you are |
| Starting a completely different task | New session | Prevents old context from interfering with the new task |
| The current session has become very long | New session | Long sessions slow down responses and can dilute focus |
| You want to try a different approach to the same problem | New session | Gives Claude a clean slate — no anchoring to previous attempts |
| You need to retrieve something from days ago | --resume on the old session | Brings back the exact context from that time |
| Handing work to a colleague | Export to file, then new session | Creates a clean handover document and a fresh start |
The general principle is: one session, one focused task or working period. A session that sprawls across multiple unrelated tasks becomes harder to navigate and produces less consistent results.
The token cost of very long conversations
A token is the unit Claude uses to measure text — roughly three-quarters of a word. Every message you send includes not just your current question but the full history of the conversation so far. This means that as a session grows longer, each new exchange becomes more expensive to process and can take longer to respond to.
More importantly, very long conversations can dilute the quality of Claude’s focus. When a context window — the total amount of text Claude can hold in mind at once — becomes very full, earlier parts of the conversation can receive less attention than recent ones. A decision made at message five may be less present at message fifty.
This is not a reason to panic about long sessions, but it is a reason to prefer short, focused sessions with clear goals over one marathon conversation. An hour of focused work on a specific task, followed by saving context and starting fresh, typically produces better results than an eight-hour sprawling session that covers everything.
Managing a multi-day project without losing context
The solution to working across multiple sessions is a three-file system. Each file plays a different role, and together they ensure nothing important is ever lost between sessions.
The three files
CLAUDE.md — The standing briefing. This is the memory file from Lesson 18: permanent facts about the project that every session should start with. Brand guidelines, client preferences, decisions already made, recurring instructions. This file does not change often.
memory/decisions.md — The decision log. Every significant choice made in any session — what was decided, why, and when — goes here. This means you never have to re-explain why something was done a particular way, and you never accidentally revisit a settled question.
project-log.md — The running to-do and done list. Updated at the end of every session, this file records what was completed today and what comes next. It is the first thing Claude reads at the start of each new session to understand where the project stands.
How to use them
At the start of each session, say:
Please read CLAUDE.md and project-log.md before we begin.
Summarise where the project stands and what we're working on today.
At the end of each session, say:
Before I close, please update project-log.md with what we completed today
and what the next steps are. Also update decisions.md if any significant
decisions were made in this session.
This two-minute closing routine means the next session starts fully informed, every time.
Real example: a week-long project across daily sessions
Here is how a realistic week might look for a small business owner building a new website with Claude Code’s help.
The project-log.md file at the end of the week
# Project Log — Thandi's Ceramics Website
## Week of 21 April 2025
### Monday 21 April
**Completed:**
- Set up project folder and CLAUDE.md with brand guidelines
- Drafted homepage hero text (3 versions — Thandi to choose)
- Built navigation structure: Home / Shop / About / Stockists / Contact
**Next:**
- Thandi to choose preferred hero text version by Wednesday
- Begin Shop page copy once hero is approved
---
### Tuesday 22 April
**Completed:**
- Drafted pricing and shipping section for Shop page
- Confirmed flat-rate R95 shipping, free over R1 200 (saved to decisions.md)
- Wrote product category descriptions: Mugs, Bowls, Vases, Gift Sets
**Next:**
- Product photography arriving Thursday — hold individual product descriptions
- Draft About page while waiting
---
### Wednesday 23 April
**Completed:**
- Thandi chose hero text Option B — updated homepage file
- Began About page: brand story drafted, founder bio placeholder only
- Thandi's bio copy to come from her directly
**Next:**
- Thandi sending bio copy by Friday
- Draft Stockists page (8 current stockists — details in stockists-list.txt)
---
### Thursday 24 April
**Completed:**
- Product photography received and reviewed — 34 images total
- Wrote individual descriptions for all 12 mug products
- Wrote descriptions for 8 bowl products
**Next:**
- Complete vase and gift set descriptions (14 remaining)
- Review all copy together once descriptions are done
---
### Friday 25 April
**Completed:**
- All product descriptions done and saved to products/descriptions/
- Thandi's bio received and added to About page — full draft complete
- Full copy review done — 3 minor edits noted and applied
**Next session:**
- Final proofread before sending to designer
- Stockists page still incomplete — Thandi to confirm 2 missing addresses
What this system produces
By the end of the week, no session started blind. Each morning, Claude read CLAUDE.md for the standing brief and project-log.md for the current state, and was immediately ready to work. No time was spent re-explaining the project, re-establishing preferences, or tracking down what had been done. The entire week’s work — decisions, drafts, progress — was documented, searchable, and ready to hand off to a designer or share with a client.
Practical Exercise
In this exercise you will set up a session management system for a real or practice project and experience how the three-file approach works in practice.
a. Start a new Claude Code session and ask it to set up the three-file system:
I want to set up a proper session management system for this project.
Please create three files:
1. CLAUDE.md — with a basic project brief I'll give you
2. memory/decisions.md — empty for now, with just a heading
3. project-log.md — with today's date as the first entry
Here is the project brief: [describe your project in 3–5 sentences]
Once Claude confirms the files are created, ask it to show you the contents of each one.
b. Do a short piece of real work — ask Claude to draft something, make a decision, or complete any small task related to your project. Then, before closing the session, run the closing routine:
Before I close, please:
1. Update project-log.md with what we completed today and what comes next
2. Add any decisions we made to memory/decisions.md
3. Show me the updated project-log.md so I can confirm it's accurate
Close the session completely.
c. Open a new session and test whether the context carries over:
claude --continue
Then type:
Please read CLAUDE.md and project-log.md and tell me where this project
currently stands and what we should work on today.
Claude should give you an accurate, informed summary based entirely on what was saved — with no re-explaining required on your part. If the summary is correct, your session management system is working.
Common problems and how to fix them
--continue loads the wrong session
--continue always loads the most recent session in the current project folder. If you have multiple project folders, make sure you are in the correct one before running the command. Check your current location by asking Claude Code which folder it is working in, or navigate to the correct project folder first.
The session list from --list-sessions is very long and hard to read
Sessions accumulate over time and the list can grow unwieldy. You can archive old sessions by exporting the important ones to markdown files and noting in your project-log.md that they have been archived. You do not need to delete session files — they are small and cause no harm — but exporting the key ones to readable documents is good practice for any project that runs longer than a few weeks.
Claude starts a new session without memory of the previous work
This usually means project-log.md or CLAUDE.md was not updated before the last session ended, or the new session was not explicitly asked to read those files. Make the closing routine — updating the log before closing — a non-negotiable habit. At the start of every session, always prompt Claude to read both files before beginning work.
A session exported to markdown is very long and hard to search
Use your text editor’s find function (Ctrl+F on Windows, Cmd+F on Mac) to search for specific words or phrases within the exported file. For very long exports, consider asking Claude in a new session to summarise the exported file — paste its contents in and ask: “Summarise the key decisions and outputs from this session in plain English.”
--resume with an old session ID produces unexpected results
When you resume a very old session and then continue working, Claude has to hold a large amount of old context alongside new instructions, which can occasionally produce confused responses. If this happens, rather than continuing in the old session, export it to a markdown file, extract the specific information you needed from it, and start a fresh session — adding that information to your CLAUDE.md or decisions.md where it belongs.
What you have learned in this lesson
- Claude Code automatically saves every conversation as a session file on your computer, with a unique session ID, stored in a dedicated folder in your home directory
--continuepicks up from the most recent session and is the command you will use for normal day-to-day work;--resumelets you return to any specific earlier session by its ID- You can list recent sessions with
--list-sessionsand export any session to a readable markdown file with--export - Short, focused sessions produce better results than long, sprawling ones — as sessions grow very long, earlier context receives less attention and response quality can decline
- A three-file system —
CLAUDE.mdfor the standing brief,decisions.mdfor the decision log, andproject-log.mdfor the running status — keeps every session fully informed with no repeated explanation - A simple closing routine (update the log and decisions file before ending each session) and an opening routine (ask Claude to read both files before starting) are the habits that make multi-day projects run smoothly
- A well-managed project history is also a valuable business asset — a complete, searchable record of what was decided, when, and why