Starting Fresh Context vs /compact in Claude Code: When to Clear and When to Summarize
When working with Claude Code on a multi-hour engineering project, your terminal conversation inevitably inflates to 100k, 150k, or even 200k tokens. At this threshold, developers face a critical choice:
- Do you run
/compactto compress the conversation in place? - Or do you run
/clearand start a fresh context with a structured handoff?
Many engineers treat /compact as an effortless fix. In reality, choosing the wrong option can
silently burn your weekly rate limits, trigger hallucinations, and cause your agent to drop critical
implementation details.
Head-to-Head Comparison: /compact vs Fresh Context
| Dimension | Running /compact | Starting Fresh Context (/clear + Handoff) |
|---|---|---|
| Conversation History Overhead | Shrinks history to ~25k – 45k tokens (Total turn payload ~80k – 100k tokens) |
Shrinks history to ~3,000 tokens (98% drop) (Total payload ~57k tokens; 54k tools prefix is warm-cached) |
| Model Reasoning Quality | Degrades over time due to residual summary noise | Peak attention and maximum zero-shot accuracy |
| Cold-Cache Cost Trap | Severe penalty if cache has expired (re-reads 150k at 1.25×) | Zero penalty; starts clean at base token rates |
| Detail Retention | Lossy; drops line numbers, uncommitted diffs, and exact error traces | Targeted; carries forward exactly what matters (diffs, branch, next steps) |
| Cross-Tool Mobility | Locked inside that single Claude Code terminal session | Portable; can be pasted into Codex or shared with teammates |
Note on Claude Code's 54k Baseline: Every Claude Code session carries an initial ~54,000
token baseline consisting of built-in tool definitions (Bash, Edit, Artifact), active skills, MCP server
schemas, and CLAUDE.md. When you start fresh with a 3,000-token handoff, you don't pay to
re-create that 54k baseline—Anthropic reads the tool prefix directly from the warm prompt cache at a 90%
discount. You only pay to write the clean ~3k handoff note, rather than dragging 35k+ tokens of fuzzy summary
on every subsequent prompt.
1. The Lossiness of /compact
Compaction is not a lossless compression algorithm like gzip—it is an LLM summarization pass. When Claude Code condenses a 150k-token transcript into a summary, subtle details inevitably get stripped:
- Uncommitted File Modifications: Small helper utilities created three turns ago might not make the summary cut.
- Specific Edge-Case Failure Logs: The exact compiler error output or stack trace gets replaced by vague phrases like "Fixed a type mismatch in auth handler."
- Dropped Architecture Constraints: Rules previously established in the session can get diluted, leading the agent to revert to patterns you already asked it to avoid.
2. The Cold-Compaction Cost Trap
Anthropic's prompt caching provides a massive 90% discount on cache hits. But if you step away from your computer for lunch or a meeting, the cache goes cold.
The Trap: If you run /compact on an expired session, Claude must re-read all
150,000 tokens at full cache-creation rates (1.25× input cost) just to generate the summary. That
single command can consume 5% to 7% of your 5-hour limit and burn through your weekly quota.
3. The Golden Rules: When to Use Which
When to Use /compact:
- Mid-Task Flow: You are actively in the middle of a complex, multi-file refactor and cannot stop.
- The Cache is Warm: You have been typing continuously and the session has been idle for less than 5 minutes.
- Always Specify Focus: Never run bare
/compact. Always provide guidance:/compact focus on the SQLite migrations and GRDB queries.
When to Start Fresh (/clear + Handoff):
- After Any Break: When returning to work in the morning or after lunch when the prompt cache has expired.
- After a Git Milestone: You just committed code. The exploratory trial-and-error logs are obsolete—clean the slate.
- When the Agent Starts Looping: If Claude repeats a failed test fix or hallucinates, the context is "poisoned." A fresh context resets its reasoning engine completely.
How L2Cache Automates This Decision
L2Cache eliminates the guesswork with its built-in Cold-Resume Guard:
- When you resume an idle session in your terminal, L2Cache intercepts the command before network submission.
- If the session is cold, it alerts you to the token penalty and prevents you from accidentally burning your limit on a cold compaction.
- With one click, L2Cache generates a structured Session Handoff—compressing your current git
diff, active branch, and unfinished goals into ~3,000 tokens so you can run
/clearand continue seamlessly.
Never burn an expired cache or suffer from context degradation again.
Download L2Cache on Mac App Store