← sources

Claude Code workflow: why /compact after a break costs so much, and the handoff-file routine I use instead

source: reddit (reddit:ClaudeAI)published 2026-10-21 12:46ingested 2026-10-22 02:37

retained text

I keep seeing "I ran /compact and lost 11%" or "I typed continue after a break and jumped to 40%." I went through the Claude Code docs to understand why. It comes down to the prompt cache.

- Every turn resends the whole conversation. A warm cache bills that prefix at a fraction of the input price (a cache read on Opus 5.5 is 0.05x base input).
- Claude Code's main conversation gets a 1-hour cache on a subscription within plan usage, 5 minutes on usage credits or an API key. A 5-hour limit window outlives either one.
- `/compact` sends your full history one more time so the model can summarize it. That's cheap while the cache is warm, but after a break the docs say it "reprocesses the full history as uncached input." The cost page also says: "When you want a fresh start instead of continuity, /clear costs nothing."

What I do now:

1. Before I step away, while the cache is still warm, I have Claude write a short HANDOFF.md: goal, state, decisions and why, what was ruled out, next step, files that matter, how to verify.
2. `/clear`, then start the next session with "read HANDOFF.md and continue from Next step."
3. I only compact mid-task, at a natural break, with a focus (`/compact keep the failing test names`). `/rewind` beats compacting when I want to abandon a path, because it goes back to an already-cached prefix.
4. `/usage` shows whether the cache is warm or cold right now (v2.1.251+), so I check it before deciding.
5. If you'd rather hand off than have an idle session auto-compact, there's `idleCompaction: false` (v2.1.290+).

For multi-day work I split tasks into tickets that each fit in one fresh session, with a progress file per ticket.

I wrote the whole thing up with a copy-paste HANDOFF.md template and the cost arithmetic: https://medium.com/@r3dtuxedo/compact-clear-or-hand-off-running-long-agent-sessions-without-burning-your-limit-21c26def6bae

(Disclosure: I wrote the article. Nothing paid, no referral links.)

document fetched 2026-10-22 00:23 · canonical https://reddit.com/r/ClaudeAI/comments/1xbm6yw/claude_code_workflow_why_compact_after_a_break