Stop Prompting And Start Looping. A Claude Code Engineer’s Guide to /goal and /loop Boris Cherny, creator of Claude Code at Anthropic, introduced /goal and /loop commands that enable autonomous AI agents to work without human intervention, shifting the paradigm from prompting to loop engineering. The /goal command sets a finish line verified by a separate evaluator model, while /loop runs prompts on a timer, allowing developers to write loops that prompt Claude rather than prompting it directly. TL;DR:/goal gives Claude Code a finish line and a second model to check if it’s been crossed - Claude keeps working autonomously until the condition is provably met. /loop runs a prompt on a timer, polling on a schedule without you present. Together they are the foundation of loop engineering. The paradigm shift Boris Cherny, creator of Claude Code, described in Jun 2026 as :This article covers both commands from first principles, and also practical demonstration by building loops on simple application end to end.“I don’t prompt Claude anymore. I have loops running that prompt Claude and figure out what to do. My job is to write loops.” For most of Claude Code’s user, the interaction model looked like this : Here if you observe carefully, you were the loop. Every iteration required your attention. You read the output, decided if it was good enough, and either approved or corrected. Claude was fast, but you were still the bottleneck. In June’2026, Boris Cherny the creator and head of Claude Code at Anthropic described how his own workflow had changed he said that “I don’t prompt Claude anymore. I have loops running that prompt Claude and figuring out what to do. My job is to write loops.” Google’s Addy Osmani put a name to it : Loop Engineering The shift is conceptual before it’s technical. The question stops being “how do I write a good prompt?” and becomes “how do I write a finish line precise enough that a machine can tell when it’s been crossed?” That finish line is /goal . The clock that keeps the look ticking is /loop . Before diving into the commands, it’s worth understanding what Claude Code is doing under the hood, because both commands are built on top of it. The official docs describe it simply : “When you start an agent, the SDK runs the same execution loop that powers Claude Code : Claude evaluates your prompt, calls tools to take action, receives the results, and repeats until the task is complete.” In each full cycle, claude produces output, tools execute, results feedback is one turn. A simple question might take 1–2 turns. A complex refactor can chain dozens. The loop runs until claude produces a text-only responses with no tool calls. That’s the natural stopping point. But “Claude decides it’s done” is a problem in this process : without an external checks, Claude is grading its own homework. And /goal solves this at the architecture level. The official definition from the Claude code docs : "/goal works by wrapping a session-scoped prompt-based Stop hook. Each time Claude finishes a turn, the condition and the conversation so far are sent to a small fast model which defaults to Haiku which returns a yes-or-no decision and a short reason. A 'no' tells Claude to keep working and includes the reason as guidance for the next turn. A 'yes' clears the goal and records an achieved entry in the transcript.” Let that sink in. There are now two models running: The evaluator model does not call tools. It can only judge what claude has already surfaced in the conversation. This is the key architectural insight : the checker is intentionally blind to the codebase and it can only verify what Claude has demonstrated, which forces claude to surface proof of completion, not just claim it. The /goal Command Interface /goal