How Claude Code worksPart 10
Handoffs and memory
On this page
In short: Every new session is a new shift. A good night shift reads the handover note before it touches anything. Give Claude the same: standing rules in CLAUDE.md, a handoff note and task list next to the spec, a decision record for each real choice, and Claude’s own auto memory for facts it learns. All of it in files, so any session finds the same truth.
Part 9 proved today’s work. This part makes sure tomorrow’s session knows about it. The project in the examples, the Acme storefront, is made up.
A new shift every session
Think of it like this: The day nurse does not rely on the night nurse remembering. They write it down, in the same place, in the same shape, every time.
Part 2 showed that a session’s memory is its conversation. When you start fresh, which Part 6 says you should, that conversation is gone. What survives is what was written to a file. So the question is not “how do I make Claude remember?” but “what should be written where?”
What is always true. Shared in git, read at the start of every session.
Your own preferences for this project. Kept out of git.
Notes Claude writes for itself as it learns your project. On this machine only. /memory opens it.
Which tasks are done, which are next, and what blocks them. In git, next to the spec.
What happened this session and what to do first next time. Short, dated, in git.
Why you chose one way over another. One short file per decision, so nobody re-argues it.
Under the hood: how memory files load
- At the start, Claude Code walks up from your folder and loads every
CLAUDE.mdandCLAUDE.local.mdit finds, plus your user file~/.claude/CLAUDE.md. - Rules in
.claude/rules/without apathslist load at the start too. Rules withpathsload when a matching file is read. - A
CLAUDE.mdcan pull in another file with@path/to/file. Imported files load at the start, so they do not save room. - Auto memory lives in
~/.claude/projects/<project>/memory/. The first 200 lines or 25KB of itsMEMORY.mdload at the start; topic files load when needed. It stays on this machine. /memorylists the loaded files, toggles auto memory and opens its folder. Everything is plain markdown you can edit or delete.
The handoff note
Keep it short, put it next to the spec, and overwrite it each session so it is always current. History lives in git.
# Handoff: gift cards, 12 Nov ## Done - T1, T2, T3 (AC-1, AC-2, AC-3, AC-5). Tests pass. Evidence in PR. ## Next - T4: show remaining balance on the receipt (AC-4). Start in src/receipt/summary.tsx. ## Decided - Gift card applies after coupons. See docs/adr/0007. ## Watch out - The sandbox gift card API resets every night at 02:00.
Decision records
Think of it like this: “Why is the door on this side?” A note on the drawings saying “because of the drain” saves a week of debate.
An ADR (architecture decision record) is one short file per decision: the context, what you chose and what follows. Link it from the spec, and Claude will read the reason before suggesting the other way.
# 7. Apply gift cards after coupons Status: accepted, 12 Nov Spec: specs/012-gift-cards (Q1, AC-1) ## Context A coupon is a discount. A gift card is a way to pay. ## Decision Apply coupons to the total first, then the gift card. ## Consequences - The shopper always gets the full coupon value. - The gift card balance lasts slightly longer.
The Acme storefront, step by step
- 1 · Teach the routine once
A line in
CLAUDE.mdmakes every session start and end the same way.## Sessions - Start: read the spec, tasks.md and handoff.md for the feature. - End: tick tasks, update handoff.md, add an ADR for any real decision. Then stop.
- 2 · A skill for the end of the day
A recipe card (Part 3) so the handoff always has the same shape.
> /handoff gift-cards
- 3 · Decisions get a file
Any choice someone might question later goes into an ADR. Spec-Kit Plus has
/adrfor this.> Write an ADR for applying gift cards after coupons.
- 4 · Let Claude keep its own notes
Auto memory saves things like the test command that works on this machine. Look at it now and then with
/memory, and delete what is wrong./memory
- 5 · Next morning, a fresh session
A clear desk (Part 6), and the logbook tells Claude where to start.
claude > Continue gift-cards from the handoff.
Important: handoff notes, specs and ADRs go in git, so they are reviewed like code and reach everyone. Never put secrets in them; the privacy and secret rules from Part 5 still apply.
Where this fits in the bigger picture
Think of it like this: A colleague who keeps a good logbook can be away for a week and pick up on Monday without a meeting.
This is what lets the setup carry work across days and across people. The spec says what, the tasks say where you are, the ADRs say why, and the handoff says what to do first. Part 11 packs all of these habits into one kit you can install in any project.
Which one fits?
- It is true for every task in this repo: CLAUDE.mdShort, shared in git, loaded at every start. Keep it under about 200 lines.
- It is just how I like to work: CLAUDE.local.md or user CLAUDE.mdOut of git. For your own habits, not the team's rules.
- It is where this feature stands: handoff.md and tasks.mdNext to the spec, in git. Overwritten each session, so it is always current.
- We chose one way over another: An ADROne short file with context, decision and consequences. Linked from the spec.
- Claude learned a fact about this machine: Auto memoryClaude saves it itself. Check it with
/memory. It does not travel to other machines.
Your setup so far
- Part 1 · where it worksYou know which machine does what, and which folders Claude can reach.
- Part 2 · what it remembersOne task per notebook; photocopies in their own folder; helpers for noisy side jobs.
- Part 3 · how it behavesFridge rules for what is always true, recipe cards for procedures, alarms for musts, specialists for checks.
- Part 4 · what it can reachPhone lines to your tracker and tools, checked before trusted; your setup packed as one toolbox.
- Part 5 · what it may doKeys for routine work, a knock for anything that publishes, locked doors for secrets.
- Part 6 · how it stays sharpA clear desk: fresh sessions, focused summaries, helpers for big reads, rules only where they apply.
- Part 7 · what it builds fromA written spec with acceptance criteria, rules with IDs, and a plan agreed before code.
- Part 8 · how it avoids guessingContract first: generated types are the only truth, and a hook makes Claude state the facts.
- Part 9 · how it proves the workOne verify command, reviewers in parallel, and evidence before anything is called done.
- Part 10 · how it hands overA tracker, a changelog and decision records that keep the next session on the truth.
- NextPart 11 · your setup as a kit
Three rules of thumb
Decisions go in files next to the spec, not in a chat that ends tonight.
An ADR turns a long debate into one paragraph that settles it.
Memory that is wrong is worse than none. Read it now and then, and delete stale lines.
QuizA teammate opens the gift card feature tomorrow on a different laptop. Which of these will Claude see there?
Show the answer
Answer: The handoff note, tasks and ADRs in git
Auto memory and CLAUDE.local.md stay on your machine, and the conversation stays in your session. Files committed to git are what every session, on every machine, can read.
Words in this post:
- Handoff note: a short file saying what was done, what is next and what to watch out for.
- Auto memory: notes Claude writes for itself about your project, kept on your machine.
- ADR: an architecture decision record. One short file per decision, with the reason.
- CLAUDE.local.md: your personal project notes for Claude, kept out of git.
- Import:
@pathin a CLAUDE.md that pulls another file in.
Memory details were checked against the Claude Code memory documentation in November 2026. These features change often, so the docs are the final word for your version.
Next, Part 11: Your setup as a kit packs everything from Parts 1 to 10 into one installable kit.
Setting up Claude Code or AI agents for your team?
I help teams build this: agents, RAG search and Claude Code setups that hold up in production.
Series
How Claude Code works
- How Claude Code worksWhere Claude runs
- How Claude Code worksSessions and forks
- How Claude Code worksSkills, hooks and subagents
- How Claude Code worksMCP servers and plugins
- How Claude Code worksPermissions and safety
- How Claude Code worksContext and cost
- How Claude Code worksSpecs as the source of truth
- How Claude Code worksContract first
- How Claude Code worksVerify against the spec
- How Claude Code worksHandoffs and memoryyou are here
- How Claude Code worksYour setup as a kit
- How Claude Code worksRolling it out