arXiv(opens in a new tab)cs.AIOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.11450

Tracing the Thoughts of a Coding Agent Playing ARC-AGI-3: Lessons for Continual Learning

Chen Wu, Josh Passenger, Yin Song

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study how a coding agent learns across a sequence of abstract reasoning tasks. The agent runs on a frozen foundation model inside a fixed harness and acts by writing and running Python and shell scripts. The agent retains no state across turns other than its written artifacts, so every thought it forms, carries, corrects or abandons leaves a trace, where a thought is any belief, rule or plan committed to a file. We let the agent play ARC-AGI-3, a set of interactive reasoning games that provide no instructions. Each game is a sequence of levels, and a strategy that clears one level can fail on the next, so every new level is in effect a new task. The agent records what it learns about each game as Python scripts and text notes, while the harness keeps a complete log of every action and observation. Our contribution is a measurement protocol that traces each thought through these files, from the task where it forms to the task where it is corrected or abandoned, applied to seven evaluation runs with three backbones from two model families. We find that scripts written for one task are almost never called again in a later task (33 of 630 references cross a task boundary), because most scripts embed the state of the current level and become invalid when the level changes. Instead, the agent rewrites its knowledge into new scripts, retyping most of each version while keeping the general rules and dropping the level-specific details, and abandons 74% of the scripts it wrote before a boundary. The notes, which only the model reads, are never revised. The agent appends to them without removing earlier claims, and the contradictions that accumulate are settled against the log. Because the log preserves everything, the agent can discard scripts freely and reconstruct their content when needed, so it forgets selectively, not catastrophically. The most costly error is a hard-coded value carried into a task where it no longer holds. The fix the agent found was to turn the constant into a parameter that must be supplied afresh for each new task. The above findings were obtained from the files the agent wrote, without access to the model, and constitute a white-box analysis of how a coding agent continually learns.

1 Introduction

Continual learning is usually framed as updating a parametric model over a sequence of tasks without catastrophic forgetting of earlier competence, and the difficulty is attributed to a tension between stability and plasticity [Parisi et al., 2019, De Lange et al., 2021, Wang et al., 2023b]. An agent built on a frozen foundation model, on the other hand, tackles the same continual learning problem without

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Continual Learning in the Era of Foundation Models and Embodied Agents.

weight updates: it must decide where knowledge is kept and what happens to that knowledge when the task changes.

To study that question, we develop a coding agent whose knowledge resides entirely in a directory, building on the programmatic-memory design of PRO-LONG [Fox et al., 2026]. The harness appends every interaction to logs.txt and provides the agent only the path to that file. Any fact about the environment must therefore be established by a script the agent writes. The memory of the agent consists of these scripts and its notes, and both are directly readable.

We evaluate the agent on ARC-AGI-3 [ARC Prize Foundation, 2026b], the interactive benchmark designed to test general intelligence as the efficiency of acquiring skills on novel tasks [Chollet, 2019]. The rules of every game must be discovered by playing it. Each game is a sequence of levels that share one interface yet differ enough that a solution to one can fail outright on the next (Section 3.1). A level boundary is therefore a task boundary inside a single episode, and it arrives unannounced. At each one the agent must decide what to carry, what to rebuild and what to abandon.

Our contribution is a measurement protocol. Every script is assigned to the task that was open when it was written, which yields 4,786 scripts across 689 boundaries (Section 3.4). The protocol needs no access to the model that produced the memory, so it applies to any agent that writes its knowledge to a file system. It makes retention and transfer directly countable where both were previously inferable only from task performance.

Applying the protocol to seven deliberately varied runs across three backbones from two model families, which clear between 34 and 183 of the 183 available levels, we report two findings. The first is an empirical characterization of cross-task update (Sections 4.1–4.3). Transfer occurs by re-derivation rather than by reference: an agent carries the rule it has learned and discards the script that established it. The moment it writes the rule out again is the moment it separates what the environment always does from what belonged to the task it has just left. All backbones respond to a boundary by partitioning memory rather than by reconciling it and differ only in the partition key.

The second finding is negative transfer from stale memory, and its repair (Section 4.4). A false belief is eventually corrected by the interaction record, so the most costly failure is a belief that is true of one task and false of the next, which we find in three runs of one game. The one repair that works changes how the belief is stored: the value fixed inside a script becomes an argument the script must be given, an operation the scripts allow and the notes lack.

References (21)