Free resource

Loop Engineering: The Playbook for Building Your First AI Loop

Loop engineering means you stop prompting Claude turn by turn and build loops that do the prompting for you. Boris Cherny, the guy who built Claude Code, put it flat out: "My job is to write loops." This playbook covers what a loop actually is, the six parts that let one run on its own, and the exact 5 steps to ship your first.

TLDR

For three years the skill was wording. You typed a prompt, you got an answer, you typed again. That era is closing. Boris Cherny, the guy who built Claude Code, said it flat out: he doesn't prompt Claude anymore. He builds loops that prompt Claude for him. His words: "My job is to write loops."

This is the playbook for making that jump. The three eras of talking to AI, what a loop actually is, the six parts that turn a chatbot into a self-running machine, and the exact 5 steps to ship your first loop this week.

The three eras of talking to AI

Every wave moved the skill up a layer. You didn't get worse at the old thing. The leverage point moved.

  • Era 1, Prompting (2023). ChatGPT goes mainstream. You type, it answers. One turn. The whole skill was the wording. You are the typist, in the loop every single turn.
  • Era 2, Prompt engineering (2024 to 2025). Few-shot, chain-of-thought, system prompts, context stuffing. Real craft. But it's still you steering the wheel on every turn.
  • Era 3, Loop engineering (2026). You stop steering. You build the machine that steers. The agent finds the work, does it, checks itself, decides the next move, and repeats. Unattended. You go from driver to factory designer.

Here's the trap. If you're still prompting turn by turn in 2026, you're not behind on a trick. You're behind on the whole way work gets done.

What a loop actually is

A loop is a recursive goal. You define a purpose, the system iterates until it's done. Prompting optimizes one turn. Loop engineering optimizes the whole system.

The difference that matters: a prompt stops the second you stop typing. A loop runs on a schedule, checks its own work, and keeps a memory so it picks up where it left off. One message equals one output. A loop equals output that scales past your hours.

The six parts of a loop

This is what turns a chat box into a self-running machine. Miss the last two and you don't have a loop, you have a money fire.

  • Automations — scheduled triggers that kick the loop off on their own
  • Separate workspaces — isolated lanes so multiple agents work at once without colliding on the same files
  • Skills — your conventions and context written down, so the agent acts like you instead of guessing
  • Connectors (MCPs) — the wires into your real tools: Slack, your CRM, the live web
  • Sub-agents — one agent makes, another verifies. Maker split from checker. This is the heart of trust
  • State and memory — external notes the loop writes to, because the model forgets between runs

Your first loop in 5 steps

Don't start by leaving it running 24/7. That's how people burn money. Right order: make it work once by hand, then make it check itself, then let it run.

  • 1. Pick a boring, repeating task. Not your hardest problem, your most repeated one. Inbox triage. Draft replies to new leads. A daily sales summary
  • 2. Write the goal with an exit. Bad: "improve my content" (runs forever). Good: "read the 5 newest comments, draft 1 reply each, stop." A loop needs a finish line
  • 3. Do it once by hand in Claude Code. Prompt the whole task manually and watch where it guesses wrong. That tells you what context it's missing
  • 4. Teach it a skill and give it a checker. Write a SKILL.md with your rules and examples. Then add a second pass that asks "did this meet the goal?" before anything ships
  • 5. Automate it last. Wrap it in a schedule that runs the loop and reports back. Keep a human gate ("draft, don't send") for the first week. Remove it only once you trust the checker

Your literal first loop: "Every morning at 8am, read my new emails, draft a reply to each lead, save the drafts but don't send, and message me a one-line summary. Stop when the drafts are done." Safe, useful, real.

Two ways to run loops

Two rungs of the same ladder. One you trigger and verify. One that triggers itself on a server you never touch.

  • A loop you run, PAUL. An orchestration layer for Claude Code. Plan, apply, unify, loop. Nothing is "done" until it reconciles the plan against reality and writes its own state. Pair it with SEED to turn a raw idea into a PAUL-ready plan first
  • A loop that runs itself, Hermes. A self-running agent on a server. Cron wakes it, it acts and verifies on its own, then reports back into Slack or Telegram. You wrote the loop once, it works while you sleep. Full setup in the Hermes 24/7 agent playbook

The one trap to avoid

The hype has a dark side called loopmaxxing, the belief that an infinite cycle eventually produces a correct answer. It doesn't. A loop with a vague goal and no checker just converts your budget into an API bill while you sleep.

Two things make a loop instead of a money fire: a clear stop condition (when is it done?) and a checker (did it actually work?). Drill those two and you have the whole skill.

Go deeper

Want the repos, the deeper breakdowns, and a community shipping this exact stack? Join AI Autopilot Academy.

Read the Hermes 24/7 agent playbook

See every free resource