Picking the number from a round

By Prof. Tom Yeh

Published: 2026-08-19

URL: https://www.byhand.ai/p/library-agents-context-when-to-compact


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

A threshold picked by taste is a threshold picked wrong. The number has to come from the size of a round. Compaction must fire while there is still room for one more question and one more answer, or the agent runs out of window with nowhere to put the reply. So the trigger sits where the conversation last had a full round of room, and whatever percentage that works out to is the percentage.

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