
Boris Cherny, the creator of Claude Code, doesn't prompt Claude anymore. He writes loops. In the June 11, 2026 edition of Simple.ai, Dharmesh Shah (HubSpot CTO and founder) breaks down what that means and how to copy it. The good news: the pattern is three ingredients, not a framework.
What You Need to Know: Dharmesh Shah published "Learning To Write Your First AI Loop" on Simple.ai on June 11, 2026, arguing that the next step beyond prompting and context engineering is writing loops that let the AI know the end goal, judge its own work, and decide when to stop. The piece leans on a LinkedIn post by Guillermo Flor in which Claude Code's Boris Cherny said: "I don't prompt Claude anymore. I write loops — and the loops do the work. My job is to write loops."
The piece opens with a quote pulled from a LinkedIn post by Guillermo Flor, in which Cherny (the creator of Claude Code at Anthropic) describes his current workflow: "I don't prompt Claude anymore. I write loops — and the loops do the work. My job is to write loops." The post had been making the rounds in AI power-user circles; Shah's contribution was to translate the idea into a pattern a non-Claude-Code developer can use this week.
The framing Shah uses is a three-step evolution. Most people still do step 1: hand-fed prompting. "Enter a prompt, get an output, refine, repeat until you're satisfied." More advanced users have moved to step 2: context engineering, which means hydrating the context window with the right context — tools, skills, MCP servers, the things Claude or GPT need to do the job. Step 3 is what Cherny is describing: instead of prompting or context-engineering, you build the thing that generates the prompts for you. That's the loop.
The shift is from driver to mechanic. In a prompt, you're steering. In a loop, you're designing the thing that steers. The work moves from "ask the right question" to "build the system that asks the right questions."
Shah's three-ingredient model is the part worth memorizing.
The example prompt Shah gives is stealable: "Write a LinkedIn post about [your topic]. The objective: teach one useful idea in under 200 words. After each draft, score the result from 1 to 10... For scores below a 9, critique the draft and rewrite it. Take up to 10 passes, then show me only the top 3 winners." The objective is the useful idea. The metric is the self-score. The boundary is the ten passes. The output of this loop will be higher quality than a one-off prompt, because the loop has a built-in editor and a defined stopping point.
The "context is queen" upgrade: attach 3-4 examples of LinkedIn posts you love to the loop. The examples teach the model what "good" looks like in your voice, which makes the metric scoreable and the boundary meaningful.
The part of the piece that generalizes beyond LinkedIn posts is the distinction between a loop that runs and a loop that learns. A loop that runs is automation. It does the same thing today that it did yesterday. A loop that learns is adaptive — it knows whether each pass landed, and feeds that signal back into the next pass.
Shah's example is a dad joke generator he built (dadjoke.ai). Today, it's a loop that runs — you give it a topic, it works through his "dadabase" of curated dad jokes, it produces something occasionally not-that-awful. What would take it from running to learning is one small thing: an upvote/downvote button on every joke. Then the system would know which jokes landed and which flopped, and it could feed that signal back into what it generates next. Same loop, plus one feedback wire. Automatically gets smarter every time someone uses it.
The general principle: "If you can go through a loop and you know at the end of the loop whether you got better or worse, you're going to win eventually. The loop that learns beats the loop that merely runs."
If you've been treating AI like a vending machine (insert prompt, take output, repeat) — you're doing it the way Cherny was doing it two years ago, before he figured this out. The upgrade is cheap. Pick one task you already use AI for. Name the objective. Pick the metric. Draw the boundary. Run it. Then ask whether the loop has any feedback wire that lets it improve on the next pass.
The build-this-week version of the lesson: if you don't have a feedback signal, you don't have a loop — you have a fancier prompt. The whole value of the loop is that it can tell whether a given pass was good or bad without you reading every word. If you can't answer "how would the system know?" then you haven't designed a loop, you've designed a script.
The longer-term version: the people building the agent platforms of 2027 are writing loops today. Microsoft Foundry's "agent optimizer" (Build 2026) is a closed loop that turns production failures into ranked, reviewable improvements. That's exactly this pattern, just at scale. If you want to be on that platform, build your own loops now and learn how to think in objective / metric / boundary.
Boris Cherny, creator of Claude Code, doesn't prompt anymore — he writes loops. A loop is objective + metric + boundary. Add a feedback signal and it learns. Stop hand-cranking prompts, start designing loops.
Sources