New: tool-result-age strategy
Tool results are 45% of session size but decay in value exponentially. A file read from 50 turns ago is stale — the file has been edited 12 times since. Keeping it wastes tokens AND degrades Claude's performance.
Three-tier age-based compaction:
| Age | Action | Savings |
|---|---|---|
| Recent (0-15 turns) | Untouched | 0% |
| Mid-age (15-40 turns) | JSON minified, diff context collapsed | 30-40% |
| Old (40+ turns) | Replaced with stub: [cozempic: Read /path — 150 lines, 4.2KB]
| ~95% |
Claude can always re-read any file it needs. Validated by JetBrains on SWE-bench: observation masking matched LLM summarization quality at zero compute cost.
Combined impact: On a typical 60-turn session with 200+ tool calls, expect ~30% additional session reduction on top of existing strategies.
Stats
- 18 strategies (was 17)
- 283 tests (was 273)
- Standard prescription: 11 strategies
- Aggressive prescription: 18 strategies
Install / Upgrade
pip install --upgrade cozempic