Self-Improvement Memory: How Agent Harnesses Keep Improving (Google)
Xin Yu and colleagues at Google introduce Self-Improvement Memory (SIM), which helps an AI agent's harness optimizer remember why each edit was made. Bob and Alice unpack what happens when the benchmark or model changes. In this episode: - Policy model vs harness, and why an evolved harness forgets the why - Edits grouped by recurring problem, with predicted and observed outcomes - Paired coding runs, the limitations and an overfitting counterpoint Sources: Xin Yu et al.; Yoonho Lee et al.; Birgitta Böckeler; Peng Xia et al. Big AI ideas, made clear for builders. luongnv.com/podcast
Listen on Build Wiz AI Show Download MP3 Transcript
Based on Self-Improvement Memory Enables Continual Recursive Self-Improvement by Xin Yu et al.
Transcript
Alice: What if an AI agent could keep rewriting its own toolkit, and actually remember why it made each change?
Bob: And what happens to all those fixes the day you swap in a brand-new model?
Alice: Welcome to Build Wiz AI Show. Big AI ideas, made clear for builders. I'm Alice.
Bob: And I'm Bob! Today it's an arXiv paper, "Self-Improvement Memory Enables Continual Recursive Self-Improvement", by Xin Yu and colleagues at Google Cloud AI, Google DeepMind and Penn State. The work was done while Xin Yu was an intern at Google.
Alice: Big title. Lots of self-improvement in one sentence! Let's start simple: what's an agent made of, in this paper?
Bob: Two parts. An LLM agent depends on its policy model, and on the harness that manages context, tools, and execution. Improving the harness can raise performance without touching the model's weights.
Alice: Give me the picture a total beginner would get.
Bob: Picture a talented chef dropped into a restaurant kitchen. The chef is the skill; the kitchen is everything around it: which recipe cards are pinned up, which knives are in reach, the timers, the order tickets. That's the split here: the chef is the policy model, the kitchen is the harness deciding the model's context, tools and execution flow.
Alice: So you can make the food better without retraining the chef.
Maya: That's the bet behind an earlier paper. Yoonho Lee and colleagues, on arXiv, in Meta-Harness: End-to-End Optimization of Model Harnesses, say performance depends on model weights and on the harness. That's the code that determines what information to store, retrieve, and present to the model.
Alice: And people tune that code by hand?
Maya: Mostly, they say: harnesses are still designed largely by hand. Meta-Harness automates the search with an agentic proposer that reads the source code, scores and execution traces of all prior candidates. On online text classification, they report 7.7 points over a state-of-the-art context management system.
Alice: Okay, so where does recursive self-improvement come in? That sounds like science fiction.
Bob: Much tamer than it sounds! Here it means automating harness edits: use execution feedback to repeatedly propose, evaluate, and select changes. The proposer and selector are themselves LLM-based harness engineers, and the policy model just runs the tasks.
Alice: So it's one AI tinkering with another AI's workshop.
Bob: Think of a sports coach after every match. Watch the tape, suggest a new drill, try it in practice, keep it only if the team actually plays better. Mapped back: the evaluator runs the harness and returns scores, traces and errors, the proposer drafts candidate harnesses, the selector picks which one stays.
Alice: And how do they stop it from just memorizing the test?
Bob: Two pools of tasks. Like a practice exam and a final exam: you study with the practice one, and the final stays sealed. Each setting has disjoint evolve and held-out sets, and only evolve-set feedback is used for proposing, selecting, or updating memory.
Alice: So what's the problem this paper is solving?
Bob: Optimization usually happens in one fixed setting. But models get updated and agents meet new tasks, so harness optimization needs to keep going. And the evolved harness alone doesn't say why an edit was proposed, what it was expected to fix, or what happened when it was tested.
Alice: Hm. The code is there, but the reasons aren't.
Bob: Imagine buying a house where the last owner added a strange handrail in the hallway and a second lock on the back door, with no notes. Is the handrail there because someone fell, or was it a whim? The evolved harness is that house: you see the edits, not the reasons.
Alice: And if you rip out the wrong handrail?
Bob: That's their worry. Without this history, the next round may repeat earlier attempts or change inherited parts without knowing their purpose. And inherited fixes can hurt: in their workspace test, an Opus-evolved harness starts at 68.41 on Gemini, below the seed harness's 73.89.
Alice: Lena, builders hit this by hand too, right?
Lena: They do. Birgitta Böckeler, in Harness engineering for coding agent users, on Martin Fowler's site, writes that a coding agent has no organisational memory. It doesn't know which convention is load-bearing and which is just habit.
Alice: So what's their fix? Self-Improvement Memory?
Bob: SIM for short. It groups edits by the recurring harness problem they address, say premature completion. Under each problem, every attempt stores the change, its rationale, the predicted and observed outcomes, and provenance: domain, benchmark, policy, and round.
Alice: Make that concrete for me.
Bob: Think of a doctor's chart sorted by condition, not by date. Under back pain: every treatment tried, why, what the doctor expected, what actually happened, and which clinic. Same here: one entry per harness problem, with every edit, its reasons, its results, and the setting it ran in.
Alice: And this memory belongs to the agent doing the tasks?
Bob: No, and that's the key twist. SIM is for the harness optimizer, not the task-solving policy. Like a coach's notebook rather than a player's: the proposer gets the complete SIM in its system prompt, and the selector reads the same record, with no retrieval or truncation.
Alice: Does it only keep the wins?
Bob: No, that's the honest part. After selection, the chosen edit is recorded with its measured outcomes even when it regresses or fails to fix a predicted task. Each proposal cites an existing root cause or names a new one.
Alice: Lena, does that match how practitioners work?
Lena: Pretty closely. Böckeler says the human's job is to steer the agent by iterating on the harness. Whenever an issue happens multiple times, the controls should be improved so it gets less likely, and building that harness is an ongoing engineering practice, not a one-time configuration.
Alice: You said predicted outcomes. Predicted by whom?
Bob: By the proposer, before the test. Predictions of which tasks an edit will fix are recorded before evaluation and checked afterward. It's like a weather forecaster writing tomorrow's forecast down before looking out the window, then checking it.
Alice: No quietly changing the forecast afterwards!
Bob: Take one entry they call P3: deliverables that look correct inside but break the verifier's external contract. The source edit fixed one of four predicted tasks. Two later target attempts fixed zero of two, then one of two, all kept under the same diagnosis.
Alice: So the misses are part of the lesson. Now the continual part: what exactly changes?
Bob: They call it Continual RSI. Cross-dataset means the benchmark changes while the policy stays fixed; cross-model means the policy changes on the same benchmark and split. Both need a shared executable harness interface.
Alice: Analogy, please.
Bob: Picture a delivery van fitted out with custom mirrors and shelves. Cross-dataset is the same driver taking that van to a new city; cross-model is the same city, but a new driver gets the van. The van is the harness, the driver the policy model, the city the benchmark.
Alice: Where did they test it?
Bob: Four domains: coding moves from Terminal-Bench 2.1 to Terminal-Bench 4, plus text classification, an agentic workspace setting, and engineering design. Cross-dataset uses Gemini 3.8 Flash as the policy; cross-model starts from Claude Opus 5.5, then Gemini continues.
Alice: And did memory win?
Bob: Across six dataset transitions, Full SIM finishes highest every time, beating harness-only continuation by 2.43 to 4.35 points. Keeping root causes alone was mixed, from 1.82 points below harness-only to 2.40 above. So the evidence and edit history matter, not just the diagnosis label.
Alice: And the new-driver case?
Bob: The Opus-evolved harness, first run with Gemini, scores below Gemini's own seed harness in every domain. Full SIM still finishes highest in all four. Workspace is the big one: both start at 68.41, Full SIM reaches 84.75, harness-only 73.42.
Alice: Wait, the hand-me-down van starts worse?
Bob: It does, which is why the memory matters. They also chained it across Gemini generations on Terminal-Bench 2.1. Continuing beat fresh optimization by 3.5 points on Gemini 3.5 Flash and 1.6 on Gemini 3.8 Flash, but finished 0.8 points lower on Gemini 4 Argon.
Alice: So not a clean sweep. Good to know. But one run per setting sounds thin. Did they repeat anything?
Bob: In coding, yes. They ran source optimization ten times from the Terminus-2 harness on Terminal-Bench 2.1, then started two ten-round Terminal-Bench 4 runs from each result. Within each pair, everything matched: starting harness, policy, benchmark and budgets; only one run had SIM.
Alice: Why pair them up like that?
Bob: Imagine testing a plant food with twin seedlings: same seed, same pot, same window, only one gets the food. Any difference points to the food, not the luck of the seed. Here the seedling is the evolved harness, and the plant food is SIM.
Alice: And the scoreboard?
Bob: SIM finishes higher in 9 of 10 pairs; one pair favored no SIM by 0.61 points. From a shared mean start of 18.36, the mean final score is 21.70 with SIM and 19.33 without. The mean paired advantage is 2.36 points.
Alice: Points out of what, though? Help me feel that number.
Bob: Scores run from 0 to 100, and for coding it's pass at one: did the agent solve the held-out task on its first try. My take: a couple of extra points on a hard benchmark, real but modest, not a leap.
Alice: Modest, but the twins mostly agree. Is there a story that shows it working?
Bob: A good one. On Terminal-Bench 2.1, a failing agent was asked to set up a git server, never created the user account, tested with another account, and declared the task complete. The seed harness's check only asked the model to repeat its claim.
Alice: Oh no. Full confidence, no git server.
Bob: It's like a kid saying I cleaned my room, and the parent only asking, are you sure? Source optimization built a completion gate that opens the closet: it refuses completion when no command actually executed. Ending the episode, they note, was an agent privilege requiring no execution evidence.
Alice: And on Terminal-Bench 4?
Bob: Both runs inherit that gate. With SIM, the proposer reads the gate's rationale, keeps completion checks, and adds target checks, like feasibility versus optimality. Without SIM, the run tightens the gate, twice repairs completion deadlocks, and misattributes the inherited gate to its own first round.
Alice: It took credit for its parents' handrail!
Bob: Ha, pretty much. Their lesson: the requirement carries over, but its implementation needs revision.
Alice: Okay, skeptic time. Sam, what worries you about self-improving harnesses?
Sam: Overfitting. Peng Xia and colleagues, on arXiv, in RRSI: Regularized Recursive Self-Improvement of Agent Harnesses, warn that recursive evolution may overfit by memorizing the training tasks. They describe large in-distribution gains that shrink or even vanish on out-of-distribution benchmarks.
Alice: So how do they push back on that?
Sam: With regularization. A critic screens benchmark-specific proposals, and a pruner removes changes that are too small, too expensive, or no longer useful. Together, they write, these favor reusable agent mechanisms over benchmark-specific ones.
Alice: I think any loop scored by a benchmark can learn the benchmark instead of the skill. Does the SIM paper admit that?
Bob: It does, in its Ethics statement: a self-modifying harness could satisfy an evaluator without solving the intended task. They keep held-out feedback away from the optimization agents, and note workspace scores may reflect biases of the LLM judge.
Alice: And their own limitations?
Bob: Three. Repeated independent runs only cover coding; other domains had one run per condition. They only study compatible harness interfaces, with the optimizer's planning and search fixed, and they test SIM as one complete procedure: inherited memory plus updates together.
Alice: And it isn't cheap to run, I assume?
Bob: No. A coding round takes about 4 hours, and token use and runtime can differ between methods even with matched rounds. My take: call this better bookkeeping for an optimizer, not an AI that improves itself without limits.
Alice: Time for Builder's Corner! Bob, what can I try this week with my own agent?
Bob: Keep a change log for your agent's prompts and tools, grouped by the recurring problem each edit targets, the way SIM groups them. For every edit, write the problem, why you made it, and which tasks you predict it will fix, before you test it.
Alice: And after the test?
Bob: Record what actually got fixed and what was missed, plus the model and benchmark, and keep the failures too. Then read the log before the next round: check the setting behind each entry, and revisit a tested direction only when new evidence justifies it.
Alice: A diary for my prompts. My agent finally gets a backstory.
Bob: Quick takeaways: an agent is a model plus a harness, and the harness can be improved automatically. An evolved harness alone forgets why its edits exist. And a memory of problems, predictions and outcomes helped continuation, with modest, setting-specific gains.
Alice: What's still open?
Bob: The authors want more repeated runs, longer chains of transitions, and adapting planning, token allocation and tool interfaces too. And my guess at another: whether the memory itself gets too big to read in one prompt.
Alice: And the Gemini 4 Argon dip?
Bob: Right, inheriting fell short there. My guess is that knowing when to throw the old notebook away is its own skill.
Alice: That's our look at self-improvement memory. Thanks to Xin Yu and colleagues for "Self-Improvement Memory Enables Continual Recursive Self-Improvement".
Bob: And thanks to Yoonho Lee and colleagues for Meta-Harness, Birgitta Böckeler for Harness engineering for coding agent users, and Peng Xia and colleagues for RRSI. Now go start that change log!
Alice: That's all for today on Build Wiz AI Show. Thanks for listening, and see you next time.