PTENES
MODULE 1.1

🔄 What Is Loop Engineering

Where the concept came from, why it became a buzzword, and what "loops that do the prompting for you" really means.

6
Topics
25
Minutes
Basic
Level
Theory
Type
1

🧠 The Origin of the Term

Loop Engineering emerged as a way to describe something leading practitioners were already doing: program automated loops that prompt AI agents, instead of having the human type each instruction manually. The term gained traction when figures like Boris Cherny (Head of Claude Code at Anthropic) and Peter Steinberger (creator of OpenClaw) began talking publicly about their workflows.

💬 The Voices That Started the Movement

Two statements went viral and gave the term substance:

"I don’t write prompts for Claude anymore. I write loops, and the loops do the work. My job is to write loops."
— Boris Cherny, Head of Claude Code, Anthropic

Peter Steinberger, from OpenClaw, expressed the same idea: he doesn't prompt agents directly, but designs the loops that do it for him. Cole Medin, analyzing these statements, observed that "loop engineering is kind of a buzzword, but also there are some really good takeaways when you dive into this".

🎯 Reflection Point

Cole Medin openly questions: "I don't even know if it deserves its own term." Loop Engineering isn’t a new technology. It’s a rearrangement of existing concepts (cron jobs, automation, orchestration) applied to AI agents. The real value is the conversation about how and when to let agents work autonomously.

2

⚙️ Practical Definition

In practice, Loop Engineering is design a system where automated loops prompt AI agents, freeing the human from sitting in front of the terminal typing each instruction. The human defines the strategy and criteria; the loop executes, validates, and iterates.

PROMPTING MANUAL Human AI agent Human repeats... LOOP ENGINEERING Human (define the strategy) Loop repeats AI agent AI agent

✓ Loop Engineering

  • ✓Human defines the plan and criteria once
  • ✓Loop periodically wakes the agent
  • ✓Agent works, validates, reports
  • ✓Scales to multiple tasks

✗ Manual Prompting

  • ✗Human stays in the terminal for every instruction
  • ✗Doesn't scale to multiple tasks
  • ✗Constant interruption of the workflow
  • ✗Depends on human availability
3

🔗 The Analogy with Cron Jobs

If you've worked with servers, the concept of loop engineering will seem familiar. Think of a cron job: a scheduler that wakes a script at a set interval. Loop Engineering is exactly that, but instead of running a bash script, you wake an AI agent with a prompt, and it decides what to do based on the current state of the world.

📋 The Basic Recipe for a Loop

1

Define the external input

A GitHub repository, a folder of documents, an API, a database.

2

Define the interval

Every 5 minutes, every hour, or "work until finished" (/goal).

3

Define the completion criteria

"All tasks marked as done," "0 open issues," "all tests pass."

4

Let the loop run

The agent wakes up, checks the state, executes the next task, validates it, and sleeps.

"Engenharia de loops é combinar ou criar um sistema em torno de todas essas coisas — rotinas, /loop — para que possamos fornecer um escopo de trabalho maior a um assistente de programação com IA e fazer com que ele avance aos poucos."
— Cole Medin

The key word here is incrementally. The central point of a loop is that the agent never tries to solve everything at once. It takes one task per cycle, executes it, validates it, and the loop moves forward. As Cole says: "we never want to have a coding agent try to handle too much at once, or it will get completely overwhelmed."

4

👤 The Personas: Boris, Peter, and Cole

To understand Loop Engineering, it's helpful to know who's behind the conversation. Each person brings a different perspective, and the differences matter.

BORIS CHERNY Head of Claude Code, Anthropic

Manages tens of thousands of agents per day, according to him. Uses /loop, /goal and /routines in Claude Code as fundamental building blocks. He is the one who most promotes the concept of "I don't prompt anymore; I write loops." It's important to note that he works at Anthropic—and has access to computing resources most people don't.

PETER STEINBERGER Creator of OpenClaw

Another vocal advocate of autonomous loops. He runs loops that prompt Claude for him, delegating almost the entire development cycle. Cole Medin notes that he operates with "pretty much an infinite budget," which makes his setup difficult for most developers to replicate.

COLE MEDIN Creator of Archon

A more skeptical and practical position. Recognizes the value of loops but asks: “I am not sold on this idea right now.” Built his own approach with deterministic workflows in Archon, where the human controls the process instead of delegating it entirely to the agent. His focus is cost, reliability, and observability.

🤔 Reflection Point

Cole Medin raises a direct question about Boris: "Boris Cherny says that there are days he manages tens of thousands of AI agents at once. Like really, is that actually practical? Is that going to scale?" Then he challenges the claim: "I mean, maybe that does explain some of the bugs we have in Claude Code." It’s an honest perspective — the people promoting loop engineering have access to resources most people don’t.

5

📊 The Basic Flow of a Loop

At the simplest level, Cole Medin demonstrated loop engineering with a straightforward example in Claude Code. He provided a specification document (plan.md) with numbered tasks and asked Claude Code to use the loop skill.

"Sei que este é um exemplo muito, muito básico, mas quero manter tudo simples de propósito. Mas ele escreveu o prompt: /loop work through plan.md one task at a time."
— Cole Medin

🔧 What Happened in the Demo

1

Cole entered the prompt asking it to load the "loop skill". Claude Code loaded the capability and knew how to set up the loop system on its own.

2

The agent identified this as a sequential task list and configured /loop automatically. “It says this is sequential task list, it's going to do the first task, and then it's going to schedule a quick wake up.”

3

Each cycle, the agent did the task, validated it, and scheduled the next wake-up. "It's resuming with a slash loop wake up. And look at that. I didn't write this prompt myself at all."

4

In two minutes, it had already completed two tasks. The loop would continue until it completed them all.

📌 The Central Point

Claude Code acts as both orchestrator and worker here. It sets up the loop, writes the loop prompt, and executes the tasks. For simple cases, this works. For more complex systems, as we'll see in Module 1.3, separating the orchestrator from the workers becomes essential.

6

❓ Questions

Before diving into the technical blocks, it’s worth pausing to raise legitimate questions that Cole Medin himself asks about the concept.

Does Loop Engineering deserve to be its own term?

Cole Medin is direct: "I don't even know if it deserves its own term." The idea of automating tasks with loops and schedulers has been around for decades. What changes is the LLM at the center. But the mechanics — cron, wake up, execute, sleep — are the same as ever. Calling this "engineering" is, at the very least, generous.

Who actually benefits?

The biggest advocates of loop engineering are people with access to massive budgets and cutting-edge infrastructure. Boris has Anthropic's resources. Peter operates with a practically unlimited budget. The real question is: does this scale for a solo dev or a startup with a tight budget?

Autonomy vs. Quality: Is it a trade-off?

Cole sums it up: "there is no way you're gonna convince me that loop engineering is the way to get the best results possible with AI coding assistance." More autonomy means less control. Less control means more risk of poor results. Module 2.2 will examine this in detail.

⚠️ Cole's Challenge

At the end of the analysis, Cole sums it up: "I would just fold loop engineering into harness engineering. It doesn't quite deserve its own buzzword. But there are some good ideas here." The idea isn't dismissed—it is repositioned. Loop Engineering is an ingredient, not a complete meal.

📋 Module Summary

✓
Loop Engineering — automated loops that prompt agents instead of a human
✓
Origin — Boris Cherny (Anthropic) and Peter Steinberger (OpenClaw) popularized the concept
✓
Mechanics — cron jobs + LLM: define the input, interval, and completion criteria, then let it run
✓
Healthy skepticism — Cole Medin: "it doesn't quite deserve its own buzzword, but there are good ideas here"
✓
Central trade-off — more autonomy = less control = more risk without a harness

Next Module:

1.2 — The Fundamental Building Blocks (/loop, /goal, /routines)