Context Problems
Agentic AI by hand ✍️
This is the second workbook in the series, and the one I promised at the end of the first. That one was about tokens: what they are, how to count them, what they cost. This one is about where they go.
Every model has a context window, and every window is a budget. These problems ask you to spend it. You will mark out a window and fill it turn by turn, work out whether the next message still fits, and count how many turns you get before it does not. Then retrieval arrives and takes its share, and you will see what a single retrieved document does to the turns you had left.
Halfway through, the window runs out and you have to decide what to do about it. Dropping the oldest turn is the simple answer, and problem 10 asks what that costs you. Compaction is the better one, and five problems work through what it spends, when to reach for it, and what survives.
The last five changed how I think about long conversations. A stateless API resends the entire context every turn. Add that up across a session and the cost is not the length of the conversation, it is the square of it. You will do the addition by hand, which is the only way I know to make that number feel real.
Twenty problems again. Bring a pen.





















