The prompt is not
working memory.
First surfaced in Tandemly Briefing — 2026-08-21.
Lin, Ang, Zhu, Ding and Zhou asked a pointed question: why does an agent's context have to be a growing block of text? Their answer is a system called Scroll, which turns the session into a sandboxed Python environment. Intermediate state binds to named variables. The model queries and transforms it with code. Evicted spans stay addressable through a compact index rather than being discarded. On a long-horizon agent benchmark, the system reaches 86.7 percent, compared to 49.3 percent for the best prior long-horizon agent result.
Compression heuristics
do not get better on their own.
Long-horizon agents hit a ceiling not because models run out of knowledge, but because they run out of room to hold what they've already done.
Every time a long-horizon agent calls a tool, retrieves a document, or computes an intermediate result, that information gets appended to the prompt. The working context grows with every step. Eventually the context window fills up, and something has to give. The standard answer is compression: summarize the older material, prune low-relevance chunks, or rewrite the whole history into a shorter form. Several systems now train this compression step directly into the policy.
The problem is structural, not incidental. A compression heuristic decides what is safe to drop based on some scoring rule applied at a moment in time. That rule must be explicitly maintained as models and tasks change. If the model gets better at reasoning, the heuristic does not benefit from that improvement. You have a separate maintenance problem running in parallel with your primary agent development.
There is a deeper issue too. The prompt is a flat text sequence. To find something the agent computed three hundred steps ago, the model must either re-read the whole history or rely on whatever the compression step preserved. There is no address. There is no index. Evicted material is simply gone, and the agent has no path back to it.
What if the agent's context were a programmable environment rather than a text buffer? What if intermediate state lived in named variables the model could query with code, and evicted material remained addressable through a compact index rather than being discarded permanently?
A sandboxed kernel
as working memory.
Scroll has three components working together: a persistent Python namespace, an Event Log, and an eviction index. Together they change what the agent's context actually is.
The central idea is that intermediate state should live in a Python namespace, not serialized into the prompt as text. When the agent calls a tool, the output binds to a named variable. When the agent retrieves a document, it binds to a variable. When the agent computes something, the result binds to a variable. To access any of these later, the model writes a short code expression that reads the variable, transforms it, or queries it with a filter. The result of that query is what gets injected into the working view, not the original object.
This means the model's active context at any moment is only what it has explicitly printed or requested, not the accumulated pile of everything the run has touched. The namespace holds the full state, but the prompt holds only what the model asked to see. The distinction matters because it hands the model control over what it looks at, and control over what something costs to look at.
The second component is an append-only Event Log: a complete, sequential record of every event in the run. The Event Log is not the working context. It is the ground truth the system can fall back to. Nothing in the Event Log is ever overwritten or removed.
The third component is the eviction index. When a span of context is too large to keep in the active view, it is evicted. But instead of being discarded, the system writes a compact landmark into the index: a short pointer tied to the exact address in the Event Log where that span lives. To retrieve evicted material, the model writes code that navigates to the address and reads what it needs. This means long-horizon agents can manage very large runs without paying full re-read cost, and without permanently losing access to older work.
A compression heuristic must be redesigned when models change. A code-writing interface inherits improvements automatically. If the model gets better at writing concise retrieval expressions, the context management becomes cheaper and more precise without any change to the system. The improvement path for context management is now aligned with the improvement path for coding ability, which is a lane receiving substantial investment.
Large numbers on three
long-context benchmarks.
Results use Qwen3.8-Max as the backbone. The margins are large enough to deserve careful reading before they are cited in a system comparison.
A 37.4-percentage-point gain over the prior best is an unusual result in this literature. The comparison is against long-horizon agents running under standard context management, not under a matched tuning budget. The gap almost certainly reflects a genuine architectural difference, but the size of it warrants checking the baseline configuration before treating it as a clean head-to-head comparison. What context management approach was the prior best agent using? Was it run with a comparable backbone? These are questions worth asking before citing the number in a broader comparison.
Scroll requires that the agent can execute arbitrary Python code in a sandboxed environment. That is not a universal assumption. Production deployments with constrained tool surfaces, API-only execution environments, or security policies that restrict code execution cannot adopt this approach directly. The eviction index and Event Log are meaningful only if the execution environment can actually run the retrieval code the model writes.
What this means
for building with long-horizon agents.
The practical case is strongest for teams building agents that already run into context window limits and already have access to a sandboxed execution environment.
Where to go
from here.
Concrete steps for applying or evaluating this work.