Most of a Coding Agent's Bill Is Context It Reads Again, and Token-Saving Tools Should Cut That
RTK says it cuts command output by 60-90% and has 85,000 stars. When UC Berkeley and Microsoft Research measured it under controlled conditions on SWE-Bench, an agent with RTK cost 9% less or 4.5% more depending on the setting, and in 12 of 30 repository × setting cells it cost more. TokenEconomizer, released by the same team, compresses no output. It cuts the costs that repeat on every turn (unused tool definitions, repository facts each session rediscovers, failure loops) and lowered cost by 18.4-30.9%. In 30 days of my own Claude Code logs, 97.9% of tokens were context read back from the cache. This post explains how an agent's bill accumulates, which line RTK, Serena, Aider's RepoMap and TokenEconomizer each reduce, how the paper's setup differs from the released plugin, and what to change first in your own setup and how to measure it.
- agent-engineering
- context-engineering
- claude-code
- open-source
- ai-coding