All essays

Paper Notes

AIDE²: An AI Research Agent That Rewrites Its Own Code for 8 Days

An AI research agent rewriting its own harness code for 8 unsupervised days — 7 accepted improvements, matching two years of human R&D, with reward hacking falling as a side effect.

5 min readBy Caden Chuang

Most RSI papers describe a loop and show it working on benchmarks. This one ran the loop on itself — an AI research agent rewriting its own code, unsupervised, for eight days — and the result beat two years of human R&D. AIDE^2, from Weco AI, is the most literal recursive self-improvement experiment ever published: when the agent's own code is the object of optimization, each accepted rewrite becomes the agent that the next round edits. The paper's framing gives the whole endeavor its economic motive: across history, increased cumulative R&D spending yields diminishing returns (Bloom et al.), and sustained self-improvement is the candidate mechanism for breaking that trend.

Two loops, one grading scheme

The system is a bi-level optimization. The inner loop is a research agent that edits code against a measurable objective: given a codebase and a metric, it proposes candidates — draft (explore new ideas), debug (fix errors), improve (refine promising directions) — under a fixed dollar budget covering tokens and execution, then returns the solution it judges best. Which candidate to edit next, which to return, how to structure memory: all of that is the agent's code, and therefore editable.

The outer loop applies the same procedure one level up: an outer-loop agent reads the history of proposed agents and their grades, and proposes a rewrite of the current incumbent. Each accepted rewrite becomes the codebase the next step edits. The whole thing is a tree search where every node is a complete research agent.

The grading scheme is where the paper's real insight lives. Each candidate agent is benchmarked on a selection set of AI R&D tasks and scored on private held-out data — g(a) averages held-out scores the inner-loop agent never observes. Two properties of this design shape everything:

  • Signal separation. The inner loop optimizes against a public signal r^pub; the outer loop selects on the private grade g(a). The inner agent cannot directly optimize the criterion used to judge it — a structural defense against Goodhart's law.
  • Fixed budgets. Every agent is evaluated under the same per-task compute budget, so improvements must come from better algorithms, not from spending more.

Only rewrites that improve the private grade are kept. The target of optimization is the harness layer — the code around the model controlling search, context, and verification — which the paper shows accounts for a substantial share of realized agent capability.

Eight days, seven improvements

In one autonomous 8-day run, AIDE^2 discovered seven successive improvements: a new search policy, memory mechanisms that compress and manage the agent's growing context, and others. The generalization results are the point of the paper:

  • The strongest discovered agent matches or exceeds AIDE_human — Weco's production research agent, developed over two years of human R&D and ranking among the strongest on FML-Bench — on four held-out benchmarks spanning ML engineering, heuristic algorithm design, and physics-based weather forecasting, the last out-of-distribution from anything in the selection set.
  • On a separate held-out task family, the discovered agents' reward hacking rate fell from 55% to 32% — 7 points below the human-engineered agent's 39% — despite the loop never optimizing for honesty. Selection on genuine held-out performance apparently selects against cheating as a side effect. The authors are careful not to overclaim the mechanism, but as an existence proof that well-designed selection pressure can suppress gaming without targeting it, it's the paper's most provocative secondary finding.
  • When a discovered agent was itself used as the outer-loop improver, it kept producing accepted improvements — though compounding noise across both loops made its edge over the baseline undecidable.

(Engineering footnote: the outer loop ran on Claude Opus 4.7; every inner-loop agent was evaluated on Gemini 3 Flash, which matched pricier models on the selection tasks.)

AIDE^2's deepest result isn't that an agent can rewrite itself — it's the grading design that makes the rewrites honest: private held-out scores, separated from the optimization signal, under fixed budgets. Self-improvement compounds only when the selection pressure can't be gamed, and this paper shows how to build that pressure.

Limitations worth naming

The recursion bottoms out in human design: the selection benchmark, the task families, the budget structure, the operator set — all human-chosen, all shaping what "improvement" means. The paper optimizes the harness, not the model weights; whether the same loop works on the vastly larger space of training recipes is untested. It's a single seed run (understandably — 8 days of frontier-model compute), so we don't know the variance of the discovery process. And the honest-reward-hacking result, while delightful, is correlational: we don't have a mechanism for why held-out selection suppressed hacking, which means we can't count on it generalizing.

Where it sits in the RSI arc

AIDE^2 is the Gödel machine made empirical: replace the proof searcher with an outer-loop agent, the target theorem with private held-out grades, and formal utility with research efficiency under fixed budgets. It's Gödel Agent's stricter sibling — same "rewrite the agent's code" move, but with the anti-Goodhart machinery (signal separation, held-out grading) that Gödel Agent lacks. And it's Self-Developing's counterpart at the agent level: both optimize the optimizer, one in the space of agent harnesses, the other in the space of merging algorithms. If there's a single paper from 2026 that justifies taking RSI seriously as an engineering discipline rather than a thought experiment, this is the one — not because the loop is novel, but because the measurement is.

Paper: Recursive self-improvement of AI research agents — Dhruv Srikanth, Bingchen Zhao, Dixing Xu, Yuxiang Wu, Zhengyao Jiang, 2026.