
How It Works
Cline monitors token usage during your conversation. When you’re getting close to the limit, he:- Creates a comprehensive summary of everything that’s happened
- Preserves all the technical details, code changes, and decisions
- Replaces the conversation history with the summary
- Continues exactly where he left off
Why This Matters
Previously, Cline would truncate older messages when hitting context limits. This meant losing important context from earlier in the conversation. Now with summarization:- All technical decisions and code patterns are preserved
- File changes and project context remain intact
- Cline remembers everything he’s done
- You can work on much larger projects without interruption
Context Summarization synergizes beautifully with Focus Chain. When Focus Chain is enabled, todo lists persist across summarizations. This means Cline can work on long-horizon tasks that span multiple context windows while staying on track with the todo list guiding him through each reset.
Technical Details
The summarization happens through your configured API provider using the same model you’re already using. It leverages prompt caching to minimize costs.- Cline uses a summarization prompt to request a summary of the conversation.
- Once the summary is generated, Cline replaces the conversation history with a continuation prompt that asks Cline to keep working and provides the summary as context.
Cost Considerations
Summarization leverages your existing prompt cache from the conversation, so it costs about the same as any other tool call. Since most input tokens are already cached, you’re primarily paying for the summary generation (output tokens), making it very cost-effective.Restoring Context with Checkpoints
You can use checkpoints to restore your task state from before a summarization occurred. This means you never truly lose context - you can always roll back to previous versions of your conversation.Editing a message before a summarization tool call will work similarly to a checkpoint, allowing you to restore the conversation to that point.
Next Generation Model Support
Auto Compact uses advanced LLM-based summarization which we’ve found works significantly better for next-generation models. We currently support this feature for the following models:- Claude 4 series
- Gemini 2.5 series
- GPT-5
- Grok 4
When using other models, Cline automatically falls back to the standard rule-based context truncation method, even if Auto Compact is enabled in settings.