Stop Being the Loop: How to Make Claude Work While You Sleep

@ElCopyMaster
สเปน1 วันที่ผ่านมา · 30 มิ.ย. 2569
546K
74
18
7
229

TL;DR

This article explains how to transition from manual prompting to designing autonomous loops in Claude Code, allowing the AI to self-verify and complete complex tasks independently.

The person who created Claude Code at Anthropic has stopped writing prompts for Claude.

https://x.com/bcherny/status/2064885111477219664

His name is Boris Cherny. In June 2026, he said it bluntly:

"I no longer write prompts for Claude."

Now it's loops that give instructions to Claude. His real job consists of designing those loops.

It might sound like an exaggeration, but it's not.

It is probably the biggest change in how people are using Claude and ChatGPT.

Surely you've heard of it by now.

Almost nobody is doing it yet.

This is how you work right now

You write a prompt.

Claude edits a file.

You run the test.

It fails.

You copy the error and paste it back to him.

Claude tries again.

Twenty minutes later you realize you've been supervising exactly the work you wanted to delegate.

You are the loop.

You are the one who reviews the result and decides what the next step is over and over again.

That is precisely what a loop does for you.

An example explains it all

Ask Claude to write a one-page report on any topic.

Rafa Gonzalez | IA - inline image

Now read the sources.

Some are fake (!!!).

Claude made them up and doesn't even know it.

They look completely real.

The links lead nowhere, or point to pages that don't say what Claude claims.

This is how Claude can make you look bad without you realizing it.

And a single prompt will never detect that problem, because Claude will remain convinced he is right until someone opens the link.

Now run exactly the same task as a loop.

The report is the same, but this time you add a criterion that he can check:

  • Each statement must be backed by at least three sources.
  • Each link must open a real page that confirms that statement.

Watch what happens.

Claude drafts the report.

Then he reviews each link one by one.

He opens them all.

He discards broken links and fake sources.

He looks for real replacements.

He keeps checking until all the sources in the document are links you can actually open.

Only then does he stop.

He never gets tired.

He never skips the boring part.

This is how it would be written in Claude Code.

Don't worry about the command yet; I'll explain it below.

text
1plaintext
2/goal write a one-page report on [your topic]
3
4where each statement is backed by at least three sources
5and each link opens a real page that confirms that statement.
6
7Open each link to verify it before considering the work finished.
8
9Replace any source that is down or does not support the statement.
10
11Stop only when all sources in the document have been verified.

What is a loop?

Rafa Gonzalez | IA - inline image

A loop is a small system that writes prompts for you, over and over, until the job is done.

All loops, however sophisticated they may seem, always follow the same five steps:

  1. Find the work. Look for pending tasks, failing tests, unread emails, or files inside a folder.
  2. Do the work. Claude resolves each item one by one, just as you would manually.
  3. Check it. A second review confirms that the work is actually well done, not just generated.
  4. Remember. Save what is already finished so as not to repeat work or lose context.
  5. Repeat. Continue until nothing is left pending and then stop or notify you.

Keep this phrase in mind:

Writing prompts is doing the work. Designing loops is managing the worker.

"Isn't it just a scheduled task?"

Rafa Gonzalez | IA - inline image

Good question.

No.

You can already have your computer run exactly the same task every morning at eight.

That is a cron job.

It has existed since long before most of us.

It always runs the same script.

The same steps.

Without thinking.

A loop works differently.

Because inside there is someone making decisions.

A cron runs a script.

A loop runs Claude.

Claude observes the current situation.

Decides what the next step is.

Executes it.

Checks the result.

And then decides again.

Continue?

Try again?

Undo?

Stop?

That decision is precisely the difference.

A script cannot look at a failed test and invent another solution.

Claude can.

And that has only been possible since Claude and ChatGPT reached a sufficient level to make real decisions during a task.

The two commands that run a loop

Rafa Gonzalez | IA - inline image

This is where most people go wrong.

You don't build a loop by writing "do this in a loop" inside a normal chat.

Claude Code incorporates two specific commands.

And which one to use depends on the type of loop you need.

1. /goal It is the loop that works until a goal is completed.

https://x.com/ClaudeDevs/status/2065192057535373473

You already saw it in the report example.

You write /goal and describe exactly what the final result looks like.

Claude continues working automatically, iteration after iteration.

After each step, a second copy of Claude silently checks:

Have we reached the goal yet?

If the answer is no, it explains to the first Claude what is missing and the work continues.

As soon as the goal is met, the loop stops on its own.

That constant self-assessment is the whole difference between a true loop and a prompt that simply hopes it got it right.

Use /goal when there is a clear finish line.

Work until that condition is true.

2. /loop This is the loop that runs following a rhythm.

Use it when the work doesn't consist of "finishing a list," but of "continuously monitoring something."

You tell it how often it should run and what it has to do.

Claude will run it again automatically.

text
1plaintext id="8s4gkp"
2/loop 30m check if my website is back up by loading the home page.
3
4As soon as the page responds normally, notify me and stop checking.

"30m" means every thirty minutes.

You can also simply say:

"Every morning check my inbox."

Claude will schedule that task.

Use /loop when there is no finish line, but rather a periodic check.

Most really powerful loops actually start with /goal.

These functions are recent in Claude Code.

If you don't see those commands yet, update Claude Code and they will appear.

Your first loop (ready to paste)

For a small task, a single line is enough.

For larger jobs, it's better to give Claude a complete guide: where to find the work, how to review it, how to remember progress, and when to stop.

Fill in the brackets and paste this into Claude Code:

You are functioning as a loop, not responding to a single prompt.

text
1text
2GOAL
3
4[Describe the final state in one or two sentences.
5
6Be specific about exactly what the final result looks like and make it something measurable.
7
8Example:
9"All product pages in /pages have the new prices and all links work correctly."]
10
11WHERE IS THE WORK
12
13[Tell Claude where to look.
14
15Examples:
16
17"Scan the /pages folder for files with old prices."
18
19or
20
21"Read TODO.md and treat each unchecked box as a task."
22
23or
24
25"Check my connected task manager and look for all items tagged as ai."]
26
27HOW IT SHOULD WORK
28
29- Do one task at a time. Finish it completely before starting the next one.
30
31- Follow the patterns you find in existing files. Do not invent new ones.
32
33- If a task requires a decision that only I can make (spending money, deleting files, or emailing a person), stop at that task, add it to a list called "Needs my intervention," and continue with the next one.
34
35HOW IT SHOULD CHECK ITS WORK
36
37After each task, prove that it is actually finished before marking it as completed.
38
39[Choose the check that fits best:
40"run the tests" /
41"re-read the file and confirm it meets the goal" /
42"open the link and confirm it loads correctly".
43
44Checking means providing evidence, not simply trusting that it's okay.]
45
46If the check fails, fix it and check again.
47
48Make up to three attempts per task. If it still fails, mark it as blocked and continue.
49
50HOW IT SHOULD REMEMBER
51
52Maintain a file called LOOP-STATE.md.
53
54After each task, write:
55
56- The name of the task.
57- Its status (done / blocked / needs my intervention).
58- What you changed.
59- Any useful information for the next run.
60
61ALWAYS read this file at the beginning of each run to avoid repeating work already completed.
62
63WHEN IT SHOULD STOP
64
65Stop when all tasks are completed or blocked, or when you have finished [N] tasks in this run.
66
67Then give me a brief report indicating:
68
69- What has been completed.
70- What has been blocked.
71- What requires my intervention.
72
73Start by reading LOOP-STATE.md if it exists and then look for the work.

The state file is the silent hero.

Without it, every run starts from scratch.

With it, the loop picks up exactly where it left off, even when run automatically on a schedule.

When you SHOULD NOT create a loop

Loops are not free and they don't work for everything.

Three important things before starting.

One-off tasks don't need a loop.

If you're just looking for an answer, a normal prompt will be faster.

Loops pay off when work repeats or has many pieces.

Loops consume more resources.

Since Claude reviews, corrects, and tries again, he will execute several calls for each task.

If you use a Claude plan, you will reach the usage limit sooner.

Tasks that are too vague also don't belong in a loop.

"Think of a better product strategy" is not a loop.

First define a clear and measurable goal.

Start this week

Choose a task that you keep doing manually and that is made up of many small steps.

Paste the template.

Fill in the fields.

Run it once while observing the whole process.

When you start to trust it, schedule it.

The first time you wake up and find that the work finished while you slept, you will stop writing prompts one after another.

Just like Boris.

Turn one viral article into a full content workflow

Collect the source, decode the pattern, create assets, draft the story, and distribute from one AI workspace.

Explore YouMind

แพตเทิร์นให้ถอดรหัสเพิ่มเติม

บทความไวรัลล่าสุด

สำรวจบทความไวรัลเพิ่มเติม