Karpathy's 630-Line Agent Self-Loop Experiment

FinanceYF5 · x · 2026-07-07

In March 2026, Karpathy released a 630-line project: the Agent modifies code itself, trains for 5 minutes, and keeps the changes if metrics improve, or rolls back otherwise. Over two days, it ran 700 experiments and found 20 optimizations that he hadn't manually discovered in 20 years. Shopify's CEO ran it overnight, achieving a 19% quality improvement while halving the model size.

Related event: The Karpathy Loop: Building Autonomous AI Agent Workflows(9 posts)→

Original post →

More from coding & agent

coding & agent channel →