C.W.K.
Stream
Lesson 01 of 05 · published

The Window Is a Contract, Not a Soul

~22 min · working-memory, input-output, state

Level 0Window Watcher
0 XP0/50 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

What is actually inside

A context window is the token span a model can use for one request: instructions, conversation, files, retrieved chunks, tool outputs, and the answer being generated. It is not the model's weights. It is not every file on disk. It is not every conversation you have ever had with the system.

This distinction matters because users often say, "I told the AI already." Maybe. But if that fact is not inside the current window, not in retrieved memory, and not encoded in model weights, the model cannot use it reliably. The window is an operating contract for this turn — nothing more, nothing less.

The hidden half: output

The window must leave room for the response. Reasoning models may also spend invisible reasoning tokens that count against the same budget even when the user does not see them. If you fill the window with input, you are not being efficient; you are stealing space from the model's ability to finish the job.

Counted vs not counted

Counted: system prompt, all conversation turns, tool/function call results, retrieved RAG chunks, the in-progress reply. Not counted: model weights, anything in a separate session, the user's terminal, files on disk that were not read, browser tabs that were not attached, out-of-band metadata that was never sent.

Context is not memory. Context is the active workbench. A bigger workbench helps, but only if the right materials are on it and there is still room to work.

Code

The active-context boundary·text
Context window = system prompt
              + conversation history (every turn)
              + retrieved documents (RAG chunks loaded this request)
              + tool / function-call results returned this request
              + the in-progress output (and any hidden reasoning tokens)

NOT in the window = model weights
                  + anything from a separate session or chat
                  + files on disk that were not read this request
                  + facts the human knows but never typed
The window is per-request·python
# Each API call carries a fresh context window.
# Old turns appear only because the client replays them.
response = client.messages.create(
    model="claude-sonnet-4-7",
    max_tokens=4096,                # output reservation
    system=SYSTEM_PROMPT,           # counts toward input
    messages=conversation_history,  # ALL prior turns count again
)
print(response.usage)  # input_tokens, output_tokens are both billable

External links

Exercise

List five things you assume an AI can see in a long coding session. Mark each one as in-window, retrievable-by-tool, durable-memory, or human-only.
Hint
The interesting answers are the human-only ones. Those are the ones that need explicit steering.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.