Gergely Orosz · 11 min read · Gen AI Tools
What is “loop engineering?”
Read the original on newsletter.pragmaticengineer.com →
The article explores 'loop engineering' as a trend where developers design autonomous loops to guide AI agents instead of writing prompts. It traces origins from concepts like the Ralph Wiggum loop and the /goal command, outlines common loop patterns (triggers, cron jobs), practical use cases, and the downsides such as cost and drift, while contrasting loop design with broader context engineering.
Key Takeaways
- Loop engineering replaces manual prompting with looping systems that continuously steer AI agents.
- Early concepts like the Ralph Wiggum loop and the /goal command enable looping to handle events and scheduled tasks.
- Common use cases include automated PRs, on-call notes, and end-to-end test maintenance.
- Tradeoffs exist: looping can be expensive, prone to agent drift, and often requires skilled engineers; in many cases stronger context engineering suffices.
- Context windows and AI infra knowledge are critical; for many teams, looping may be a temporary hack until tooling matures.
Excerpt
“Loop engineering” has become a trending topic in the past month, after some high-profile folks at Anthropic and OpenAI revealed that they have stopped writing prompts, and started designing loops. At Anthropic’s developer conference, Boris Cherny, creator of Claude Code, said (emphasis mine): “I don’t prompt Claude anymore. I have loops running that prompt Claude and figuring out what to do. My job is to write loops. ” Soon after, Peter Steinberger, creator of OpenClaw, preached loop design in a post: Source: Peter Steinberger Elsewhere, Addy Osmani, formerly of Google, wrote an article , ‘Loop Engineering’: “Loop engineering is replacing…