Paper · Self-modifying agents
Language Models Can Rewrite Their Own Weights
A frontier model demonstrates the ability to reason about its own failures and directly rewrite its own weights to improve its accuracy on held-out tests.

The loop
A 27B language model diagnoses its own failures and directly edits its own weights without gradients or training. These edited weights are then used by the model to achieve higher accuracy on subsequent unseen problems.
- Model diagnoses its own failure
- Model computes weight edits
- Model applies edits to itself
- Model answers new questions better
- Model diagnoses its own failure
- Model computes weight edits
- Model applies edits to itself
- Model answers new questions better
↻ The improved system does the next round, and the loop turns again.
Why it is a road to recursion
It demonstrates that a model can improve its own fundamental parameters through reasoning rather than gradient descent, creating a direct path to recursive self-improvement.
Evidence
The model's own edit makes it 6.6 points more accurate on 490 unseen problems.
weight editingself-correctioninference scaling
Related loops
More self-modifying agents →
Darwin Gödel Machine
- Coding agent edits its own code
- Scored child agents enter the archive
- Archived agents make later self modifications
- repeat
Self-modifying agentsUBC, Vector Institute, Sakana AI · 2025

Claude Code
- Claude Code writes its own code changes
- Changes become next Claude Code versions
- Release becomes harness for next development round
- repeat
Self-modifying agentsAnthropic · 2025

A Self-Improving Agent that Grows its Own DSL: Oracle-Free Operator Induction for Exact Question Answering
- Frozen model attempts exact QA tasks
- Model authors new DSL operators
- Independent implementations verify operators via consensus
- Verified operators expand model's executable library
- repeat
Self-modifying agentsChuang et al. · 2026