Keeping the recent rounds whole

By Prof. Tom Yeh

Published: 2026-08-19

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


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

Compaction does not summarize everything behind the system prompt. It leaves the most recent rounds alone. An agent that summarized the round it was in the middle of would lose the thread it is holding, so the summary stops short and the live end of the conversation stays verbatim. That leaves the window in three parts: the prompt, the summary of what is old, and the rounds still in their own words.

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