Autonomous Agent Loops Are Real: Karpathy, Stripe, and Anthropic's Dreaming
TL;DR
Three examples of AI agents running in loops without constant supervision, verified independently rather than taken on a post's word: Andrej Karpathy ran an agent through 700 experiments in two days and pulled 20 real improvements out of it. Stripe has internal agents merging 1,300 pull requests a week, under strict guardrails. Anthropic officially documents a mechanism, dreaming, where the agent re-reads its own history to extract reusable knowledge. A fourth number circulating alongside these, a 42% productivity gain attributed to "Claude Code's lead engineer," has no independent source confirming it.
The principle: a loop instead of a single prompt
A regular prompt answers once. A loop re-runs the agent with the previous round's result, until a stop condition is met: a number of iterations, a validated quality bar, a time limit. The difference isn't the model's power, it's the architecture around it: who triggers the loop, who checks the result, and who decides when to stop.
Karpathy's loop: 700 experiments in two days
Andrej Karpathy built a system, nicknamed "autoresearch," that proposes a hypothesis, runs an experiment, reads the result, and starts again. In two days, he ran 700 experiments and pulled 20 real optimizations out of it for training a small language model, including a missing multiplier in the attention mechanism that was spreading attention across too many heads at once. Applied to a larger model, those 20 optimizations delivered an 11% cut in training time.
Shopify founder Tobias Lütke reproduced the experiment on internal data: 37 experiments overnight, for a 19% gain. Two independent results, which sets this story apart from a one-off anecdote.
Stripe's Minions: 1,300 pull requests a week
At Stripe, an employee kicks off a development task with an emoji reaction on Slack. An agent, built on a fork of the open source tool Goose, takes it from there: an isolated virtual environment, no internet or production access, preloaded with the necessary code and services in about ten seconds. The result lands as a pull request, never merged without human review.
The system now handles roughly 1,300 pull requests a week, up 30% in under two weeks from a prior 1,000. The number isn't the point, the architecture that makes it possible is: strict isolation, no direct production access, and a human gate before every merge.
Anthropic's dreaming: an agent that re-reads its own history
Anthropic officially documents a mechanism called dreaming: an agent that systematically re-reads the history of its own sessions to extract reusable patterns, instead of starting from zero on every task. In a security research demo published in April 2026, nine agents working in parallel spent 800 cumulative hours on a single problem, at a compute cost of about $18,000, and closed 97% of the performance gap on the target task.
Anthropic also states that Claude now writes 80 to 90% of the code for its own internal tools. That figure comes from an official company statement, not a post relaying it.
What doesn't hold up
A fourth item was circulating alongside these three: a knowledge-graph system attributed to "Claude Code's lead engineer," with a claimed 42% productivity gain on day one. No independent source, no technical writeup, no mention on Anthropic's official channels confirms either the number or the attribution. Unlike the three examples above, this one stays a post's number, not a verified fact.
What you need before building your own loop
The three examples that hold up share one trait: verification that doesn't depend on the agent itself. Karpathy reads the experiment results, Stripe requires human review before merging, Anthropic's dreaming mechanism relies on a verifiable history rather than the agent's self-assessment mid-task. A loop with no exit gate and no external check accumulates errors as fast as it accumulates iterations.