Skip to content
zeeshare.com

writing / FDE and agents

How Claude Code works

How Claude Code worksPart 10

Handoffs and memory

On this page
  1. A new shift every session
  2. The handoff note
  3. Decision records
  4. The Acme storefront, step by step
  5. Where this fits in the bigger picture
  6. Which one fits?
  7. Your setup so far
  8. Three rules of thumb

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.

Claude Standing rules Project files in git Auto memory Decisions You

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?”

Fridge rules · CLAUDE.md

What is always true. Shared in git, read at the start of every session.

Your sticky note · CLAUDE.local.md

Your own preferences for this project. Kept out of git.

Claude's own notebook · auto memory

Notes Claude writes for itself as it learns your project. On this machine only. /memory opens it.

The job board · tasks.md

Which tasks are done, which are next, and what blocks them. In git, next to the spec.

The logbook · handoff and changelog

What happened this session and what to do first next time. Short, dated, in git.

The decision file · ADRs

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.md and CLAUDE.local.md it finds, plus your user file ~/.claude/CLAUDE.md.
  • Rules in .claude/rules/ without a paths list load at the start too. Rules with paths load when a matching file is read.
  • A CLAUDE.md can 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 its MEMORY.md load at the start; topic files load when needed. It stays on this machine.
  • /memory lists the loaded files, toggles auto memory and opens its folder. Everything is plain markdown you can edit or delete.

The handoff note

No notes new session re-reads half the code redoes a settled choice Read the logbook new session reads handoff + tasks starts on T4 The notes are files in git, so any session, on any machine, finds the same truth.
A night shift that reads the handover note starts working. One that does not, starts guessing.

Keep it short, put it next to the spec, and overwrite it each session so it is always current. History lives in git.

specs/012-gift-cards/handoff.md
# 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.
Five minutes to write, and the next session starts on the right task with the right decisions.

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.

docs/adr/0007-gift-card-after-coupon.md
# 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.
A decision with its reason. Next month, nobody has to argue it again.

The Acme storefront, step by step

  1. 1 · Teach the routine once

    A line in CLAUDE.md makes 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. 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. 3 · Decisions get a file

    Any choice someone might question later goes into an ADR. Spec-Kit Plus has /adr for this.

    > Write an ADR for applying gift cards after coupons.
  4. 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. 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

your setup so far · parts 1 to 10
  1. Part 1 · where it worksYou know which machine does what, and which folders Claude can reach.
  2. Part 2 · what it remembersOne task per notebook; photocopies in their own folder; helpers for noisy side jobs.
  3. Part 3 · how it behavesFridge rules for what is always true, recipe cards for procedures, alarms for musts, specialists for checks.
  4. Part 4 · what it can reachPhone lines to your tracker and tools, checked before trusted; your setup packed as one toolbox.
  5. Part 5 · what it may doKeys for routine work, a knock for anything that publishes, locked doors for secrets.
  6. Part 6 · how it stays sharpA clear desk: fresh sessions, focused summaries, helpers for big reads, rules only where they apply.
  7. Part 7 · what it builds fromA written spec with acceptance criteria, rules with IDs, and a plan agreed before code.
  8. Part 8 · how it avoids guessingContract first: generated types are the only truth, and a hook makes Claude state the facts.
  9. Part 9 · how it proves the workOne verify command, reviewers in parallel, and evidence before anything is called done.
  10. Part 10 · how it hands overA tracker, a changelog and decision records that keep the next session on the truth.
  11. NextPart 11 · your setup as a kit

Three rules of thumb

Write it where the next one looks

Decisions go in files next to the spec, not in a chat that ends tonight.

Decide once

An ADR turns a long debate into one paragraph that settles it.

Prune the notebook

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: @path in 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.

See services
Next in this seriesHow Claude Code worksYour setup as a kit4 min read