Français
A context window is a virtual address space. Working sets, prefetch, page faults, caches — and thrashing, which is what a sixty-second unanswered question actually is.essai · standmeet2026.10.07 · essai
2026.10.07·lecture de 3 min#agent-os

Context Is Virtual Memory

A context window is a virtual address space. Working sets, prefetch, page faults, caches — and thrashing, which is what a sixty-second unanswered question actually is.

A context window is a virtual address space. It is smaller than the world the agent may need, it is addressed as if it were the whole world, and a machinery the programmer barely sees decides what is resident in it at any moment. Operating systems spent decades learning to manage exactly this fiction, and their vocabulary names, one for one, the problems agent builders now describe in ad hoc words.

Every question has a working set: the small collection of evidence it actually needs. Answer well, and the working set was resident. The engineering of agent speed is mostly the engineering of residency. A context pack — the evidence for known topics assembled in advance and injected before the first tool call — is prefetch: readahead by another name, betting that the working set is predictable because the waypoints declared it. A session cache of prior retrievals is a cache hierarchy doing what caches do: the second question in a conversation should not pay disk prices for what the first question already fetched. And a page fault — the window lacks the page, work stops, the page is fetched from the corpus — costs, in this architecture, an entire model round trip. Faults were the expensive path in 1968 too. They still are; only the constant changed.

The vocabulary also names the failure. Thrashing is what a system does when the working set does not fit: it spends all of its time fetching and evicting, and none of it progressing. I have watched a visitor agent spend over a minute on one question, searching ten sources and still not answering — a textbook thrashing trace, complete with the re-fetching of overlapping material that a cache would have made free. The operating-systems literature lists the cures, and they are the same cures, in the same order: know the working set (declare it, don't discover it), prefetch it, cache across faults, and if the set genuinely does not fit, shrink the problem rather than heroically paging harder.

One entry in the correspondence is imperfect, and honesty requires flagging it here rather than in the finale. When an operating system swaps a page out, the page comes back bit-identical. When an agent's context is compacted, what was swapped out returns as a summary — if it returns at all. Agent memory's swap is lossy, and every design that leans on compaction inherits that loss. The isomorphism holds for the structure of the problem. The fidelity of the medium is another matter, and it is the subject of the last chapter of this series.

demandez à l'IA à propos de ce essai·contexte : « context is virtual memory »
›