System prompt, user, model

By Prof. Tom Yeh

Published: 2026-08-19

URL: https://www.byhand.ai/p/library-agents-context-what-fills-the-window


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

Three things share the window: the system prompt, everything the user has sent, and everything the model has written back. They draw on one budget, so a longer system prompt leaves less room for the conversation, and every token the model writes is a token the next turn cannot use. Marking the three separately shows where the space went; what is left over is the room the next turn has to work in.

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