@VoltexGar: Boris Cherny, Head of Claude Code, Anthropic: "you can define a stop hook that's like, if the tests don't pass, keep go…
Summary
Boris Cherny, head of Claude Code at Anthropic, explains four key loops (stop hooks, verification, subagents, and memory) that make the tool highly effective for coding tasks, with simple configs that senior engineers use to outpace others.
View Cached Full Text
Cached at: 06/29/26, 02:22 AM
Boris Cherny, Head of Claude Code, Anthropic:
“you can define a stop hook that’s like, if the tests don’t pass, keep going. essentially it’s like you can just make the model keep going until the thing is done.”
that one config is the post’s loop #1, straight from the person who built the tool. a stop hook fires every time the turn ends, so the work can’t be called done until tests and lint go green. deterministic, zero effort, the loop most people skip.
cherny describes the verification loop in his own words too: for big changes his team spawns subagents to find every issue, one checking claude.md compliance, one combing git history, one hunting bugs, then five more subagents whose only job is to kill the false positives. a fresh clean-context critic catches what the builder talked itself past.
and the memory loop, in his words: if you see a mistake, you just tell claude to add it to claude.md, so next time it already knows. the correction outlives the session it happened in.
four loops, none exotic. each is a few lines of config or one instruction. seniors out-ship everyone else because they run all four at once, not because their model is smarter.
Similar Articles
@ClaudeDevs: https://x.com/ClaudeDevs/status/2074208949205881033
A practical guide explaining different types of loops (turn-based, goal-based, time-based) for configuring coding agents in Claude Code, including how to define stop conditions and improve self-verification.
@hanakoxbt: Anthropic Claude Code engineer: "If you're watching Claude write code, you're the QA tester. That's not what you're pai…
An Anthropic engineer explains how to use Claude Code in a loop to autonomously write code and manage PRs, allowing developers to step away from the keyboard entirely.
@PrajwalTomar_: You don't understand how BIG this is. Anthropic just published the 4 ways to make Claude Code work without you. Everyon…
Anthropic published four types of loops for Claude Code to operate autonomously: turn-based, goal-based, time-based, and proactive, allowing different levels of task handoff.
@PrajwalTomar_: Claude Code ships broken code by default. This 4-loop setup catches every bug before it's allowed to finish. → A Stop h…
PrajwalTomar shares a 4-loop setup for Claude Code that enforces test suite execution on every change, prevents marking work done while tests fail, uses a separate model to confirm completion, and writes repeated mistakes to a rules file.
@svpino: Claude Code to write your code and Codex to verify it. I met with a team that's been doing this for a few weeks now. I …
A developer shares an approach where teams use Claude Code for writing code and Codex for verification, focusing on detailed specs and overnight AI agent runs.