v2.9.0: Token Optimization — Smart Truncation
Token Consumption Report
| Operation | Current | After 6 months |
|---|---|---|
| boot.js (full) | ~854 tokens | ~5900 ❌ |
| boot.js (default, max-chars=1500) | ~520 | ~372 ✅ |
| search --max 3 | ~251 | ~251 |
| write --today | ~21 | ~21 |
| Typical session (boot + 5 writes + 3 searches) | ~1176 | ~1176 ✅ |
| vs. reading all daily files | ~7928 | ~50000+ |
Optimizations
- Smart MEMORY.md truncation: When MEMORY.md exceeds
--max-chars(default 1500), outputs all section headers + most recent entries per section. Saves 94% tokens at 18KB file size. - Keyword-context search: Truncates around the matching keyword instead of from the start — shows the most relevant snippet.
- Controls:
--max-chars Non boot.js and search.js;--fullfor no truncation
Key Insight
Memory search costs ~251 tokens for 3 results.
Reading all daily files costs ~7928 tokens (and growing).
That's 97% savings today, 99.5% savings at 6 months.