# Boris Cherny on Loops
> [!quote] The core statement
> "Now it's actually levelled up, I think, again, to the next wave of abstraction where I don't prompt Claude anymore. I have loops that are running. They're the ones that are prompting Claude and figuring out what to do. ==My job is to write loops==."
[[Boris Cherny]] is the creator and Head of Claude Code at Anthropic. He made this statement ~2 days ago (June 2026) and added: "This is a transition we're going to see for the rest of the year."
## The trajectory
The abstraction ladder he's describing:
- **A year ago** — writing code manually with autocomplete.
- **Then** — running 5–10 Claude instances in parallel, prompting Claude to write code.
- **Now** — one layer above: writing the systems that talk to Claude, evaluate outputs, and decide what to do next.
The human role shifts from **execution → orchestration**.
## What "loops" means in practice
From the Claude Code docs and Boris's own workflow, the agentic loop has a defined structure.
> [!info] The `stop_reason` signal
> `stop_reason` is the authoritative signal for what happens next:
> - `"tool_use"` → Claude wants to call tools; the loop continues.
> - `"end_turn"` → it's done.
>
> Claude can return text *alongside* `tool_use` blocks in the same response — text presence does **not** indicate completion.
### Three-phase execution pattern
> gather context → take action → verify results
These phases blend together. The loop adapts to the request:
- A question about a codebase → may only need **context gathering**.
- A bug fix → cycles through **all three phases** repeatedly.
- A refactor → may involve extensive **verification**.
### Production-grade loop design
- **Permission enforcement** — validate each tool call before execution.
- **Error recovery** — feed failed tool calls back to the model with structured error info so it adjusts rather than crashes.
- **Timeout management** — bound long-running operations to prevent infinite loops.
## The `/loop` command
Boris shipped a `/loop` command in Claude Code: it schedules a prompt to run on a recurring interval for **up to 3 days unattended**. Useful for PR babysitting, Slack summaries, deploy monitoring, or any repeating workflow.
```
/loop babysit all my PRs. Auto-fix build issues and when comments come in, use a worktree agent to fix them.
```
## The core design principle
> [!important] Give Claude a way to verify its own work
> Without a verification loop, **you** are the only feedback signal. With it, Claude iterates until the code actually runs. Boris pegs this single move at a ==2–3x quality bump==.
For very long-running tasks, Boris uses one of:
- Prompting Claude to verify its work with a background agent when done.
- An **agent-stop hook** for deterministic verification.
- Autonomous looping plugins.
On fully autonomous loops: you need a near-perfect spec for it to work well — that's a lot of upfront work. But for side projects where precision matters less, it's fine to spec it out and let it run overnight.
## Implication for Utopia
> [!tip] Where to apply this
> For [[Fellows]] or the [[Co-Build Portal]], the practical takeaway: your most valuable AI leverage isn't in crafting better prompts — it's in **designing loops with verification gates**. The spec quality going in is the constraint, not the model.
## Related
- [[Claude Code]]
- [[Agentic loops]]
- [[Verification gates]]