thiagowfx's avatar

¬ just serendipity 🍀 (not just serendipity)

claude: compact context

• 94 words • 1 min • updated

⚠️ This post is over one year old. It may no longer be up to date or relevant. Opinions may have changed.

These days, Claude Code warns you when you’re running out of context:

Context left until auto-compact: 5%

How Auto-Compact Works

When your conversation approaches the context window limit, Claude Code automatically:

  1. Analyzes the conversation to identify key information worth preserving
  1. Creates a concise summary of previous interactions, decisions, and code changes
  1. Compacts the conversation by replacing old messages with the summary
  1. Continues seamlessly with the preserved context

It’s possible to run /compact manually to compact the context sooner1. ∎


  1. Let the machine do the garbage collection though! Why would you bother to do so manually? ↩︎