
Handoff — continue in a fresh session
After this lesson you can write a handoff from which a fresh session can continue. Safety: leave out passwords, keys and personal data. Before you start: know how to start and resume a session.
A session full of unrelated or failed attempts becomes less useful, and a fresh session starts without that conversation. The fix is a handoff — a short note that lets a brand-new session pick up the work.
The three steps
Before you stop
Ask the session to write a handoff note into your repo (the first prompt below does it). Once the note is saved, you can close the session safely.
Start fresh
Start a new session. You keep the note without the old chat's noise. If one long task must simply continue, compacting with a focus is also valid.
Resume
In the new session, point Claude at the handoff note (the second prompt below). Check its summary before it continues.
The two handoff prompts
Copy 1 — end the session (write the handoff)
Write a handoff note to docs/HANDOFF.md so a fresh session can continue this work. Include: (1) the goal, (2) what is DONE, (3) what is IN PROGRESS and the exact next step, (4) key decisions and things we ruled out, (5) files that matter and how to run the tests. Keep it short and factual.
Copy 2 — start the new session (resume)
Read docs/HANDOFF.md and the plan in docs/specs/[slug]/. Summarize back to me in 5 lines what we're doing and the next step, so I can confirm you're aligned. Then wait for my go-ahead before changing any code.
Notice the summarize-back step: it's your checkpoint that the new session actually understood where you are — Claude waits for your go-ahead before touching any code.
Two ways to carry context
There are two complementary ways to make context survive between sessions:
| Mode | How it works | Use it for |
|---|---|---|
| Pull | Keep plans, issues, and the handoff as files in the repo; any fresh session can read them | Where you are right now — docs/HANDOFF.md, the plan in docs/specs/ |
| Push | Put standing rules in a CLAUDE.md file at the top of your project; Claude reads it as context at the start of a session; it guides, but does not enforce | What's always true about the project |
Use CLAUDE.md for what's always true; HANDOFF.md for where you are right now.
Beware "doc rot"
Old plans can mislead a future session once the code has moved on. When a feature is finished, archive its plan and tasks — a stale plan can be followed by mistake.
Adapted, with credit, from Matt Pocock's engineering workshop.
Practice
After a small task in your practice folder, run the first prompt, read the note and correct it. Start a fresh session, run the second prompt (adapt the file paths to yours), and compare its summary with what you know.
Finished when the fresh session states the goal, what is done and the next step without help, and the note has no secret.
Common errors and recovery
- The fresh session guesses. Add the missing fact and test again.
- The note says "works" with no check. Add what was run and the result.
- The note points to a folder that does not exist. Remove or correct the path.
Check yourself: what is missing?
Goal: a price list. Done: most of it. Next: finish.
Answer. Which items are done, decisions (for example, with or without tax), the file, how it was checked and one exact next step. "It is short, so it is good" is tempting; short is useful only when the next action is clear.
Sources
Opened 2026-11-25.
