Skip to main content
Code Guide
M04 Beginner Methodology

Compact vs Clear

When to summarize and when to reset the context

PDF
← All cards

The Two Commands

/compact/clear
HistoryPreserved as summaryLost
Session threadMaintainedBroken
Context freed~40-50%100%
When to useMid-taskTopic 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 freely
50-75% Be selective about loaded files
75-90% /compact now (not in a hurry)
90%+ /clear if the session is going badly
or /compact as a last resort

The 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
/compact

Claude 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
/clear

All 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

SituationCommand
Long session, same task, 75%+/compact
New topics after a dense session/clear
Verbose end of session to clean upRewind → 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.

PDF: