# "Claude Code Creator: “Write Loops, Not Prompts”"
<!--
ref: @content/youtube/sean-kochel/claude-code-creator-write-loops-not-prompts
tags: [agent loops, Ralph loop, goal command, Claude workflows, token controls, verification loops, skills]
version: 2
updated_at: 2026-11-22T13:44:21.638Z
-->
**[Watch on YouTube](https://www.youtube.com/watch?v=EH2MMQTaPEA)**
# Claude Code Creator: “Write Loops, Not Prompts”
*Synthesized from Sean Kochel, 2026-06-09.*
Sean Kochel presents solo, reacting to a viral post from the creator of OpenClaw (named in the transcript as Peter Steinberger) and to loops attributed to Boris Cherny, whom he calls the creator of Claude Code.
## Core Thesis
Sean argues that agent loops are a simple, practical idea: a small program that prompts the agent, checks the output, and reprompts until done. They are worth building only if you can already run two or three parallel sessions yourself, they need hard cost controls, and their effectiveness depends on good skills and clear context about where a human must step in.
## Key Insights
- **Lineage.** The ReAct paper (2022 or 2023) formalized reason, act, read output, repeat with a human watching. AutoGPT let a model prompt itself toward a goal but went down rabbit holes. The Ralph loop reran the same prompt with a fresh conversation each time, capped by an iteration count ("discipline through forced amnesia"). Codex and Claude Code then productized it as a goal that runs until criteria are met rather than for N iterations.
- **Definition.** A loop prompts the agent, reads what it produced, decides whether it is done, and reprompts if not. People now stack loops that control other loops.
- **Why cost is in the news.** He says Uber used its entire AI budget in 4 months and capped engineers at about $1,500 per tool per month.
- **Mechanisms.** The goal command, and Claude's workflows, where orchestration lives in an externally managed JavaScript function instead of the agent orchestrating itself.
- **Three controls.** (1) A maximum iteration count, even when a goal exists. (2) Detecting lack of progress, which he thinks is where runaway bills come from. (3) Token ceilings, such as a max token budget per sub-agent in a workflow.
- **Open questions.** How loops handle ambiguity (business intent should be documented in markdown or the loop should not be used); where planning lives (Steinberger reportedly uses a vision markdown file per project, which Sean learned from a Grok summary as covering the core problem, intended solution, goals, technical principles and success criteria); and where the human steps back in.
- **Readiness test.** If you cannot already manage two or three parallel sessions yourself, building a loop is a bad idea.
- **Three starter loops.** (1) Issue backlog: a goal prompt to work through GitHub bug issues with a systematic debugging skill, add a test, commit and open a PR per bug. (2) Front-end verification: use the Chrome extension or an iOS simulator to snapshot and inspect the DOM, compare to the design (for example in Claude Design) and iterate until it matches, capping tries. (3) Code review: Boris Cherny runs a "loop every 5 minutes" with a custom babysit command that handles code review, rebases and shepherds PRs.
## Actionable Takeaways
1. Set an iteration cap, a no-progress check and a token ceiling on every loop.
2. Start with a goal command over your GitHub bug issues, requiring a test case and a PR for each.
3. Add a UI verification loop that compares your local build to the design and caps retries.
4. Keep a vision or spec markdown file so the loop does not guess business intent.
5. Build skills first and wire them into loops, rather than expecting loops alone to add capability.
## Notable Quotes
> "loops are like plumbing, but if you're pouring concrete and eggshells down there, you're going to have a really bad time." — Sean Kochel
---
*Related: `@content/web/github/2026-11-25-claude-code-v2-1-332` · `@content/web/github/2026-11-24-builtin-ship-shadows-user-skill` · `@content/web/github/2026-11-17-open-artifact` · `@content/youtube/yifan-bth/i-reverse-engineered-claude-code-learn-these-agent-tricks` · `@content/youtube/yifan-bth/the-openclaw-security-settings-i-actually-change`*
---
*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*
*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*