Compaction or a Fresh Session?
Both reset the window. They lose very different things
What each one does
Compaction summarises the conversation so far and continues with the summary in place of the history. Continuity is preserved; detail is lost, and you do not choose which detail.
A fresh session starts empty. Nothing is preserved except what you deliberately carry over.
The difference that matters: compaction decides for you what was important. A fresh session makes you decide, which is worse when you are in flow, and better when you are stuck.
When to compact
- You are mid-task and the thread genuinely matters
- The remaining work is a continuation, not a new direction
- The conversation holds decisions that are not written down anywhere else
When to start fresh
- The task changed. New feature, new bug, new area of the codebase. Old context is now pure cost.
- You are going in circles. Compaction preserves a confused thread. If the model has misunderstood something structural, summarising the misunderstanding carries it forward. Starting over removes it.
- Answers are getting vaguer. A reliable sign that signal has drowned in noise.
- You have compacted twice already. A summary of a summary keeps very little. That is the point to write things down properly and restart.
The handoff that makes fresh sessions cheap
The reason people avoid restarting is losing their place. Solve it by writing state to a file rather than keeping it in the conversation:
# notes/current-task.md ## Goal Migrate the billing service off the legacy parser. ## Established - Legacy parser lives at src/legacy/parse.ts:1-340 - Only two callers: billing.ts:88 and reports.ts:210 - The new parser handles all cases except multi-currency (issue #412) ## Next Wire billing.ts:88 to the new parser, keep the legacy path behind a flag until #412 lands. ## Do not Touch reports.ts yet: it has its own test gap.
Then a fresh session starts with: *"Read notes/current-task.md and continue."* That costs a few hundred tokens and carries more usable state than a compaction of fifty turns.
What compaction reliably loses
Worth knowing before you rely on it:
- Exact code you looked at. Summaries keep conclusions, not line numbers.
- Things you rejected. "We tried X and it didn't work" often does not survive, so the agent proposes X again.
- Precise constraints. "Don't touch the auth module" becomes "be careful with auth", which is not the same instruction.
If any of those matter, write them down before compacting.
A working rhythm
- Start a session with a clear, bounded goal
- When the goal is met, write what you learned to a file
- Start fresh for the next goal
- Compact only when a single goal genuinely outgrows the window
Sessions are cheap. The instinct to keep one alive all day is a habit from chat interfaces, and it is expensive in both money and answer quality.
See also: Context Management & Compaction · What Actually Fills a Context Window