Loop Engineering: Run Claude in a Loop Until the Work Is Actually Done
The method to turn Claude from a chat that answers once into a system that finds the work, does it, checks itself, and keeps going on its own until everything is done.
June 15, 2026 · 10 min read
Most people use Claude like a vending machine: you ask a question, it answers, you close the window. One decision, one result. Loop engineering flips that logic completely. You stop writing instructions one at a time and start designing the system that writes them for you, again and again, until there is nothing left to do.
A loop is a system that prompts an AI agent repeatedly to handle multi-item work, with no human stepping in between each step. Instead of prompting by hand "do task 1", then "do task 2", you write the rules of the game once and the agent runs through them on its own.
The mindset shift matters more than any tool: prompting is tactical (one instruction, one result). Loop engineering is strategic (you design the machine that produces the results). It is the difference between doing the work and managing the worker. This guide hands you the reusable skeleton and one concrete example.
The Claude AI Lab is my Skool community where I share my Claude systems and the more advanced modules. Entry is free.
Join the Lab →A loop does not stop after one result. It finds the work, does it, checks itself, records what is done, then goes again. You describe the finished state once, it handles the rest.
The five-beat cycle
Whatever the task, every well-built loop follows the same rhythm. Remember these five beats, the rest is just packaging.
The state file turns several runs into one continuous operation. Without it, every run starts from zero. With it, the same scheduled loop always resumes exactly where it left off.
The loop charter
Here is the core of the guide: a charter you fill in once and hand to Claude as its instructions. It covers the five beats and adds the goal and the stopping condition. Copy it, replace the brackets, and you have a loop.
GOAL: [the finished state in one sentence, with a checkable number.
Ex: "every product page in /pages has the right price and passes the link checker"]
WHERE TO FIND THE WORK: [say exactly where to look for items.
Ex: "scan the /pages folder" or "read the unchecked lines in TODO.md"
or "take the tasks tagged 'ai' on my connected board"]
HOW TO DO THE WORK:
- Finish one item completely before starting the next.
- Match the style and conventions of the existing files.
- On a decision that needs a human (spending, deleting, contacting),
do not decide: add it to a "needs decision" list and move on.
HOW TO CHECK YOURSELF: [pick the evidence that fits the task.
Ex: "run the tests" or "re-read and confirm alignment with the GOAL"
or "take a screenshot that shows the correct rendering"].
Evidence, not confidence. If it fails, fix and re-verify.
Max 3 attempts per item, otherwise mark it "blocked".
HOW TO REMEMBER: keep a LOOP-STATE.md file.
After each item, log: name, status (done / blocked / needs decision),
what changed, the context for the next run.
Read this file first on every run.
WHEN TO STOP: when everything is done or marked blocked, or after
[N] items for this run. End with a short report:
what is done, what is blocked, what needs a decision.
The most important part is the GOAL. A vague goal ("make it good") gives nothing to score against, so the loop stops like a regular prompt. A measurable goal gives it a wall to push against until it is truly finished.
The golden rule: the loop verifies on evidence, never on a feeling. "The test passes", "the link opens", "the screenshot shows the right price". Not "looks good".
The 5 pieces in Claude Code
The charter describes the behavior. Here are the five Claude Code bricks that make it possible and reliable, unattended.
claude -p "your loop prompt" fired by an external scheduler..claude/skills/ that store the project knowledge (structure, rules, formats). Write it once, and every loop run starts already informed.You do not need all five on day one. A simple loop holds up with a charter and an automation. You add worktrees, skills, connectors, and sub-agents as your loops grow.
The 3 caveats to know
A loop is not always the right answer. Keep these three limits in mind before you start.
Example 1: the research brief that checks itself
Take a classic task: write a one-page brief on a topic. The known trap is that Claude produces a clean brief with invented sources, without even knowing it made them up. The loop fixes this with a measurable goal.
Without a loop, you do this verification by hand, link by link, after the fact. With the loop, that checking work is built into the system, and the brief only comes out when it stands up.
Example 2: your sales pipeline that follows up on its own
Working solo, what kills your revenue is almost never a lack of leads, it is the follow-ups that slip through the cracks. You had a conversation, then life takes over, and three weeks later the prospect is cold. This is repeating, multi-item work, perfect for a loop.
The detail that matters: contacting someone is a human decision, so the loop stops right before sending, exactly as the charter prescribes. You keep your finger on the trigger, it does everything else.
Example 3: every video repurposed into multi-platform posts
You publish a video or a podcast episode, and 80% of the distribution potential dies because you do not have time to repurpose it. A loop turns a single piece of content into several posts, every time you release one.
The result: the day you publish, your derivatives are already ready to review and schedule, instead of staying a "to-do" that never gets done.
That is loop engineering: you no longer ask for a result, you describe what a successful job looks like, and you let the machine conform to it on its own.
Pick a single repeating task you already do by hand. Write it a measurable goal, fill in the charter above, set a limit of a few items for the first run. You will tune the verification after you have watched it run once.
Want to go further?
In the Lab, I share my Claude and n8n automations, from idea to something that runs while you sleep.
A dedicated session or program, tailored to your tools and use cases.
And day-to-day, I post one reel a day on Instagram: @quentin_iamarketing