What a summary call costs

By Prof. Tom Yeh

Published: 2026-08-19

URL: https://www.byhand.ai/p/library-agents-context-what-compaction-costs


Library › Context Problems

-

The Context Window

-

Window Occupancy

-

Growth per Turn

-

Remaining Space

-

Turn Budget

-

Retrieval Footprint

-

Retrieval per Turn

-

Search Rounds

-

Window Sizing

-

Truncation

-

Compaction

-

The Compaction Bill

-

Compacted Retrieval

-

The Compaction Threshold

-

Verbatim Tail

-

Stateless API

-

Retrieval Cost

-

Context Tax

-

Quadratic Cost

-

Cost Forecast

Compacting is itself a call to the model, and it is billed like any other. The model reads the whole window to write the summary, system prompt included, and that is the input. Then it writes the summary one token at a time, and that is the output, priced several times higher. So a summary that is a quarter the size of the history is nowhere near a quarter of the bill.

Paid members: the worksheet and its printable PDF are below ↓