~/blog / claude-code-compact-handoff.md
Claude compact vs. handoff: the decision tree for long sessions
TL;DR: Long sessions rot. Claude gets slow, repetitive, and sloppy not because the model broke but because the conversation bloated, and there are four ways out: rewind, compact, handoff, or subagent. Picking wrong is where most people burn time and money, because each move loses something different – compact keeps your decisions and drops the specifics, handoff keeps what happened but loses the background it grew out of, a subagent comes back with only the answer. Here’s the decision tree I actually use.
What is context rot?
Context rot is the drift where Claude starts repeating itself, editing files without reading them, and forgetting things it wrote an hour ago – not because the model broke, but because the conversation got too long. Everything you and Claude have said in a session sits in the context window – the model’s working memory for this one conversation. Every new message gets processed against all of it, so as a session grows, the model’s attention spreads thinner across more material.
The model didn’t get dumber. The session got heavier. And since every turn re-reads the whole conversation, a bloated session also costs more per message while producing worse output – the cost side of this is part of What I actually pay for AI.
How do you keep a Claude session going? The five moves
– Continue – keep talking in the same session. Cheapest per turn while the cache is warm (the fast re-read of what the model has already seen), but costs grow because every message re-processes the whole history. – Rewind – jump back to an earlier point in the conversation and drop everything after it. This kills failed attempts and broken code that would otherwise pollute every future turn. In Claude Code: double-tap Esc. – Compact – ask Claude to summarize the session and replace the history with the summary. Decisions and shape survive; specifics go. In Claude Code: `/compact`, and manual beats automatic – more on that below. – Handoff – have the session write a durable summary of where things stand, close it, open a fresh one, and point the new one at the file. This is what I do at the end of a working day. – Subagent – spawn a separate fresh Claude with one tight task, and it comes back with only the answer. Not a session-management move at all; it’s a different-job move that happens to keep your main session clean as a side effect.
Rewind and compact work inside a session. Handoff works between sessions. The subagent is its own category, and confusing it with the other four is how it gets misused.
Compact, handoff, or fresh session: how do you choose?
The choice comes down to three questions, asked in order, the moment Claude starts drifting.
One: do I still need the whole conversation? If yes, don’t move – rewind out the failed detours and keep going. If no, move.
Two: what am I willing to lose? Willing to lose the specifics but keep the decisions – compact. That fits sessions that were about reaching a conclusion, not about the material itself. Willing to lose the model’s momentum but keep the facts in a form I can read too – handoff. That fits work I’ll return to and want an audit trail for. Willing to lose everything except the answer – subagent. That fits sub-tasks that never needed the main session’s context in the first place: research this, summarize that, come back with three bullet points.
Three: when am I coming back? Later today – compact usually wins, because the cache stays warm within the hour. Tomorrow or later – handoff, because the cache expires overnight and a fresh session reading your written summary beats reanimating a stale one.
What do you lose when you hand off a session?
Here’s the thing nobody warns you about, and it’s the reason this post exists: a handoff preserves what happened and what you decided, but it doesn’t preserve everything.
When I open a fresh session with a handoff document, the new Claude reads a chronicle of what happened. It doesn’t inherit the background – why it happened, how it happened, all the context that built up over the hours where it happened. That information doesn’t compress into a text file. It only exists inside a living session, and it’s lost the moment you hand off.
And there’s another layer behind what happened, and it’s the one that sometimes hurts: the atmosphere. The groove of a session that has read everything in order, with you reacting – the moment where it’s finally getting you and you’re getting things done. That layer does not transfer. Ever. No template fixes it; the handoff note is the score, not the recording.
That’s why I don’t hand off every session. In the middle of a hard call, if the atmosphere is right and we’re getting things done, I keep the session alive – there’s real value in that atmosphere, and you lose it the moment you hand over to a fresh session. At a natural break point, where the next work is more or less specified, I hand off cleanly. Same tool. Different move for a different moment.
How do you resume a Claude session the next day?
Resume with the handoff file, not from zero. I open a fresh session and point it at the file – “read this and get started” – or paste it in. Then I watch the first few responses to make sure it’s on track. Most of the time it is, and things get going just fine.
Two honest details about how this actually runs. I don’t write the handoff files – I ask the session to write them, and I don’t read them afterward. I trust that they’re correct; the check I do run is asking before I close: did you include everything? Make sure everything got saved.
And the handoff file isn’t carrying the whole load, because I’m saving files all along. Decisions, information, a log that gets updated as we work – the important points live in my wiki, not only in the chat. That’s why forgetting a handoff isn’t fatal, and why often I don’t write one at all: I open a session with “where was I on this?”, Claude reads the log, and picks it up from there. (What belongs in permanent memory, as opposed to these per-session notes, is its own post: How to give Claude lasting memory of your work.)
Why do Claude handoffs fail?
Handoffs fail when a vital piece of information didn’t make it into the note – and you usually find out fast. You ask, you get a couple of answers you’re just not satisfied with, and it’s just not right.
Here’s one of mine that went wrong. My context window kept getting fuller, and we were nearing the end of a strategy piece – the part where we were finally supposed to write the thing – so I thought: I’d better hand off. I did. In the new session, the responses were immediately wrong. I was tired, I just needed this final part to work, and asking a few more times went nowhere. So I went back to the old session and said, more or less: that new session is not helping me at all – can you write me a new prompt, or can we just solve this here? Claude looked at the problem, looked at what it would probably take to solve it, and said: we have enough space, let’s fix it here. The atmosphere was there. It solved what we needed in no time at all.
That’s the lesson: handoffs sometimes fail because something important got missed, and it’s okay to go back. If the old session’s memory is still warm, going back is the right move. And if you really did lose the context, it’s not gone – the full chats are kept, even the parts scrolled out of view. You can give a new session access to the old one, search it, and pull out what was decided after the fact.
When should you compact in Claude Code?
While the session is still healthy – I start wrapping up around 50% of the context window, which leaves me a buffer if I need to go back. The single most common mistake is waiting for Claude Code to compact automatically. Auto-compact fires when the window is nearly full – which is exactly when attention is thinnest, retrieval is worst, and edit-without-reading behavior peaks. The summary gets compressed from the rotted state, not from your session’s clean thinking, and you’ve already worn the session down getting there.
The same rule governs handoffs: the note has to be written by a session that’s still sharp and remembers everything, before it gets tired and lazy. A handoff written at 95% capacity is authored by exactly the degraded session you’re trying to escape. I used to think getting twitchy around the halfway mark was anxiety. It’s policy.
And one lever shrinks every one of these losses at once: whatever you’ve already written into files is immune. The summary – machine’s or yours – only has to carry what the files don’t. A session that saves its decisions as it goes compacts almost painlessly; a session that kept everything in the chat loses exactly that much. Ask mid-session: “is this saved, or does it only exist in this chat?”
If you do one thing this week
Write a handoff at the end of your next real AI working session. Five lines is enough: where you started, what you decided, what’s still open, which file names matter, what to pick up next. Use it the next morning. Once you’ve done that once, the rest of the decision tree makes sense from the inside – and if you want help wiring this into your team’s setup, that’s Work with me.
[Standard newsletter block: A letter every week or so on what I built, what broke, and what I’d tell you to try. No hype, ever. → Subscribe]
Choices note:
– REVISED 2026-07-07 (from Julie’s dictated review — the big one): (1) H1 → “Claude compact vs. handoff: the decision tree for long sessions” per her ask for more keyword words. (2) “Screenshot those three questions. That’s the post.” CUT (read as a mistake). (3) The judgment thesis is OUT — her ruling: “I’m making shit up about judgment and I really shouldn’t.” Section retitled “What do you lose when you hand off a session?” (compact removed from the heading — compact is covered later) and rebuilt on her telling: chronicle vs. background, the atmosphere layer, keep-the-session-alive-when-the-atmosphere-is-right. Co-created-groove consolation cut (she skipped it). TL;DR aligned. The remaining review marker is resolved by removal. (4) Resume section rebuilt: point-the-agent-at-the-file, no restate-the-plan ritual, she doesn’t write or read handoff files (asks the session to write them; “did you include everything?”), wiki-saves-files-all-along means skipping the handoff isn’t fatal (“where was I on this?” + log). (5) Handoff-failure section rebuilt on her real story (strategy piece, tired, went back, “can we just solve this here?”); “one owner at a time” and “disaster is a diagnostic” laws CUT (her call: “I don’t like that. That’s not true.”); added the recover-from-old-chats option. Post-07 parallel-session link dropped with it. (6) Compact section: wrap up ~50% with a buffer (was 60–70%); “same physics, same losses” cut; “still sharp and remembers everything, before it gets tired and lazy” per her wording. Fact-check flag for publish pass: exact auto-compact trigger threshold softened to “when the window is nearly full” — verify against current Claude Code docs before publish. – SEO heading retrofit 2026-07-07 (Julie’s call): all body H2s rewritten to search-shaped questions (“What is context rot?”, “When should you compact in Claude Code?”, etc.); lift sentences adjusted to answer the new headings. Prose otherwise untouched. – Plain-language definitions check (per brief): context window, context rot, cache, all five moves defined at first appearance, inline rather than as a glossary – they read as part of the argument, not as condescension. – Thesis placement check: “handoffs preserve facts, lose judgment” gets its own section with the facts/judgment definition pair – it’s the intellectual center, not a list bullet. – Decision-tree copyability: rendered as three bolded questions in prose with a “screenshot those three questions” cue – no diagram needed at screenshot resolution. – Tool framing: Claude Code named as the implementation (Esc double-tap, `/compact`) with the moves framed portably – per the brief’s Pillar 2 mapping, Claude-Code-specific is acceptable; the 4th marker from the brief is resolved that way rather than re-asked. – CORRECTED 2026-07-06 late (queue item 4, Julie’s call): the read-it-myself beat dropped and inverted honestly — “I never read the handoff file. I just trust that it works.” The warm-up-as-test ritual stays (she judges the session’s restatement, not the file). Marker resolved. – REVISED 2026-07-06 (Fable, from Julie’s live dictation — source: briefs/17-handoff-notes-2026-07-06.md): third layer (atmosphere) added under the thesis with the co-created-groove consolation; resume section upgraded to the warm-up-as-test ritual; “A real handoff” fill RESOLVED with her actual failed-handoff rescue story + the two laws (one owner at a time; the disaster is a diagnostic); gotcha section extended (compact = self-handoff, note-written-while-sharp / halfway-twitch-is-policy, files-immunity lever + “is this saved?” prompt). Body now ~1,600 words (was ~1,290; cornerstone earns it — new receipts are lived). – Markers for Julie (1 remaining): the load-bearing thesis wording (annotated: independently ratified in dictation 2026-07-06, confirm on read). – Register compliance: parallel-session story referenced in one sentence with link, not re-anchored (register: post 07). Subagent kept distinct from session management per brief. – Links: posts 08 (cost), 01 (permanent memory), 07 (collision story), work-with-me in the starter close. Placeholder hrefs pending slug pass. – Length: body ~1,290 words, inside the 1,200–1,400 target – receipt-derived targets keep working. – SEO meta (for seo-meta.md): title tag “Claude Code: compact, handoff, or fresh session?” (49 chars). Meta description: “Long AI sessions rot. The decision tree for compact vs handoff vs subagent – what each move preserves, what it loses, and the auto-compact trap.” (144 chars)
The newsletter
If this was useful
The newsletter is where I send what I learn next – a letter every week or so on what I built, what broke, and what I’d tell you to try. No hype, ever.
Double opt-in · unsubscribe anytime · GDPR-compliant

I’m a scientist by training and a science writer by profession: chemistry and biology, 14 years at the lab bench, 8 peer-reviewed papers, and regulated biotech and pharma clients since 2011 – work where being wrong has consequences. For the last three years I’ve used AI on that real work, and here I document what actually happened: what worked, what broke, and what I’d tell you to try next. My best tip: if I can do it, you can do it.
