Claude Code handoff: the note to write before /clear
Before you run /clear or open a new Claude Code session in the middle of a task, ask Claude to write a handoff note, HANDOFF.md: the goal, what’s done and how it was checked, what you decided and why, what didn’t work, the files it touched, the exact next step, and anything it believed but didn’t check. Then clear, and start the new chat with “Read HANDOFF.md and go on.” /clear starts with an empty context: your CLAUDE.md and Claude’s auto memory come back, but the state of today’s task doesn’t. Below: the prompt, what goes into the note, where to keep it, and how it differs from /compact, /resume and memory.
- What /clear loses
- The prompt
- What goes into the note
- Where to keep it
- When to write one
- Handoff vs /compact, /resume and memory
- Questions
As of Claude Code v2.1.332, released November 25, 2026. The commands below are the terminal’s; the desktop app and VS Code keep their own session lists.
What /clear loses
It feels like /clear just tidies up. It doesn’t: it starts a new conversation with an empty context, and everything the session knew about the task stays in the old one.
Two things do carry over into every session: your CLAUDE.md files and Claude’s auto memory, the notes it keeps for itself in MEMORY.md (on by default in local sessions; it loads the first 200 lines or 25 KB). Neither is a record of today’s task. CLAUDE.md holds the rules you wrote. Auto memory holds your preferences, your corrections and project context, and by design Claude skips anything it can work out from the code. It also doesn’t save something every session.
So the half-done task lives only in the conversation: what you tried, why you picked one approach over another, what Claude assumed and never checked. A handoff note is the note a nurse leaves for the next shift: not the whole chart, just what the next person needs to keep going without repeating your mistakes.
The prompt I send before /clear
This is the prompt from our Instagram reel, word for word:
Before we wipe this chat, write HANDOFF.md for a new you who remembers nothing:
the goal, what's done and how you checked it,
what we decided and why, what didn't work so nobody tries it again,
the files you touched, the exact next step.
Mark anything you believed but didn't check.
Then I start clean.
Then run /clear, and send this as the first message of the new chat:
Read HANDOFF.md and go on.
The line I value most is “Mark anything you believed but didn’t check.” Without it, a guess in the old session becomes a fact in the new one.
What goes into the note
| Part | Why it’s there |
|---|---|
| The goal | The new session starts from the result you want, not from the last thing you said. |
| What’s done and how it was checked | “Tests pass” is something you can trust; “should work” isn’t. |
| What you decided and why | Without the why, the next session reopens the question and may choose differently. |
| What didn’t work | So nobody tries the same dead end again. |
| The files it touched | Where to look first instead of searching the project. |
| The exact next step | One concrete step, so the first reply is work, not a plan. |
| What’s unchecked | Assumptions marked as assumptions, so they get checked first. |
Here is what Claude wrote in the reel, for a task about exporting invoices:
Goal: export invoices to CSV, a file per month.
Done: exporter, month filter. 14 tests pass.
Decided: UTF-8 with BOM, so Excel reads it.
Didn't work: streaming the rows, ran out of memory.
Files: src/export/csv.ts, src/export/filter.ts
Next: the totals row at the bottom.
Unchecked: dates in Excel on Windows.
Short is fine. If the note runs longer than a screen, the task was probably two tasks.
Where to keep it
In the project root, as HANDOFF.md, next to the code it describes. Not in CLAUDE.md: CLAUDE.md loads into every session as standing instructions, the docs recommend keeping it under 200 lines, and a handoff goes stale the moment the next step is done.
Claude reads the note only when you ask, which is why the first message of the new chat names it. When the task is finished, delete it or let the next handoff overwrite it. Commit it only if someone else on the team will pick the task up.
When to write one
- Before
/clearin the middle of a task. The context is full of old turns, but the work isn’t done. - At the end of the day. Tomorrow’s session starts from the note instead of from your memory of where you stopped.
- Before handing the task to another session or another person. The same note works for both.
- Before a long break. Claude writes it while you step away, and you come back to a clean start.
You don’t need one when the task is finished, or when the next task has nothing to do with this one: then a plain /clear is the right move. When to clear and when to compact is in /compact vs /clear vs a new session.
Handoff vs /compact, /resume and memory
| Tool | What it does | Who decides what stays |
|---|---|---|
/compact | Summarizes the conversation in place and keeps going in it. CLAUDE.md, auto memory and up to five recent files come back after it. | Claude, unless you pass focus instructions, like /compact focus on the export bug |
/resume, claude --continue | Reopens an old conversation, the whole of it, with everything that filled the context. | Nobody: it’s all there |
| Auto memory | Notes Claude keeps across sessions: your preferences, corrections, project context it can’t get from the code. | Claude, and not every session |
| CLAUDE.md | Your standing instructions, loaded into every session. | You |
HANDOFF.md | The state of one task, written on purpose, read once by the next session. | You, through the prompt |
Personally, I compact when I’m staying in the same task and the context is getting heavy, and I write a handoff when I want a clean start but the task isn’t done. A handoff costs one prompt and gives you a context that starts almost empty.
Where Meowdoro fits
We built Meowdoro, a focus timer around the MacBook notch for people who work with Claude Code and Codex. It shows how full each session’s context is; past half by default, the mark turns orange and the break card suggests compacting. Meowdoro doesn’t write the note for you. It tells you when the moment comes, and a break is a good one: send the handoff prompt, step away, and start the next round in a clean session. Try it and tell us what’s missing.
Questions
Isn’t Claude Code’s memory supposed to remember this?
Not this part. Auto memory keeps what will be useful in future conversations, like your preferences and corrections, and skips what it can work out from the code. The state of one unfinished task isn’t what it’s for, and it doesn’t save something every session.
What’s the difference between /clear and /compact?
/clear starts a new conversation with an empty context. /compact keeps the same conversation and replaces its history with a summary. More in /compact vs /clear vs a new session.
Does /clear delete the conversation?
No. The old conversation stays, and /resume brings it back. /clear with a name, like /clear invoices, labels it in the /resume picker.
How do I resume a Claude Code session instead?
claude --continue reopens the most recent session in the current folder, claude --resume opens a picker, and /resume switches sessions from inside one. You get the whole conversation back, including everything that filled the context; a handoff gives you a clean start with only what matters.
Should I commit HANDOFF.md?
Only if someone else will continue the task. For your own sessions, keep it out of git or delete it when the task is done: it’s about today, and it goes stale.
Does this work in Codex too?
The prompt does: it asks for a file, and any agent that can write files can write it. In Codex, the new chat starts the same way, with “Read HANDOFF.md and go on.”
Related guides
What /clear, /compact and /resume do, what survives compaction, and how CLAUDE.md and auto memory load: the Claude Code documentation on commands, the context window, memory and sessions, and the changelog up to v2.1.332, read on November 28, 2026. The prompt and the example note are from our Instagram reel of November 25, 2026.