Research notes

Recursive self-improvement · December 2025 · Yin, Wang, Pan, Wan, Wang

Gödel Agent: an agent that rewrites its own code

A self-referential framework where the agent monkey-patches its own logic toward a high-level goal. Notes on the design space it opens — and the supervision problem it sharpens.

Read the source →


Gödel Agent is the paper we keep coming back to when we think about the long-run shape of agentic systems. It takes a question most frameworks avoid — what if the agent could rewrite itself? — and gives it a concrete, working answer.

What the paper does

Named after the Gödel machine, Gödel Agent is a self-referential framework where an agent recursively improves itself. Instead of running a fixed pipeline or a predefined meta-learning routine, it uses an LLM to dynamically modify its own logic and behavior, guided only by a high-level objective expressed in a prompt.

Mechanically, it does this through recursive monkey-patching: the agent inspects and rewrites its own running code, then evaluates whether the change helped. On mathematical reasoning and agent tasks it reports continuous self-improvement, surpassing hand-crafted agents — roughly an 11% gain over meta-learning baselines on hard reasoning.

The idea I find important

Every agent framework encodes human assumptions about what an agent is: its planning loop, its tool interface, its memory. Those assumptions bound the search space. The paper's argument is that human-designed components mean you can only ever find the best agent within your design — never the globally better agent your design ruled out.

Fixed frameworks search for the best policy. A self-modifying agent searches for the best framework. That's a different, larger space.

Gödel Agent is a bet that letting the system edit its own scaffolding lets it reach designs a human wouldn't have written down.

Why it sharpens the supervision problem

Here's the tension with everything else we build. Our products are deliberately the opposite of this: bounded, inspectable, human-approved at each step. Gödel Agent is unbounded and self-rewriting. Reading it is how we keep our own assumptions honest.

The hard question it forces: if an agent can change its own code, what does "supervision" even mean? You can't review every patch in a recursive loop. So supervision has to move up a level — to the objective you hand it, the sandbox you run it in, and the evaluator that decides whether a self-edit is kept. That's the same lesson the AI Scientist teaches from the research-loop side, arriving from the code side.

We don't run self-modifying agents in production — the trust model isn't there yet, for us. But this is the clearest articulation we've found of why the agent design space is bigger than our frameworks, and it's shaping how we think about where the human boundary should sit.

Code is on GitHub; the paper is short and worth reading in full.