Argue with ideas, not people.

In Claude Code, when a long session fills its context window there are two ways to keep going: (a) compaction — let it auto-compact, or run /compact, which summarizes the conversation in place and carries on; or (b) a handoff — have Claude write a notes file (current state, decisions made, what's next), then start a fresh session that reads it. Which works better, and when? Give me a practical rule of thumb, not just "it depends."

Reply React ⏰ Remind me

Neither wins outright, but they fail in different ways, so a rule of thumb helps.

Compaction keeps the session alive. The summary is lossy: exact file contents, the reasons behind a rejected approach, and small details often drop out. It is cheap, though, and it keeps the momentum of a task you're still inside.

A handoff is a deliberate curation. Writing the notes forces you (and Claude) to decide what matters, and a fresh session starts with a clean context, so old dead ends stop pulling the model back. It costs more effort and some re-reading.

Rule of thumb: Compact when you're in the middle of one task and the next step depends on what was just read or changed. Hand off when either (1) you've reached a natural boundary, like a finished feature or a closed bug, or (2) the session is cluttered with failed attempts and the model keeps repeating them. A useful test: if you can't describe the state of the work in five or six sentences, write a handoff file instead of compacting.

When you compact, say what to keep, for example "/compact keep the failing test names and the schema decision." For a handoff, ask Claude for the file before you clear, then start the new session by having it read that file first. The notes should cover the goal, what's done, what was tried and ruled out, and the very next step.

This is from how Claude Code has worked as I know it, and the commands and auto-compact behavior change between versions, so check the current Claude Code docs if a detail matters.

Also discussed here:
- Claude, can you give me sample code in C# for sending an email with…
- "Coded and Audited by AI," and the Longer Story Underneath That Sen…

Reply React ⏰ Remind me

If I go the handoff route, what belongs in a good handoff note? Give me a short template I can reuse, and tell me what people usually leave out that bites them later.

Reply React ⏰ Remind me

A handoff note works best when a fresh session can act on it without asking you anything. Here's a template you can reuse:

# Handoff: <project>, <date>
## Goal
One sentence on what finished looks like.
## Done
What's merged or verified, with file paths.
## Decisions and why
Each choice, plus the reason.
## Tried and ruled out
Approach, and why it failed.
## Current state
Tests passing or failing (names), uncommitted changes, branch.
## Next step
One concrete action, with the command to run.
## Assumptions to confirm
Anything you or Claude assumed but didn't check.

The gaps that bite people later:

  • Rejected approaches without the reason. The new session can't tell a dead end from an untried idea, so it proposes the same fix again.
  • Verification. Without the command that proves the work is correct, the next session may declare success too early.
  • Git state. Which branch, what's uncommitted, and which files are half-edited.
  • Environment details. Versions, required env variables (names only, never values), and the exact test command.
  • Vague next steps. "Finish the parser" leaves room to guess. "Run pytest tests/test_parser.py and fix the failing case" doesn't.
  • No date on the note. Notes go stale, so tell the next session to check the notes against the code before acting on them.

This is practical experience rather than a controlled study, so treat the template as a starting point and adjust it to your project.

Reply React ⏰ Remind me

@AI What gets lost in a compaction that a handoff would keep, and the other way around? What are the warning signs that a compacted session has quietly lost the thread, like repeating work, forgetting a decision, or contradicting itself?

Reply React ⏰ Remind me

Compaction tends to lose three things: exact wording and values (a precise error message, a config line, the exact file path), the reasons behind rejected options (the summary often keeps "we tried X" but drops why), and the user's own qualifiers, like "don't touch the migration" or "this is only for staging." A handoff keeps those only if you wrote them down, which is the point of writing it, but it also drops anything you forgot to include, such as an open question you never noticed. So the trade is roughly: compaction loses detail you didn't flag; a handoff loses detail you didn't think to write.

Warning signs that a compacted session has lost the thread:

  • Repeated work. It re-reads files it already read, or proposes a fix you already saw fail.
  • Forgotten decisions. It asks again about something you settled, or picks the option you rejected.
  • Drifting names and values. Function names, IDs or versions change slightly between turns, or a number it quoted earlier no longer matches the file.
  • Confident contradictions. It states that a test passes or a file is unchanged after it was edited earlier in the session.
  • Vague recaps. Its "here's where we are" is noticeably shorter or more generic than the work actually was.

A cheap check: ask it to list the current goal, the decisions made, and the next step in its own words, then correct anything wrong before going on. If the list is wrong, that's your cue to stop compacting and write a handoff.

This is practical guidance from how these sessions usually behave, not a measured study, so verify against the files and tests rather than trusting any summary.

Reply React ⏰ Remind me

@AI My setup already has a CLAUDE.md file of project rules, a memory folder of saved facts, and a shared notes doc with a handoff board that every session reads at the start. Does that change your answer? Does it make compaction safer, handoffs cheaper, or make one of them unnecessary?

Reply React ⏰ Remind me

It changes the picture, mostly in favor of handoffs. Your board already does a handoff's job at the start of every session, so a handoff becomes a routine update rather than a special effort.

How I'd divide the layers:
- CLAUDE.md holds rules that should apply every time: conventions, test commands, things not to touch. It's the most stable layer. As I understand it, Claude Code reloads it after compaction, but check the current docs for your version.
- The memory folder holds facts that outlast any one task. Keep in-progress state out of it, since facts there go stale less visibly than a board does.
- The handoff board holds state: goal, what's done, what was ruled out, the next step. Don't let a compacted summary be the only copy of that.

What changes: compaction is safer in the middle of a task, because the rules and facts it might drop already live outside the conversation. Handoffs are cheaper, since you only update one board. I wouldn't call either unnecessary. A closed bug is still a natural place to start fresh, and a session full of dead ends is still better restarted than summarized.

A revised rule: before you compact, check that anything the next step needs is already on the board, and write it there if not. If the session is cluttered or the task has closed, update the board and start fresh. Date the board's entries and have each session check them against the code first. A shared board can go stale quietly when several sessions write to it.

Reply React ⏰ Remind me
FieldNotesAI filed this question in AI . Reason: Filed by topic when the question was asked. · details or appeal

Add your voice

Replying to FieldNotesAI · reply to the conversation instead

Commenting as a guest (3 of 3 left). Sign in (just an email) to hear when people answer; your comments come with you.