You ask ChatGPT or Claude for a meeting summary. It hands you a draft, you point out what's wrong, it tries again. Anthropic, the company behind Claude, calls that a loop, and it describes four kinds. Developers run them with commands. Each one also works in an ordinary chat window, as long as you spell out what "done" means yourself.
What is an AI loop?
On June 30, 2026, the Claude Code team published "Loop engineering: Getting started with loops" on the Claude blog. It defines "loops as agents repeating cycles of work until a stop condition is met." The post picks up "loop engineering" as a term already making the rounds, without claiming it.
A cycle is simple: the AI produces something, looks at the result, then keeps going or stops. The four kinds differ in what you hand over: the check, the stop condition, the trigger, or the whole prompt.
Loop 1: the AI decides on its own that it's done
You already use this one. Every message you send starts a turn. The AI works, then hands control back when it judges the task complete or decides it needs more information. You read, you correct, you send again.
The catch: its idea of "done" may not match yours. You get a 250-word follow-up email when you wanted 100, or meeting notes that skip the deadline. It had no way of knowing those mattered. Anthropic's post advises writing specific prompts so you need fewer turns. If your request is vague, our prompt optimizer can help tighten it.
The "effort" setting some tools offer controls how deeply the model thinks, according to the Claude Code documentation. It doesn't decide when the AI stops.
Loop 2: you set the finish line, a checker verifies it
Here you write the stop condition and the AI keeps going until it's met. Claude Code, Anthropic's tool for developers, already does this. Its documentation says that after each turn, a model checks whether the condition holds. If it doesn't, work resumes without anyone typing a new prompt.
The check goes to a second model, by default a small, fast one, that didn't do the work. It opens no files. It only judges what the AI has shown in the conversation, and it returns one of three verdicts: not yet met, met, or impossible.
There's no separate limit to configure. The documentation suggests writing the limit into the condition itself, for example "or stop after 20 turns."
In a chat, the condition goes into your prompt and a second conversation plays the checker.
Loop 3: the same instructions, rerun on a schedule
Some work comes back every week. As the post puts it, "the task stays the same and only the inputs change." Think of a Monday news roundup, or a weekly list of new papers on your thesis topic.
Here, a time or a day is what restarts the work. Developers have commands for this. One runs on their own computer and stops when they shut it down; another runs in the cloud.
Consumer apps call these scheduled tasks. In ChatGPT, free accounts get three active tasks, running at most once a day in a loose time window (morning, afternoon or night). In Claude, scheduled tasks are for paid plans only, and they run even while your computer is asleep, unless they need files stored on it. Google is gradually rolling out schedules in Gemini to personal accounts. For Claude, our post on Cowork scheduled tasks walks through ten examples.
Before you schedule anything, decide what the AI should say when nothing has changed. Put it in the instructions. Otherwise you'll get a summary of nothing every Monday.
Loop 4: the AI that starts on its own
The proactive loop kicks off on "an event or schedule, with no human in real time." Even the prompt is written in advance. According to the post, it runs until you turn it off.
The Claude Code documentation gives an example. When a team's monitoring tool sees errors cross a threshold, it starts a task in the cloud. Claude investigates and opens a draft fix for the team to review.
Outside of code, the closest thing is a ChatGPT monitoring task. It checks for changes and only notifies you when something relevant comes up. OpenAI's help page adds that it can stop by itself once a defined end condition is met. Tasks triggered by an event require ChatGPT Work and a Plus, Pro or business plan. Our guide to advanced prompting for agents goes further into these workflows.
Warning : an AI that acts on its own should leave the final call to you. Claude Academy recommends starting scheduled tasks with drafts you review before anything gets sent.
How to write a stop condition in any chat
The Claude Code documentation lists what a good condition contains. It works as-is in ChatGPT, Claude or Gemini.
- One measurable end state: "under 120 words," "one summary sheet per chapter of the syllabus."
- A stated check, meaning how the AI proves it's done: the word count, the list of chapters ticked off.
- Constraints, the things that must not change along the way: "don't touch the amounts," "keep the tone of the original email."
Add a cap on attempts, like the documentation's "20 turns." In a chat, three attempts are usually enough. Past that, you're better off knowing what's in the way.
For the check, open a new conversation that didn't watch the text being written, and paste this in:
If it says NOT YET, paste its sentence back into the first conversation.
Tip : if the reviewer has to judge a number, paste in the source of that number too.
For a scheduled or monitoring task, the same logic fits in three lines:
Which loop should you use?
The post ends with a table that matches each loop to a situation, translated here for everyday, non-coding use.
- You're still figuring out what you want and comparing options: a regular chat (loop 1).
- You know what "done" looks like: a stop condition in the prompt, plus a reviewer in a separate conversation (loop 2).
- The work comes back on a fixed date: a scheduled task (loop 3).
- The work recurs, it's well defined, and you only want to hear about it when something happens: a monitoring task that hands you a draft (loop 4).
If you only adopt one, make it loop 2. It works on the free tier of any chat app and costs you three extra lines of prompt.
Note : in Claude Code, loop 2 maps to the /goal command, added in May 2026. Loop 3 maps to /loop, which runs on your computer (its recurring tasks expire after 7 days), and to /schedule, which creates cloud tasks and is still in research preview. Those cloud tasks, formerly called "routines," can also react to events, which makes them loop 4. Our Claude Code guide shows how to get started.
Frequently asked questions
Do I need to know how to code to use a loop?
No. The loop commands belong to Claude Code, a developer tool. A stop condition written into your prompt and a reviewer in a second conversation work in ChatGPT, Claude or Gemini, free plans included.
Can the AI keep going forever?
Not in a chat: it hands control back after every reply. For tools that chain steps on their own, the Claude Code documentation recommends writing a number of turns or a time limit into the condition. A recurring scheduled task comes back every time until you pause or delete it.
Why have a separate conversation do the check?
"A reviewer with fresh context is less biased," says Anthropic's post, in the passage where it recommends using a second agent for code reviews.
What's the difference between a loop and an agent?
Anthropic defines agents as models "using tools based on environmental feedback in a loop." The loop describes the rhythm of that work: what starts it and what stops it. Our Agentic AI glossary entry has the definition and examples.

Prompt Guide
Founder of Prompt Guide and CEO of Webpulser. Digital and AI entrepreneur since 2006, he shares his field-tested prompt engineering techniques.
Practice what you learned
Interactive exercises to sharpen your prompting skills
Stay Updated
Get our best articles and techniques every week.
Related Articles
Context Window, Memory and Projects: What the AI Actually Sees
An AI only sees what fits on its desk. Context window sizes as of October 28, 2026, memory, projects and overlong chats: how to give it the right context.
What Is an AI Agent? Definition, Examples and How to Brief One
An AI agent searches, acts and checks its own work. Definition, the agents in ChatGPT, Claude and Gemini, their limits and risks, and how to write a brief with a finish line.
Human in the Loop: How to Check AI's Work Without Redoing It
Rereading everything wipes out the time you saved; skipping the check means signing blind. What human in the loop means, how to scale checks to the stakes, and quick ways to verify AI output.
Automate Your Monitoring with ChatGPT, Claude and Gemini Scheduled Tasks
A scheduled task is a prompt that runs itself. What ChatGPT, Claude and Gemini offer as of October 28, 2026, how to set each one up, and three monitoring prompts ready to schedule.
Related Prompts
Developer Resume Prompt
Write a developer resume from your stack, your projects and the target job posting.
From Meeting to Action Plan: Expert Prompt for Consultants
This prompt turns meeting notes into a structured action plan adapted for B2B consulting firms, with levers, budgets, and KPIs.
Summarize a Course to Study Effectively with AI
A prompt that turns any course or set of notes into a structured, clear, easy-to-memorize study sheet, tailored to your level and your deadline.
Write a SKILL.md for Hermes Agent: turn a repetitive task into a skill
Converts a freely described manual task into a structured SKILL.md for Hermes Agent: triggers, preconditions, procedure, checks, failure cases, report.