Loop Engineering in Practice: the 32-Page Orange Book, Free and Open Source

·Toolin Editorial Team

The Loop Engineering Orange Book systematically unpacks the concept of loop engineering, its five-step workflow and six core components, with hands-on Claude Code commands; free to read on GitHub and WeChat Reading.

Loop Engineering in Practice: the 32-Page Orange Book, Free and Open Source

Loop Engineering is a new paradigm for AI programming proposed in early June 2026, simultaneously by Boris Cherny, head of Claude Code, and Peter Steinberger, author of OpenClaw. The core idea is a single sentence: you should stop prompting your AI coding agent yourself — you should design a loop system that prompts it for you.

This article is based on the open-source "Loop Engineering Orange Book" (32 pages) and unpacks the concepts, workflows, and hands-on methods of loop engineering.

What Loop Engineering Is

Along the evolution of AI agent engineering, each layer takes you one step further from doing the work with your own hands:

  • Prompt Engineering: governs how well the passage of text you hand the model is written
  • Context Engineering: governs what information goes into the model's head on a given run
  • Harness Engineering: governs the full equipment for a single agent run (tools, permissions, failure handling)
  • Loop Engineering: sits one layer above the Harness. It makes the agent wake itself on a schedule, hatch its own subtasks, and feed itself information

AI agent engineering evolution path

Loop Engineering sits above the Harness, in charge of making the agent run autonomously.

The Five Steps of a Loop

One revolution of the loop is five actions:

1. Discover

Read the signal sources: which CI jobs are failing, which issues are open, which commits were recently made.

2. Deliver

Pick out the work worth doing, spin up an isolated workspace, and dispatch an agent to draft the fix or implementation.

3. Verify

Dispatch a second agent to review the first agent's draft against the tests and project conventions.

4. Record

Write all progress into a markdown file that lives outside the conversation, so the next morning it can pick up where it left off.

5. Decide

Decide what to do next based on this round's results.

Core principle: the AI that writes the code must not grade its own code. One generates; the other exists purely to find fault.

The Six Core Components

The five actions are built on six components:

  1. Automation: the scheduled trigger mechanism
  2. Isolated workspace: each task runs in its own environment
  3. Skills: capability packs the agent can invoke
  4. Connectors: hooks into external systems (CI, issue trackers, and so on)
  5. Dual agent: one generates, one verifies
  6. Memory: state kept in files outside the conversation

Hands-On Claude Code Commands

Two commands recently added to Claude Code map exactly onto the two big jobs of loop engineering:

The /goal Command: Progress-Driven

Give it a verifiable completion condition; after each round, an independent lightweight model judges whether the condition is met, and if not, another round runs.

Claude Code /goal command

/goal suits work with a clear end state that can be verified: fix a bug until all tests are green, build a feature until every acceptance item is checked.

Pitfall to avoid: don't set "development complete" as the goal — that's letting it claim it works by its own say-so. Translate a vague "good" into measurable criteria. For example: define 5 target users, have a subagent role-play user reviews once done, and call it complete only when the average rating exceeds 9.

The /loop Command: Time-Driven

Run a task repeatedly on a fixed rhythm, say checking every five minutes whether the deployment has landed. You can also omit the interval and let the agent weigh for itself how long to wait between rounds.

Claude Code /loop command

/loop suits work that needs constant watching, status polling, or periodic repetition.

CommandDrive mechanismUse caseStop condition
/goalProgress-drivenTasks with a clear end stateStops automatically once the condition is met
/loopTime-drivenContinuous monitoring, polling tasksStops only when you say stop

The most wasteful usage: using /loop for work with an end state (it idles and burns tokens once done), or using /goal to watch external state you can't influence (it never exits the loop).

The Costs to Watch For

Beginners building loops tend to hit four traps:

  • Verification debt: an unwatched loop is also an unwatched error loop — the more cheerfully it runs, the more spectacularly it goes wrong
  • Understanding rots: the faster it delivers code you never wrote with your own hands, the wider the gap grows between the code in your head and the code actually in the repo
  • Token blowups: how many tokens an autonomous loop burns is hard to predict, and the bill can be scary
  • Judgment atrophy: you can't resist taking whatever the AI produces at face value, and gradually stop wanting to judge for yourself

Getting the Orange Book

The "Stop Asking Me What Loop Engineering Is" orange book is available the following ways:

Orange book cover

The book stands entirely on its own — you don't need to read the earlier "Harness Engineering" first to understand it.