The Two Commands
/compact | /clear | |
|---|---|---|
| History | Preserved as summary | Lost |
| Session thread | Maintained | Broken |
| Context freed | ~40-50% | 100% |
| When to use | Mid-task | Topic change |
The fundamental distinction: /compact compresses without cutting the thread, /clear starts from scratch. Neither is universally better, the choice depends on the situation.
Context Zones
0-50% Work freely50-75% Be selective about loaded files75-90% /compact now (not in a hurry)90%+ /clear if the session is going badly or /compact as a last resortThe classic mistake: waiting until 90% to run /compact. At that point, Claude starts forgetting instructions and response quality drops. 75% is the right threshold.
When to Use /compact
Ideal situations:
- Task in progress with useful historical context
- Long session on the same module or feature
- You need to remember decisions made
/compactClaude summarizes the history, preserves critical elements, and frees 40-50% of used context. The summary becomes the new “session memory”.
When to Use /clear
Ideal situations:
- Complete change of topic or project
- Context polluted by many errors and failed attempts
- Session going badly, generating inconsistencies
/clearAll context is erased. Start over with a focused prompt and the minimal necessary context file.
”Summarize from Here”: The Third Option
Via /rewind (or Esc + Esc), you can select a specific point in the history and choose “Summarize from here”. Claude summarizes only from that point, keeping prior context intact.
Esc + Esc → select a checkpoint → "Summarize from here"More precise than global /compact, useful when only the end of the session is verbose.
Quick Comparison
| Situation | Command |
|---|---|
| Long session, same task, 75%+ | /compact |
| New topics after a dense session | /clear |
| Verbose end of session to clean up | Rewind → Summarize |
| Context 70-90%, task in progress | /compact |
| Context 90%+, session going badly | /clear |
What /compact Does NOT Preserve
The summary generated by /compact is a synthesis. It may simplify technical nuances or implicit decisions. After a compact, verify that critical elements are still accessible before continuing a complex implementation.
Enter your email to read the full card and get the complete PDF bundle.
All content is free and open-source. We just ask for your email.