Research
Current compaction triggers at compaction_threshold = 0.80. Industry best practices recommend:
- Soft compaction at 70%: apply deferred tool summaries, compress old tool outputs (10:1+ ratio)
- Hard compaction at 90%: aggressive summarization, strip recoverable content
- Different compression ratios per content type: conversation (3:1-5:1) vs tool outputs (10:1-20:1)
Current state: deferred_apply_threshold = 0.70 already exists, but compaction itself is single-threshold and not type-aware.
Proposal
- Add per-category compression targets (conversation vs tool output vs retrieved context)
- Strip recoverable information during compaction (file contents agent can re-fetch)
- Make summarization aggressiveness increase with message age
Sources
Research
Current compaction triggers at compaction_threshold = 0.80. Industry best practices recommend:
Current state: deferred_apply_threshold = 0.70 already exists, but compaction itself is single-threshold and not type-aware.
Proposal
Sources