Skip to main content
OCT 2026 Latest guide updates. Latest: Mistral Large 4 AI FinOps Lean & AI Changelog →
M04 Beginner Methodology

Compact vs Clear

When to summarize and when to reset the context

PDF editions · Guide v3.44.1 · Updated

PDF
← All cards

The two commands

/compact/clear
HistoryReplaced by a summaryReset in the current conversation
Session threadMaintainedBroken
Context effectHistory replaced by a summary; amount variesConversation history reset
When to useMid-taskTopic change

/compact compresses without cutting the thread, /clear starts from scratch. Neither is universally better, the choice depends on the situation.

Context decisions

Use /context to inspect usage. Compact when useful history has become bulky; clear when changing topics or when a fresh conversation is more useful. No single occupancy percentage predicts response quality. Save decisions, acceptance criteria and unfinished work before either operation.

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 replaces conversation history with a summary. The space recovered and the details preserved vary; check /context and keep critical state in files.

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

The conversation starts fresh; applicable instructions are loaded again. Saved sessions remain resumable. Start with a focused prompt and the necessary context files.

”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
Bulky history, same task/compact
New topics after a dense session/clear
Verbose end of session to clean upRewind → Summarize
Useful history worth summarizing/compact
Repeated confusion, fresh start needed/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: