What Is a Self-Running AI Loop?

Moving from typing every prompt by hand to letting the AI decide what to do next and keep running on its own. This article lays out the idea and where it came from. If you just want to install it, jump to the Self-Running Loop setup guide. If instead you just need a prompt for a one-off task, the template-based prompt generator is faster.

What this is about

It started with a remark by Boris Cherny, who leads Claude Code at Anthropic. On the Acquired podcast (June 2026) he described how his own work had changed.

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.

A year earlier he wrote code with IDE autocomplete; in between he ran several Claudes in parallel and prompted each by hand. Now he doesn't prompt at all; he writes the loops that prompt Claude. In the last 30 days of December 2025, he says 100% of his contributions to Claude Code were written by Claude Code itself, landing 259 pull requests.

The clip spread widely, including in translated retellings. But the version that went viral drifts from the original in a few ways.

So the core is real, but the "everyone is losing out" framing was added on. The right reading is to install it only where it fits.

What a self-running loop actually is

A self-running loop is not one clever prompt. It is a system that separates "decide, build, verify" and repeats them.

It has four parts.

What you write shifts to "the goal in one sentence" and "fixing the loop." Working out each step becomes the job of the "decide" role, not yours.

Where it fits

It fits tasks whose results a machine can verify. Do the tests pass, does the build succeed, does the app start. Because pass/fail is decidable there, the loop can correct itself without a human watching.

It does not fit work you cannot verify. Subjective writing quality, or work that needs outside approval, gives the loop no pass/fail criterion. For those, a human at the wheel is faster and safer, as before.

To use the official features, start with /goal and /loop

As of October 2026, vendors ship the "drive" and "evaluation" parts of a self-running loop as built-in features. You can start with these before writing any script.

To keep work running after you close the session, use Claude Code's cloud or Desktop scheduled tasks (Source 2). Cloud scheduled tasks (routines), agent memory, and dreaming are covered in How to let AI write its own prompts. When you want separate permissions per role, or a cost cap on every call, build your own script. The Self-Running Loop setup guide covers how.

Getting started

Once the idea is clear, the fastest way to learn it is to run it once in a minimal setup. The Self-Running Loop setup guide collects a CLAUDE.md template, per-role subagent definitions, a copy-paste loop script, and how to set cost caps.

Start with low iteration and cost caps on a small, verifiable task. Once it runs well, widen the scope gradually.


Sources

  1. Anthropic, "Keep Claude working toward a goal" (checked October 26, 2026)
    https://code.claude.com/docs/en/goal
  2. Anthropic, "Run prompts on a schedule" (checked October 26, 2026)
    https://code.claude.com/docs/en/scheduled-tasks
  3. OpenAI, "Follow a goal" (checked October 26, 2026)
    https://developers.openai.com/codex/use-cases/follow-goals/
  4. Cursor, "Agent Skills" (checked October 26, 2026)
    https://cursor.com/docs/skills

Open Prompt Station (the prompt builder)