Stop micromanaging your AI, one prompt at a time. Instead, design the loops that prompt it autonomously. That’s the core insight behind Loop Engineering, a concept that went viral last week thanks to observations from three independent software leaders. Boris Cherny (Claude Code) confessed he no longer manually prompts Claude—he writes loops that tell the AI what to do next. Peter Steinberger (OpenClaw) amplified this, tweeting that you shouldn’t prompt your coding agent, you should design the loops that prompt it. That post hit 8.3 million views. Then Google’s Addy Osmani codified the movement, naming it “Loop Engineering” and tying the threads together in a blog post. Now, the Loop Engineering Orange Book—a free, 32‑page open‑source guide—gives you a structured playbook to build such systems.
This isn’t another buzzword. It’s the logical next layer atop existing “engineering” disciplines. Prompt engineering optimizes your input to a single call. Context engineering manages what information the model sees. Harness engineering configures a single agent’s tools, permissions, and failure modes. Loop engineering sits above all of them: it orchestrates agents that run in cycles, wake themselves up, and adapt based on past outcomes. The trajectory is clear—you move further away from manual labor and closer to designing autonomous systems that work while you sleep.
A loop spins through five fundamental actions: Discover → Deliver → Verify → Record → Decide next. Addy’s example is a morning routine that reads yesterday’s CI failures, open issues, and recent commits. It delegates a fix to one agent, then brings in a second agent to review that work against test suites and coding standards. Approved changes trigger a PR and update tickets. All progress is written to a persistent markdown file, so the loop resumes where it left off. The key difference from a cron job is threefold: the system self‑triggers, remembers state across runs, and dynamically decides next actions based on results.
The most critical design principle is baked into that example: the AI that writes the code cannot be the one that judges it. A single agent evaluating its own output is almost always too confident—it wants to please. The solution is to split responsibility: one agent (or model) generates, a second agent (specifically tuned to be skeptical) evaluates. In Claude Code, the /goal command embodies this. You define a verifiable completion condition; after each attempt, an independent lightweight model checks whether the condition is met. If not, the loop continues. This separation of generation and evaluation is the engine that makes autonomous loops reliable.
Loop engineering isn’t just for coding—it’s a pattern for any repetitive cognitive task. Consider a customer support loop that discovers unresolved tickets, drafts responses, validates them against knowledge base articles, and escalates only the edge cases. Or a content moderation pipeline that scans posts, flags violations, and iteratively refines its own filters. The same five‑action skeleton applies across domains, with the same need for persistent memory and multi‑agent verification.
Yet the approach faces real challenges. First, cost: running multiple agent cycles, especially with evaluation steps, can quickly burn tokens. Second, reliability: a poorly designed loop can amplify errors, endlessly fixating on the wrong issue. Third, safety: autonomous loops need guardrails to prevent unintended actions (e.g., making changes you didn’t authorize). The Orange Book addresses these head‑on with patterns like bounded retry limits, human‑in‑the‑loop checkpoints, and gradual delegation.
The shift from prompting to loop design mirrors the transition from writing assembly to using high‑level languages. Prompts are micro‑operations; loops are abstractions that handle state, control flow, and error recovery. As agents become cheaper and more capable, this abstraction becomes inevitable. The question isn’t whether you’ll adopt loop engineering—it’s whether you start now while the patterns are still being written.
The Orange Book is meant to be a living document—community contributions are encouraged on GitHub. Start by identifying one task you currently perform manually with an AI: a daily code review, a weekly report generation, a recurring data cleanup. Map it to the five actions. Build a simple prototype with two agents and a flat file for memory. Then iterate. The best way to learn loop engineering isn’t to read about it—it’s to design a loop that teaches you.