← All writing

AI Engineering

Self-Improvement Memory: Agents That Remember Why

Mani G 3 min read

A robot reading an open lab notebook of past code edits, with arrows linking a problem, a change, a prediction and a result

Every codebase has that one weird line. A check nobody remembers adding, guarded by a comment that says "do not remove". Google researchers just published a paper about the AI version of that problem, and their fix is called self-improvement memory. I think it is one of the more useful ideas I have seen this month, mostly because it is so boring.

What self-improvement memory actually is

Start with the word harness. An AI agent is a model plus the stuff wrapped around it: the prompts, the tools, the rules for what goes into context, and the code that runs commands. That wrapper is the harness. These days people let another AI tune the harness automatically. It tries an edit, runs a benchmark, keeps what scores better, and repeats.

That works fine until you swap the model or the benchmark. Then the tuning has to start again, and all it inherits is the final harness code. The reasons behind each edit are gone.

The paper, "Self-Improvement Memory Enables Continual Recursive Self-Improvement" (arXiv 2611.18856), comes from people at Google Cloud AI, Google DeepMind and Penn State. Their answer, SIM, is a structured log that travels with the harness. Edits are grouped by the recurring problem they target. For each attempt it stores:

  • the change and why it was made
  • what the optimizer predicted would happen
  • what actually happened
  • where it was tested: domain, benchmark, model and round

The predictions are written down before the test runs and checked after. That detail is my favourite part. It is a lab notebook, and it keeps the optimizer honest.

One thing to be clear on: this memory is for the optimizer, not for the agent solving tasks. The model weights stay frozen. Only the harness and its history change.

A quick example

The paper's go-to example is premature completion. An agent runs a command, the command succeeds, and the agent declares the job done. Except it is not done, because a command exiting cleanly says nothing about whether the deliverable exists.

So the optimizer adds a check that ties "done" to the actual output. Without SIM, the next run on a new model sees a mystery check and has to guess why it is there. With SIM, it reads the record: the problem, the reasoning, the result. It can keep the reason and rewrite the check for the new task, instead of deleting it or blindly keeping it.

Do the numbers hold up

The authors tested four domains: coding, text classification, agentic workspace tasks and engineering design. A few results stood out to me.

First, harnesses do not travel well. When a harness tuned for Claude Opus 5.5 was run on Gemini 3.8 Flash, it scored below Gemini's own untuned starting harness in every domain, by 0.60 to 5.48 points. So much for "tune once, use everywhere".

Second, the workspace tasks. Both setups started at 68.41. With SIM the score reached 84.75. Carrying over only the harness got 73.42.

Third, coding. Across ten independent runs, SIM won nine of ten pairs. The mean final score went from a shared start of 18.36 to 21.70 with SIM versus 19.33 without, an average gain of 2.36 points with p = 0.003.

My take: the gains are real but modest in coding, and the big jump comes from one domain. I also noticed the current version reads the entire memory with no retrieval or trimming. That is fine in a paper. It will get expensive once the notebook gets thick.

Still, the core lesson applies far beyond research. If you tune prompts or agent configs by hand, you already lose the "why" every time you switch models. Keeping a short note per change, with what you expected and what you got, costs almost nothing. Google just put a p-value on common sense.

So here is my question: when you last changed models, how many of your prompt tweaks could you explain?