Writing Loops, Not Prompts, Explained
The article argues that when you find yourself repeating the same prompts with AI agents, it’s smarter to build a “loop” – a system combining intent, context, action, evaluation, memory, and a stop condition – rather than manually steering each step. It shows how to calculate when a loop’s upfront cost pays off over repeated tasks and gives examples ranging from CI checks to goal-based agent scripts.
- Break-even formula for automating a task: P × N × (S + R) > F, where reliability, run count, and time/risk saved must outweigh setup cost.
- A 90-minute "shipping skill" script pays off after ~8 PRs if it saves 10 min per PR plus 5 min of review drag.
- A 4-hour repo-triage script saving 35 min/day breaks even in ~10 workdays at ~70% reliability.
- The real bottleneck shifts from doing the work by hand to noticing which recurring tasks are worth turning into a self-sustaining loop.
Peter Steinberger, Boris Cherny and Addy Osmani have shifted the focus from writing one-off prompts to designing loops that automate recurring steps in agentic coding tools. A loop bundles intent, context, action, evaluation, memory and a stop condition into a repeatable workflow. Instead of manually feeding the same repo context, deployment checklist or tests into each prompt, you build a script, skill or scheduled run that does it for you until a defined end point or when human judgment is needed.
The real gain comes once the time you save per run, multiplied by the number of runs and the chance the loop stays working, outweighs the cost to build and maintain it. Steinberger offers a simple break-even formula: P × N × (S + R) > F, where F is setup cost, N is number of future tasks, S is minutes saved per task, R is avoided risk cost and P is the loop’s reliability. In one example, spending 90 minutes to write a “shipping skill” that saves 10 minutes per pull request plus 5 minutes of review drag pays off after about eight PRs. A four-hour daily repo-triage script paying back 35 minutes per day breaks even after ten workdays if it stays roughly 70% reliable.
He frames this as a shift in your execution horizon: early on, your bottleneck is “hands” doing the work; later, it’s your own ability to spot what matters among many options. Treat loops like renewable trees in Minecraft—you still cut them down, but you plant saplings near your base so you stop wandering off for new resources. Good loops run with minimal babysitting. Better ones report evidence or build tests so each mistake makes the next run cheaper. That compounding effect turns a prompt into a growing system rather than a one-off request.