AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
context compaction — Summarizing an agent's earlier conversation to free room in the context window so a long session can keep going.
token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
Why it matters
For long-running coding agents input tokenThe chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.Full definition → now dominate spend: compacting on cache miss turns cache-read cost from quadratic to linear and cut one real trace by 55%, but only works if context compactionSummarizing an agent's earlier conversation to free room in the context window so a long session can keep going.Full definition → is fast enough to stay invisible.