Stop Compressing History. Program It.
Most long-horizon agents compress or summarize the past as it arrives. That decision is made before future needs are known. Once discarded, the original evidence is gone.
Scroll treats each session as an executable environment. An append-only Event Log keeps lossless historical ground truth. A persistent Python kernel holds tool outputs, retrieved history, and derived state as variables rather than prompt text. The model writes code to search, materialize, and transform that state. Only the projections it prints enter the next working view.
When the working view hits its budget, stale spans are evicted but remain recoverable. An eviction index maps compact landmarks to exact log addresses, so the agent can navigate back instead of searching the entire history. Context management becomes a programming task that inherits the improving coding ability of models.
On long-horizon benchmarks the approach outperforms published memory and agent systems, including a large gain on tasks where the environment state keeps growing. The limiting factor is no longer window size. It is how history is represented and accessed.
This Ledger Entry expands how the reader thinks by replacing early, lossy memory decisions with query-time selection over a complete, executable record of the session.