“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 .
Elsewhere, Addy Osmani, formerly of Google, wrote an article, ‘Loop Engineering’ :
“Loop engineering is replacing yourself as the person who prompts the agent. You design the system that does it instead.”
That’s three mentions in quick succession of this new approach, which is a novel one and therefore pretty abstract to us. To find out more, the Pragmatic Engineer newsletter turned online to some of the folks who read these articles. In replies, they told the Pragmatic Engineer newsletter what “loop engineering” means to them and gave some examples of loops in their work.
According to those folks :
1) Where it began : “Ralph Wiggum” loop. A year ago, software engineer Geoffrey Huntley shared how he builds “loops.” In December 2026, the approach went viral and “Ralph loops” were born.
2) The /goal command ships in all major harnesses. By May this year, the major AI coding harnesses added support to run a loop from a single prompt, using the /goal command.
3) Loops which devs use : triggers and cron jobs. The Pragmatic Engineer newsletter asked devs how they use loops. Most use cases involve responding to events or running scheduled jobs. They are useful, but don’t feel like brand new workflows.
4) Helpful loops for devs. Open PRs for newly-recorded app issues, have notes ready when an oncall joins an outage Slack channel, “babysitting” and fixing nightly end-to-end tests, and more.
5) Disappointment and “tokenmaxxing”. Several devs reject looping after trying it. Agents drifting, and the “human in the loop” having better results are some reasons. Also, at companies that pay API prices for tokens, loop engineering gets expensive fast.
6) Was looping a hack while tooling caught up ? Distinguished engineer Max Kanat-Alexander believes the “loop” might have just been a temporary hack while the harnesses added the ability to do the same from a single prompt.
7) Does “context engineering” matter more for devs ? Except for engineers building AI infra, there seems little benefit in going deep into loop engineering. Instead, becoming familiar with AI context windows – also part of building loops – could be more useful.
Below are some workflows with AI agents that run on a regular basis as a /loop command, or when triggered :
Development-related work
Open PRs for newly recorded app issues. Software engineer Ivan Pantić :
“App encounters a problem and creates a sentry issue. Then :
→ Cron tells agent to check sentry and open PRs.
→If there’s no active PR, agent tackles the issue and creates one
→ If PRs aren’t reviewed, agent pings the devs via slack
In this flow, there is only one PR open at a time.”
Fix flakey tests. Paul D’Ambra, software engineer at PostHog :
“/loop pull the next flakey test from the trunk API. Run it to check if it flakes locally, if it does open a PR with the fix… which netted me 13 PRs to stabilise some of our tests.”
Triaging issues and outages. Software engineer Ivan Abad :
“A new alert/exception pops up in a channel.
→ The agent investigates the issue
→ if it is a code change, implements the change
→ creates the PR
→ pings the human for review.
Same applies for customer tickets or incidents. By the time you get paged and connect to the incident the agent already triaged everything and often located the root cause.”
Review design plans. Artem Nikitin, software engineer at Elastic :
“What I’m finding myself doing often recently is to review design/implementation plans in a loop.
Usually, agents only find a few issues during a normal run and then find more on subsequent runs.
So I’m now asking them to run in a loop until they find 0 new major issues.”