The Coming Loop
Armin Ronacher breaks down two layers of agent loops: the internal cycle where a model calls tools and edits code, and the external harness that re-queues and re-runs tasks until a goal is met. He says loops shine for experiments, code ports, and security scans, but they generate brittle, over-defensive code and threaten human understanding, even as defenders must adopt loops to match automated attackers.
- Autonomous agent loops tend to produce defensive, bloated code—stacking fallbacks and exception-handling instead of fixing root design flaws.
- Loops work best on bounded, verifiable tasks like code ports (Zig-to-Rust, MiniJinja-to-Go), performance tuning, and security audits, where results can be mechanically checked or judged by a second LLM.
- For production or mission-critical systems, Ronacher still prefers deterministic, fully "peelable" code over the unpredictable, living-system feel of loop-generated software.
- Despite the risks, defenders may be forced to adopt loop-based approaches simply to keep pace with automated attackers using the same technique.
Boris Cherny’s line—“I don’t prompt Claude anymore. I have loops running that prompt Claude and figure out what to do”—captures a shift in coding practice. Instead of single-shot prompts, people now build harnesses that queue tasks, run an LLM (like Claude), inspect its output, then decide to continue the session, tweak context, or hand it off. That outer loop extends the model’s life beyond a single response. Armin Ronacher finds this powerful in theory but hasn’t trusted it for code he deeply cares about. Off-the-shelf loops churn out defensive, overly complex code, duplicating logic, papering over design flaws with extra checks instead of enforcing clear invariants.
Models “terrified of exceptions” tend to tack on local fallbacks rather than eliminate impossible states. Each cycle in a hands-off loop adds another layer of defensive plumbing. That makes the system look robust at first glance but gradually erodes readability and correctness. Junior developers using these loops can end up with sprawling codebases they can’t justify—because the LLM will always invent a plausible rationale for every extra branch or fallback.
Still, loops shine in niche domains. Ronacher points to large-scale porting projects—Zig-to-Rust migrations for Bun or his own MiniJinja-to-Go experiments—where transforming existing code works like a charm. Performance tuning, security audits and other explorations fit too: the loop runs benchmarks, filters failures, surfaces insights, and throws away throwaway code. Here the harness either verifies mechanically or even leans on a second LLM as a judge. The judge needn’t be perfect—just consistent enough to drive a new iteration.
He draws a line between throwaway artifacts and lasting code. For experiments, the organism-style loop feels liberating. But for production systems, he still values machines you can “peel” like a black box, deterministic behavior you can map end to end. LLM-driven loops push software toward living, unpredictable systems—an appealing research path, but not yet where he trusts mission-critical code to live.