AI editing its own memory beat fixed rules on research questions

Context Language Models

TL;DR On research questions, an AI that rewrites its own working memory scored 59.4% correct, beating the best rival by 11.4% of that rival’s score. It also used 21.5% less computing and needed no extra training, which matters for AI jobs that run for hours.

Words to know

agent
An AI system that works through a task in many steps, often using software tools.
context
The text an AI model can see at one time, such as the task and its past steps.
reinforcement learning
Training where a model tries tasks many times and is pushed toward the attempts that worked.

The problem

AI agents work through long coding or research jobs in many steps. These jobs produce more text than the agent’s context can hold, meaning the text it sees at each step. Most systems use fixed rules, like summarizing once the context gets long. In one of the authors’ simple tests, the model keeps a Sudoku board current as moves arrive. Methods without in-place editing must rewrite the whole board after each move.

The idea

Picture a worker on a long job with one small whiteboard: the context. Usual systems wipe the board on a schedule and leave a summary. This method hands the worker the eraser and lets them choose what to keep, rewrite or file away. The team saves the context as a file that the model edits with ordinary computer commands. Each edit changes what the model sees on its next step. They tested existing models with no extra training, then trained a smaller one. The authors argue that edits chosen for each task beat one fixed rule, keeping useful facts in less room.

What they showed

  1. Research questions. On BrowseComp-Plus, hard search questions over a fixed set of documents, it scored 59.4% correct on the same model as every rival. It beat the strongest rival, which summarizes old steps when the context gets long, by 11.4% of that rival’s score.
  2. Day-long coding. Agent teams sped up linked software packages, scored on packages they never saw. The method’s team made the code faster than a summarizing team did, by a 65% larger gain, at equal spending.
  3. Training. After reinforcement learning, a form of trial-and-error training, a smaller model rose from 28.8% to 42.5% correct on BrowseComp-Plus. That matches the summarizing method given similar training, using less computing.

Why it matters

Teams that build AI agents for long coding and research jobs could replace hand-written context rules with the model’s own edits. Users can steer the edits with one plain sentence, such as asking for a backup before each cleanup. If the results hold, you could see agents that run for hours on bigger jobs while spending less computing.

The catch

Weaker models gain less, because the method leans on the model’s own judgment. Computing is a count of math steps, not measured time or dollars. The day-long coding test compares just one team of each kind, on a different AI model. The authors also flag a safety risk: a model that edits its own context could keep planted instructions across steps.

Who wrote it

Rulin Shao (University of Washington, Meta Superintelligence Labs) is first and corresponding author, with 12 colleagues. Colleagues also come from MIT and one other institution. Shao co-authored DR Tulu: Reinforcement Learning with Evolving Rubrics for Deep Research (2025).