Peter Steinberger's tweet hit 6.9M views with two sentences: "You should not be writing prompts for coding agents anymore. You should be designing loops that prompt your agents."
Days earlier, Boris Cherny, the creator of Claude Code, said essentially the same thing: "I don't prompt Claude anymore. I have a bunch of loops running, and they are prompting Claude and deciding what to do next. My job is writing loops."
Two builders. Same conclusion. A new abstraction layer is forming.
What is loop engineering
Loop Engineering means developers stop hand-writing prompts for each task. Instead, they design systems that continuously prompt, schedule, and constrain their agents.
Think of it as the shift from writing code to designing the thing that writes code. Some call it going from "prompt engineer" to "meta-prompt engineer." You define goals, feedback signals, and boundaries. The loop handles the rest.
Loops are not cron jobs
"Isn't a loop just a cron job? Are they just telling the model 'make this app better' on repeat?" Fair question from the community.
No. A loop without feedback is just an agent confirming itself in circles. Here's what separates a real loop from blind automation:
- Feedback signals. Tests, type checks, real errors. Something that can say "no" to the agent. Peter uses
VISION.mdfiles as this mechanism. - Stop conditions. The loop needs to know when to stop, when to roll back, and when to hand off to a human.
- Bounded scope. YC CEO Garry Tan warned against turning agents into repetitive labor machines. Give them clear context, auditable actions, and safe exits.
Without these, agent errors get amplified with every iteration.
What this looks like in practice
Claude Code shipped a native /loops command. Unlike wrapping claude -p in a shell script (which cold-starts every call with no prior context), /loops runs inside a persistent session. It retains the context window, tool permissions, and MCP connections across iterations.
A loop can be as simple as:
/loop "Every 5 min, check if PR build passed. If failed, read error log, fix, push a new commit." --interval 5m --expires 8h
Boris said he now runs "thousands" of agents overnight using Loops (local, cron-scheduled) and Routines (server-side). Agents keep working after you close your laptop.
The cost reality
Every loop iteration is a full API call. Set a 1-minute interval running for 8 hours and you get 480 calls. That adds up fast.
Boris and Peter both have near-unlimited token budgets from their companies. Most builders don't. When someone pointed out the $20 plan won't cut it, Peter replied: "True. But is your time really worth nothing?"
A community member put it well: "Token-rich companies can run while loops freely. Token-constrained startups use for loops with tighter bounds to achieve the same goal, just slower."
The pattern works. The question is whether your token budget can keep up with the abstraction.
Source
Peter Steinberger's original tweet: https://x.com/steipete/status/2063697162748260627