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.
The summarization happens through your configured API provider using the same model you’re already using. It leverages prompt caching to minimize costs.
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.
Different models have different context window thresholds for when auto-summarization kicks in. You can see how thresholds are determined in context-window-utils.ts.
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.
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.