CLI Flags
Strategy
| Strategy | Description | Best For |
|---|---|---|
smart | Intelligent combination | General use |
truncate | Remove oldest messages | Fast, simple |
sliding_window | Keep recent N messages | Conversation flow |
summarize | Compress old messages | Context preservation |
prune_tools | Truncate tool outputs | Tool-heavy workflows |
Auto-Compaction
Threshold
Interactive Commands
Manual Compaction
View Optimization History
View Current Config
Environment Variables
config.yaml
Strategy Details
Smart (Recommended)
Combines multiple strategies intelligently:- First tries non-destructive pruning
- Falls back to sliding window
- Uses truncation as last resort

