learnaiwithrafa
ClaudeAgents

Loop Engineering: When You Stop Prompting and Start Managing

The Head of Claude Code says he doesn't prompt anymore — loops prompt for him. Here's what a loop actually is, the pieces that make one, and how to build your first without writing code.

3 min read2 sources
  • #claude-code
  • #agents
  • #loops

In a June 2026 interview, Boris Cherny — creator and Head of Claude Code at Anthropic — said something that reframed the whole skill: "I don't prompt Claude anymore… My job is to write loops." If the person who built the tool has moved past prompting, that's a signal worth reading.

Here's the shift. Prompting is tactical: one instruction, one answer, and you're stuck in the chair — typing, waiting, fixing, typing again. A loop takes the chair. You give it a single goal; it discovers the work, does it, verifies its own output, records what's finished, and repeats until the goal is met. Addy Osmani (Google), who popularized the term "loop engineering," puts it well: a loop is a recursive goal where you define a purpose and the AI iterates until it's complete.

The pieces that make a loop

Osmani names the concrete parts, and each maps to a real Claude Code feature:

  • Automations — the loop runs on a schedule, not when you type. Run Claude headlessly with claude -p "your loop prompt" from a scheduler, or use the in-session /loop.
  • Worktrees — a Git worktree hands each agent an isolated checkout of the repo, so two can run at once without stepping on each other.
  • Skills — a SKILL.md in .claude/skills/ holds the knowledge you keep re-explaining, so every run starts already knowing your project.
  • Connectors — MCP integrations (claude mcp add) let the loop touch your real tools: the task board, the inbox, the database.
  • Subagents — a builder in .claude/agents/ does the work; a separate reviewer checks it. The agent that does the work shouldn't be the one grading it.
  • State — a markdown file (or a Linear board) where the loop writes what it finished, so ten runs become one continuous worker instead of ten fresh starts.

Where most people go wrong

The goal you hand it must be something it can score itself on — a number, a percentage, a checklist — not "make it good." Verification is the whole game. As Osmani warns, a loop running unattended is also a loop making mistakes unattended. No self-check means you've just built a machine that's wrong faster.

Do this today

Pick one annoying multi-item task you do by hand — a backlog to clear, a folder to clean. Write it as a goal the agent can verify, add a LOOP-STATE.md for memory, and run it once while you watch. That single move is how you stop being the one who prompts and start being the one who designs the system that does.

Sources