Infinite play by eviction: how a 27B plays past its context window

Infinite play by eviction: how the winning ARC-AGI-3 harness keeps a 27B model playing past a 64K context by dropping old turns, keeping facts in Python and a.

0:00
Infinite play by eviction: how a 27B plays past its context window

A 27B model with a 64K context cannot play a game that takes a few hundred turns of reasoning and tool output, because the transcript of the game is longer than the window. The winning ARC-AGI-3 milestone entry plays anyway, and the trick has a name in ARC Prize’s writeup: “To keep playing indefinitely without exhausting the context window, The Duck continuously pops the oldest messages (“infinite play via eviction”)”.

Infinite play by eviction is a small idea with large consequences for any local agent, and the Tufa Labs write-up gives enough detail to describe it exactly.

What infinite play by eviction actually does

The harness caps the model’s context at 64K tokens and aims lower than that in practice: it “attempts to maintain an input context of 32k tokens by evicting the oldest user message and subsequent assistant turns, whenever it surpass this limit”. The system prompt is never evicted; the authors “always include the full system prompt in the context”. Everything else is a sliding window.

A turn in this harness is a reasoning block plus a Python tool call, and when the code takes actions, a new user message follows with “the updated information about the game state, e.g., level transitions, valid actions, and whether a level reset occured”. So the window holds the most recent stretch of the game at full fidelity, and the model plays from that stretch, with the beginning of the game gone.

The 32K target, rather than the full 64K, is a throughput decision: the cap exists “to allow the agent to act over longer timespans with reasonably high token throughput”. A local model’s speed falls as its context fills, so the harness trades memory of the distant past for speed in the present.

What the model keeps when the old turns are gone

Eviction would be fatal if the only record of what the model had learned was in the evicted turns. Two things survive it.

The first is state in the REPL. The board, the history of every action and frame, and the transitions list are Python variables the harness maintains outside the conversation, so the model can query the whole game at any time by writing code, even after the conversation that produced those actions is gone. The history variable pairs every past action with its frame; nothing about the game itself is forgotten, only the model’s own narration of it.

The second is a note the model writes to itself. The harness prompts the agent “to produce a simple world model using a note that is carried over multiple turns”. The model marks facts with a tag such as World model: in its response, and the harness copies that note into the next user message “until it decides to overwrite it”. It is a scratchpad that outlives the window, and the write-up describes it as what “helps the model keep a mental note of what it is trying to achieve”.

That pairing, a full external record plus a short self maintained summary, is the whole design. The transcript is disposable because the facts live elsewhere.

Why eviction beats a bigger context window on a local model

A bigger window would seem to make the problem go away, and on a local model it makes a different problem worse. Filling a 64K context on the 31B this stack runs costs memory and, more to the point, time per token that climbs with the length of what has to be attended to. The Duck’s authors note that they “do not optimally use prefix caching on the vLLM engine”, so every turn pays for its context, and keeping that context near 32K rather than 64K is a direct speed win.

There is also a quality argument the write-up makes elsewhere: models “dump full boards into the context that dilutes their attention”. A long context full of old boards is not more information; it is the same information buried deeper. Eviction is a crude form of the compaction that frontier harnesses do deliberately, and the Provider Adapter that took GPT-6 Astra from 62.7% to 99.9% is described by ARC Prize as one that “preserves opaque reasoning state between requests and uses compaction for longer conversations”. Same problem, different budget.

How to build eviction into a local agent

The pattern transfers to any local agent that has to outlive its window, and the parts are small.

Keep the facts outside the conversation. A game history in a list, a document in a file, a set of results in a database, anything the model can query with a tool call rather than having to remember. The toolkit’s own recordings are exactly this for ARC-AGI-3: every action and frame, on disk, queryable.

Pin the system prompt and drop from the front. Evict whole turns, the user message and the assistant turns that answered it, so the model never sees a reply without its question. Evict to a target well below the cap, so that throughput stays up and the model has room to think; the Duck’s 32K inside a 64K cap is one working ratio.

Give the model a note. One tagged paragraph that the harness copies forward until the model rewrites it. It costs a few hundred tokens a turn and it is the difference between an agent that learned something three hundred turns ago and one that did not.

Measure the turn cost as the window fills. On this stack a 16 by 16 board and a few hundred tokens of history already cost three to twelve minutes a move; a window that grows without bound turns that into an agent that gets slower every turn until it stops. Eviction is what keeps the per turn cost flat, which is the only way an agent that plays for hours can be built on a model that thinks in minutes.

The Duck’s authors list “compaction or adding memory to help the model carry curated context” as the improvements they would make next. The version they shipped is the simplest thing that works: forget the transcript, keep the facts, and write yourself a note.

Share this