Modern Creator
Mayank Aggarwal · YouTube

Loop Engineering, Explained

The 'set it and check back' pattern replacing one-shot prompting, broken into four parts, a decision tree for when it's worth building, and a live Claude Code demo.

Posted
3 weeks ago
Duration
Format
Tutorial
educational
Views
11.2K
244 likes
Big Idea

The argument in one line.

Loop engineering formalizes what a repeat-prompt habit already does into four explicit parts — trigger, execution, verification, state — and the actual skill is deciding which tasks are even worth wrapping in one.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • You already lean on Claude Code or a similar AI agent for repetitive tasks and re-type roughly the same prompt every time you want it done again.
  • You've heard 'loop engineering' or 'the Ralph loop' mentioned and want the actual mechanics behind the buzzword, not just the hype.
  • You're trying to decide whether a specific recurring task — inbox triage, a content pipeline, a nightly report — is worth automating into a loop versus just prompting it each time.
SKIP IF…
  • You're looking for a walkthrough of a specific automation platform (Zapier, n8n, Make) — this is a conceptual framework, not a tool tutorial.
  • Your task is a genuine one-off with no repeatable success criteria — the video's own decision tree says don't loop that.
TL;DR

The full version, fast.

Loop engineering formalizes the habit of re-prompting an AI agent into four parts: a trigger that starts the run, execution where the agent does the work, verification that checks the output against a defined goal, and saved state that carries lessons into the next pass. It isn't new technology — a single agent with no orchestration can run a full loop. The recommended build order is do the task manually first, turn it into a reusable skill, add a trigger, then finally add verification plus state — skipping straight to automation is the most common reason a first attempt breaks. Not every task qualifies: only loop work that repeats or has too many unpredictable steps for one prompt, and be honest about whether 'done' can be checked objectively (a test suite) or stays fuzzy (a good LinkedIn post) before you start.

Free for members

Chat with this breakdown — free.

Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.

Create a free account →
Chapters

Where the time goes.

00:0000:42

01 · The tweet that started it

Cold open on Peter Steinberger's viral tweet ('you shouldn't be prompting agents, you should be designing loops') and the claim that loop engineering isn't new — just automated prompting.

00:4202:05

02 · Cruise control for your AI agent

Introduces the car metaphor and previews three loops people have actually built (LinkedIn writer, inbox triage, code auto-fixer) plus a public loop library resource.

02:0504:01

03 · The three steps of any loop

States the basic loop shape — trigger, action, stop condition — and walks a concrete example ('get me the latest AI news every day at 9am') through triggering and execution.

04:0106:09

04 · Verification: objective vs. fuzzy goals

Splits verification into cases: code speed and empty-inbox are objective checks; 'a good LinkedIn post' or 'good news' are fuzzy and need explicit judgment criteria defined up front.

06:0907:46

05 · State, the multi-agent myth, and the official definition

State is the running log of what worked and failed across passes. Clarifies a loop needs no orchestration — a single agent suffices. Lands the definition: loop engineering means replacing yourself as the person who prompts the agent.

07:4609:15

06 · The real path to a working loop

Four-step build order: confirm the AI can do the task manually with zero automation, turn the working process into a reusable skill, add a schedule or event trigger, then finally bolt on verification plus state.

09:1510:42

07 · Why loop engineering is exploding

Argues AI already gives a fast head start on most tasks; a loop compounds that head start instead of the human re-prompting every pass — shown as a quality-vs-attempts chart with looped beating manual.

10:4212:27

08 · Should you even build one?

A decision tree: only loop a task that repeats or has too many unpredictable steps for one prompt, and only if there's a way to check when it's done. Flags the real cost ceiling of unattended loops.

12:2714:27

09 · The four checks your task actually needs

Classifies verification into four buckets — functional, visual, judgment, human-in-the-loop — then recaps trigger, execution, verification, and state.

14:2717:01

10 · Live demo: setting a goal in Claude Code, and the Ralph loop

Types a goal command into Claude Code and watches it run unattended, then names the related Ralph loop pattern — persistent memory through files, a fresh context window each pass.

17:0119:42

11 · Do's, don'ts, and why prompt engineering still matters

A do/don't checklist for running loops responsibly, closing with the argument that prompt engineering isn't obsolete — it's the skill every loop pass still depends on.

Atomic Insights

Lines worth screenshotting.

  • A loop is just four parts — a trigger, an action, a verification check, and saved state — dressed up as new technology.
  • The most common reason a first loop attempt breaks is skipping straight to automation instead of first proving a human can do the task by hand.
  • A task only qualifies for a loop if it repeats or takes many steps you can't fully predict in advance — a one-off is better served by a single good prompt.
  • Objective tasks (does the test pass, is the inbox empty) make trivial loops; subjective tasks (is this LinkedIn post good) need a judge — another LLM or a human in the loop.
  • Without saved state, a loop repeats the same mistakes every pass instead of building on what the last run learned.
  • A loop doesn't require multiple agents — a single agent with no orchestration can run a full loop by itself.
  • One well-known practitioner reportedly burned an extreme token budget running an unattended loop for three months straight — the cost ceiling on 'set and forget' is real, not hypothetical.
  • AI is bad at judging its own work, so the fix isn't a smarter prompt — it's a separate agent, or a human, doing the verification.
  • Never let a loop run with no maximum iteration limit — an unattended process with no ceiling is how token spend gets out of control.
  • Prompt engineering isn't dead inside a loop — it's the algebra a loop needs to run calculus on: every pass is still a prompt, just one you're not typing yourself.
Takeaway

Four parts, one decision test, and a build order that avoids the failure mode.

WHAT TO LEARN

A loop is just a trigger, an action, a verification step, and saved state — the real skill is knowing which tasks deserve one, and building it manually-first instead of automating from step one.

03The three steps of any loop
  • Every loop reduces to three moving parts at minimum: a trigger that starts it, an action that runs, and a stop condition that ends the pass — memorize this shape before building anything more complex.
  • Test the shape against a real task first: 'get me the latest AI news every day at 9am' already contains its own trigger before you've touched verification or state.
04Verification: objective vs. fuzzy goals
  • Sort every task you want to loop into objective (a test passes, an inbox hits zero unread) or fuzzy (a good LinkedIn post, good news) before building — the build gets much harder once you cross into fuzzy.
  • For fuzzy goals, define the judgment criteria explicitly up front (how many likes, how it compares to past posts) — without that, the loop has nothing consistent to check itself against.
05State, the multi-agent myth, and the official definition
  • State is the log of what was tried, what worked, and what to do next — without saving it, every pass repeats the same mistakes instead of building on the last one.
  • A loop needs zero orchestration to qualify — a single agent with no sub-agents can run a complete loop by itself; multiple agents are an option, not a requirement.
  • The cleanest definition to remember: loop engineering means replacing yourself as the person who prompts the agent — you design the system once instead of typing the same prompt every time.
06The real path to a working loop
  • Confirm the AI can do the task manually, by hand, with zero automation, before building anything — skipping this is the single most common reason a first loop attempt breaks.
  • Once the manual process works, turn it into a reusable skill instead of re-typing the same instructions each time.
  • Only after the skill exists should you add a trigger — and only after the trigger works should you bolt on verification plus state, which is what turns a plain automation into an actual loop.
07Why loop engineering is exploding
  • AI already gives a fast head start on most tasks — a loop's value is compounding that head start pass after pass instead of re-prompting from scratch each time.
  • Charted quality against attempt number, a looped process climbs to a high plateau faster than a manually checked-in process — that gap is the entire pitch for building one.
08Should you even build one?
  • Only build a loop for a task that repeats or has too many unpredictable steps to fully plan in one prompt — a one-off task is better served by a single good prompt.
  • Confirm there's actually a way to check 'done,' objectively or subjectively, before starting — a goal with no defined success criteria fails this test no matter how long the loop runs.
  • Unattended loops have a real cost ceiling: the video cites a well-known practitioner burning an extreme token budget running one for three months — set explicit stop conditions before letting anything run unsupervised.
09The four checks your task actually needs
  • Functional checks (run the test suite, does the build pass) are the cheapest to automate — fully machine-verifiable, zero opinion required.
  • Visual checks (does the UI look right) need a judge, either another LLM or a human, because a machine can't score 'looks right' on its own.
  • Judgment checks (rate this post) need an explicit scoring rubric before the loop starts, or the AI has nothing consistent to optimize toward.
  • Some decisions — should this specific email actually get sent — need a human in the loop by design; that's the correct verification type for that task, not a loop failure.
10Live demo: setting a goal in Claude Code, and the Ralph loop
  • The entire live demo runs off one goal statement typed into Claude Code — the loop itself handles the multi-step execution from there.
  • Watch token budget in real time when a loop runs unattended — even the demo explicitly flags uncertainty about tokens remaining mid-run.
  • The Ralph loop (persistent memory through files, a fixed prompt repeated, a fresh context window each pass) is a named pattern worth reading — it's the same four-piece shape solving the 'AI forgets everything between runs' problem.
11Do's, don'ts, and why prompt engineering still matters
  • Do: start with one small repeatable task, pick the right check type instead of defaulting to functional, always set a maximum number of tries, and use a separate agent to grade subjective work since AI is bad at judging its own output.
  • Don't: run 24/7 swarms of agents prompting agents, let anything run with no stop limit, trust 'looks done' without a real check, or wrap a loop around a one-off task a single good prompt would solve.
  • Prompt engineering isn't obsolete inside a loop — every pass is still a prompt, just one the loop is issuing instead of you typing it by hand.
Glossary

Terms worth knowing.

Loop engineering
Designing a system where a trigger repeatedly re-prompts an AI agent, checks its output against a goal, and carries state forward — instead of a human retyping the prompt every time.
Trigger
The event that starts a loop's execution — a schedule, an incoming event, or a manual command.
Verification
The check that decides whether a loop's output meets the goal. Can be objective (a test passes) or subjective (a human or another AI judges the quality).
State
The saved record of what a loop tried, what worked, and what to do next, carried from one pass into the following one.
Ralph loop
A persistent-memory loop pattern where an agent restarts with a fresh context window each pass but keeps its history in files, repeating a fixed prompt until a task completes.
Harness engineering
The layer of tooling and scaffolding built around a prompt to make an AI agent reliably usable — the step between plain prompting and full loop engineering.
Resources

Things they pointed at.

Quotables

Lines you could clip.

00:00
Prompt engineering is dead, and you should just try for loop engineering.
Cold open thesis pulled straight from the tweet that sparked the trend — no setup needed.TikTok hook↗ Tweet quote
00:44
So loop is like a cruise control for your AI agent.
The single metaphor the whole video hangs on — short, visual, quotable on its own.IG reel cold open↗ Tweet quote
07:00
Loop engineering is replacing yourself as the person who prompts the agent. You design the system.
The cleanest definition in the video, delivered as a standalone line.newsletter pull-quote↗ Tweet quote
17:36
Prompt engineering is like algebra without which you cannot do calculus.
Memorable analogy that reframes the whole 'prompt engineering is dead' debate.TikTok hook↗ Tweet quote
The Script

Word for word.

Read-along

Don't just watch it. Burn it in.

See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.

metaphoranalogy
00:00Prompt engineering is dead, and you should just try for loop engineering. So I'm pretty sure that many of you must have heard the same. Well, all of this started from this one tweet.
00:07Here's your monthly reminder that you shouldn't be prompting agents. You should be designing loops that prompts your agent. So this one tweet everyone has got 8,400,000 views.
00:16And many people were thinking that, hey. What is now this new loop engineering coming? I think we all started as I covered in my last video of harness engineering from prompt, then context, then harness engineering.
00:27Of course, now people are also discussing about loop engineering. So on the same, most people are still pressing, let's say, the base button on their AI. Loop engineering kind of just allow them to put everything on an autopilot.
00:39So So this very nice thing I've created, which would be pretty helpful everyone. So loop is like a cruise control for your AI agent. So we will quickly see that what exactly it is.
00:47Why it is not that big of a deal and something which is actually just prompt engineering or automated prompt engineering as I like to say. How can we do the same?
00:56We have a loop library as well, which is going to be pretty awesome to look at. And of course, some resources which will be helpful for you to master the same. So with that, everyone, let's now start.
01:04First, let's start to understand what are few of the things which people have built. And the best part, uh, someone actually also created a loop library, as you can see in here, which I will be also using in a bit. And you can, of course, get access to.
01:17And you can just do any of these things, LinkedIn article writer, inbox triage, load or rebuild in codes, any error or anything which you want to look at. The whole idea becomes everyone is that these are the major steps in any loop.
01:30So a loop basically is a trigger, then an action, and then a stop condition. So by itself, it is not anything new.
01:38You will be having a quick trigger everyone. This trigger will then do some action.
01:46And then, of course, we will be having a stop condition. So just like how a normal loop works, so in that way, the whole approach is same. But the best part is that how now you can move around this.
01:58So let me just try it like this. Yeah. And this is how it will work.
02:02Right? So that is all about the loop engineering in a very much nutshell. But still, let's see that then why people are saying my account engineering is dead and how we can use this.
02:11Okay. So the very first thing. Right?
02:14We have to see that how it will get triggered. So whatever you have created, it will get triggered. Then it will basically execute.
02:21And when I say it here, I mean around the agent or whatever tool you are using. Of course, all of this had to do with AI and agents.
02:31So majorly, what happened is that we humans, we are very good at defining the task. Right? So if you say that, hey, I want, say, all the latest AI news every day at 9AM.
02:48Now what will happen everyone is that this particular task, how can we solve the same by a loop engineering is we will be having a trigger. I think the trigger is very, very clear in here.
02:59It is just something which starts every day at 9AM. Right? Along with that, if you just quickly think about the same, then we will, of course, also be have that how we have to execute the same.
03:11Because in a loop engineering as well, the initial part is very, very simple, and it is how things are getting executed.
03:20Now once the same is executed, this is where your normal flow stops. Right? So this is where we have seen that either you will re prompt.
03:26If I ask her that, hey, I want this at every day at 9AM, it will run at 9AM and then make sure that it is able to get me some news. And the whole case was see, you it is scheduling the same itself.
03:38I can just quick say a quick yes. The whole case everyone in here is that it is here. Just provide me with the news.
03:45Right? But what if I have to update the same? What if I have to go and make sure that, okay, research the same and provide from bigger companies or the new should be very, very valid.
03:55Right? So all these are the things everyone which will come and play a role in this verification part.
04:02Now, something to understand which many people are missing. It is exactly the same task, just that you will be prompting again and again on the task until and unless the same is done. So the next part everyone becomes verification.
04:15The verification is fair. Let's say if we take a quick example of the car with which I started.
04:21So you press the set at your current speed. The car adjust total to the hold that speed. The agent does the actual work, editing, building, drafting, getting the news and everything.
04:29So it can be something related to a LinkedIn article, getting the latest AI news, solving the test case, making your application faster. Then when we move a step ahead, everyone, then sensor checks your real speed against the target. In a similar way, AI agent, loop test run, output get checks against what that needs.
04:48So in here, everyone, you will have to define that, hey, what are the good news? And that is where you might have to save or have the state as well. Now, we will talk about, like, what are the best way of handling the same because they can either be very fuzzy or they can be having very subjective or objective as well.
05:04For example, if we take it, defining that what I want in my code to work is pretty good, like, because we have test cases, we can just check if it is becoming faster. Something like inbox tries is also pretty easy to define that, hey, there should be no unread inbox.
05:21You should write emails for each and every one of them. So that is the good. So it will take up a email, right, for the same, and then it will run the same in the loop.
05:29This is where it becomes a little bit fuzzy that, hey, what do you mean by a good LinkedIn article or what do you mean by a good news? So are you providing me the previous articles which have done pretty better? So are we I'm am I having this thing?
05:41And this is what most people miss out that how this whole approach. Right?
05:46The verification part is very, very important because we humans are very good at defining the task that, hey, I want to become rich. But then if AI is telling you some step, what are the effect it is having? Hey, can you make my application faster?
06:00Okay. It got two millisecond faster. Then it got one millisecond, five millisecond.
06:04That is very objective. So the task or the verification also has a role to play here everyone. And then finally, this state.
06:11So it remembers your logged in speed the whole time. A log of what was tried, what worked, and what to do next. So if it gave me something and I said that, hey, this is wrong, I should in loop engineering because it's in looping.
06:23Right? I should maintain that, hey, this was bad. This was good.
06:26This is what you should continue with. And I think, yeah, that is where your loop will then become an automated way of running and doing the steps. And you will surely see that many people are running, like, one agent.
06:37It is having four or five agents running underneath and seeing that as loop engineering. Well, that is not the case. Uh, you can actually have a loop engineering with a single loop with sorry, with a single agent without any agent as well for that matter.
06:49And, of course, with having teams of agent, it can run on very objective use case, which I just told you with respect to, say, inbox triage or anything related to your code. And it can be very fuzzy as well just like getting the news or writing a good LinkedIn article.
07:03Okay? So now let's move forward everyone and try to see a few more things and why it works. So the real path to a working loop, like, what exactly and I've kept it very, very logical to remove any ambiguity and anything.
07:14Uh, there are some pretty awesome, like, things, and this is a very good definition. Loop engineering is replacing yourself as the person who prompts the agent. You design the system.
07:24What does it, uh, instead? A loop here can be thought of as a recursive goal where you define a purpose and the AI iterates until complete. Right?
07:33But most people, they are thinking of it as a completely new terminology or new work of, uh, basically technology, but that is not the case.
07:42Let's now see, uh, what exactly or how can you achieve the same agreement. The very first thing, if you want to do anything, if you want to loop anything or want to make sure that you sit while you can earn money so that your AI is working, do it manually. Right?
07:55So confirm, uh, that AI can even do the task at all by hand. No automation yet.
08:00So it can be drawing something, drawing your thumb lane, making sure that it is working on your code and fixing that error. Next, everyone is turn it into a skill. Now, this is something which is suggested.
08:11Rather than you providing those instructions again and again, think till now all of us know how can we create a skill using Claude. So Claude has a awesome awesome skill creator skill. And the same is there for other libraries sorry, other AIs as well, which is respect to codecs or in perplexity.
08:26Everyone, like, now is having that approach. Next, everyone is the trigger. Now it runs on a schedule or an event.
08:32It is still not a loop yet. It is just an automation. So as of now, it starts,
08:37it runs, and all is done. So based on a trigger, it starts, and it is just stopping.
08:42The loop starts everyone manual adding the verification plus state. So it gets verified, save the state, and then looks that, hey, can I improve on that?
08:51So if it is giving me some, let's say, news,
08:54can I, hey, can I make it better?
08:56It can check that, hey, in the last run, I got it faster by one millisecond. Now can I make it more faster if I it is a code? Hey, in the last run, I replied to five emails, but there are still 300.
09:07So should I work on in making sure? So the state is also very, very important everyone. And this is what now creates it a loop.
09:14Okay? Now let's try to understand that why the same is getting exploded and why it is helpful. Why you will see many people just like how Peter and many people, like, are actually now writing all the code with using these loop technologies.
09:28And we will also see the quick demo as well. And, again, of course, lots of articles, this complete loop library.
09:34The whole idea, everyone, is that we sorry. AI is pretty good in giving you a very good head start. So many of us have seen that how whenever you're doing something with AI, you get a very good head start.
09:45So, yeah, you can actually start from 40%. But let's say that if you're putting in and doing loop engineering, you can make sure that you are doing a little bit of head start with respect to the work with defining a skill and everything. Then rather than you spending your time on all these steps, so rather than you spending these times doing all the different different prompting here.
10:08Why can't we just spend an initial time, make it a little bit and normally, we have seen that it starts a lot better with that. And then we can let AI take care of the rest.
10:18But, of course, we will have to provide the state, the verification. What do I mean by better so that it can actually keep on prompting itself and reach to our goal?
10:28So that is where everyone the whole benefit of loop lies that once we have got this head start, how can I make AI by giving it a complete details so that I don't have to do anything? Right?
10:39So that is how you have to think about loop engineering. And now let's see that exactly should you even build one because many people I know will just build loop or just like try to do it left, right, and center. Create multiple agents, have everything, like, as I will show you the demo as well.
10:56But it is costly. The whole idea is that, uh, Peter Spielberg, this, uh, Peter Steenberg, he is able to like, I I read somewhere that he spent 1,000,000,000 worth of tokens.
11:07Right? So, again, and you can see that, okay, over link, they will now start a new pad and everything. Okay.
11:13And, yes, it will be take three months and ten minutes there. So good thing that you are learning the same with me. It is very, very important that we actually understand if we can do something or not.
11:22Like, for example, hey, Clock, make me rich. Not a very good look. Like, you cannot, of course, like, no matter how much time it runs.
11:28Unless you have specified that, hey, what is working, what is not providing it proper resources, it will not be able to help you out. So does it repeat or take many unpredictable step just like the last one? Well, okay.
11:39I can say yes, if it is the case. Can the AI check done by itself? So can you throw in another AI?
11:46Can you have a human in the loop? Is there any metric on top of which it can work? If there is that everyone then on all these different different cases, of course, we can then do a yes, Then you can middle.
11:57If on any of your tasks, again, you can just check it out for any task which you have in mind. Let's say that I want to do my house tours. Does the task p p dot take many step you can't fully predict in advance?
12:08So, yes. Like, it is the case which I cannot do. So just found it faster.
12:12Or let's say that I want to develop something which can make me rich. So is it repeat? Not really.
12:18Or take many steps you can't predict in advance. I cannot predict these steps. So no.
12:23That is the case. Okay. So pretty good flowchart for you to play around with this.
12:27Now let's see everyone the four checks which your task actually needs. So overall, I think till now the whole idea is very clear. In loop engineering, we are just providing it a task.
12:36We are along with task, we are providing it how it should or what is the success criteria. Now that can actually be based on number of runs as well.
12:45So let me just show you this one, and it will help you a lot now because these are pretty helpful. So which of the four check does your task actually need? Run the test suite.
12:53So let's say that you run NPM test or you just check if all the test cases are passing. Very, very objective, numerical, where you can actually see that is something is happening.
13:02It is running in five seconds. I made it four second. Pretty good.
13:06Check if the UI looks looks right. So either here you can have someone as the judge, ideally any other LLM or you can have human in the loop here as well. So if I ask AI that, hey, can you create this complete and this I have actually also created via AI only.
13:20I just run it in the loop and made sure that, hey, make sure that it is having these complete flowchart, everything which is interactive, and I will be sharing the same with you as well. Then let's say if something is very, very objective oh, sorry. Subjective or fuzzy, like LinkedIn post, like news articles, like anything which you cannot actually define if it will work.
13:38So I can ask you to write a LinkedIn post, but then I should have some proper judgment criteria. How many likes this is getting?
13:45What was the few previous how the previous post have worked? So all of this also decide to take me in action.
13:52And then, again, deciding whether to send an email or not. So that is where, again, you as a human in the loop come into picture. Of course, AI cannot do that.
13:59Right? So if you say that, hey, you do all the steps, but in some step, you are someone who is required, then of course, loop engineering, you will have to come in. Similarly, if there is something where you want some extra data just like the LinkedIn or the article example I gave, then whenever this state is there, if it write an article and if you ask it to make it better, etcetera, it should know that, hey, how many likes it got, how many views it got.
14:23So that is again everyone how the complete loop engineering things work. And, yes, uh, these are the four quick pieces which we can quickly run through again. Trigger,
14:32then basically just we can define the trigger. Okay. Execution,
14:37it merges a total lot of break. The agent tries one charge, different algorithm, cache, tweak, loop, structure. Verification actually measures the runtime number before and all these things.
14:46Then finally, the state. So making sure that everything is getting maintained. Because when something is running in a loop, you should be having the result of the previous one.
14:53When your very basic run loop runs with I as well, that I is kind of a state there. Okay? So where it is getting increased and you know that, hey, this is the value.
15:02So this is actually everyone how in a very real sense, I have explained you loop engineering, like, what exactly and how can it be useful. So beyond all the hype, beyond any jargons or anything, that is actually how you can use loop engineering. And now coming to the demo, everyone, I think it's pretty, simple.
15:17We just have to define that, like, task or a goal properly. So I can just say research loop engineering, produce a decision ready markdown file for, let's say, maybe starters.
15:30Starter people. So if that is the case. And I can just copy all of this.
15:34Just have this in goal and paste it. So there's a goal command which kind of, as you can see, it can take the condition and stuff.
15:42So I can just enter this. And now what will happen everyone? So based on all of my input and everything, again, it's a very, very basic example.
15:49I have just taken it from here only. Right? The loop library.
15:52It will just start working and making sure that I can get the full results. So see, it is asking us for a few things. But the whole part is that how it will now run a loop because I have given it a goal.
16:02Of course, when the loop will be there, you have to have the stop condition. You have to make sure that it, uh, don't keep on running for long because, of course, you will have lots of token then. Right?
16:13So I think I'm not sure how many tokens I have left. So it is just running some command and everything. And, of course, like, I can automate this by providing that, hey, you can do all of these things on a server or something.
16:24So in that way, it will be all pretty good and able to do this. So I can say allow the web search for this project. Right?
16:30I can just provide each and everything here, and it will keep on running. In a similar manner, there are multiple examples from engineering evaluation. But I think the way I've defined you and there is one more thing which I would love that you read about because that is kind of on board it is based.
16:44So it is a Ralph loop everyone.
16:46A very similar thing, completion promise,
16:48the stop hook, persistent memory through files so that it can never do the same. And the loop will continue based on the same. So the loop continues it, understand what exactly was my goal.
16:57But I feel like this the way I've explained you here with all the step, that is more than enough. So this was your do and don't. Start with one small repeatable task just like I have done here.
17:06In the right check type, you don't default to function. Always set a maximum of price, so I should make sure that, hey, when it is approving this thing up for me, it does not just keep on running for, like, let's say, infinity.
17:19Right? Because then it will be very, very costly. Use a separate agent to create subjective work.
17:24Now, what I meant here is that, normally, AI is very bad at creating its own work. So if you ask Claude, hey, how is the code you have written?
17:31How is the article you have written? It's not pretty good. So just use any other agent with any other brain.
17:36And don't have twenty four seven forms of agent prompting agent that is going to just cost you a lot and that would be very bad. And I think I read somewhere that many people are saying prompt engineering is dead, but prompt engineering is like algebra without which you cannot do calculus. So similarly, you cannot do loop engineering without prompt.
17:52Right? It is just prompt which is going again and again. Just that you are not writing it.
17:56Then letting it run with no stop limit, something which I've explained about. Testing looks done with no real checks. So in the end, if your AI is seeing that, hey, I have created the best artifact, I think we can run the same.
18:06Okay? We can just check the same. Looping of enough task, you could just prompt.
18:09So many people now, they will have a goal for this very simple of a task, okay, which can be done with a simple simple prompt. So I think practically everyone, this was all about loop engineering beyond the hype, beyond anything, just explaining it how you can use the same.
18:24There are some awesome articles. This one is from Akshay and he writes pretty good articles. You can read the same out as well.
18:29What exactly is basically the loop? And again, I think kind of what all I've explained in the last video and everything. So just the best step as well, context clean, what tools it can use and all these things.
18:41And I think this diagram is pretty good. So if you will see context, the model, okay, tool call and tools a little bit, I think it's going into the ex whole execution. But overall, these are few good articles and I, of course, read a lot of them.
18:54And this is a good library which you can have a look, and I think it will be having each and everything in there. So with that, I hope you like this complete video, everyone. Uh, do make sure that you share it.
19:02Don't be forget or swayed away by all these new new things. If your basics are right, I think everything should be very clearly understood by you. So now, yeah, do subscribe to my channel so that you don't miss out on all these new new updates and share it with everyone so that I can reach out to the maximum of people.
19:17Because I love explaining these things in a very easy to understand things without the without any hype. Okay? And, yeah, as you can see, so it has given the same, but it is still making sure that it can run it out.
19:28And still, it is actually running and giving me that, hey, how it should work on the same. Okay? So cool.
19:34Now, let's meet in the next video, Vuen. Thanks a lot.
The Hook

The bait, then the rug-pull.

The video opens on the tweet that kicked off a wave of 'prompt engineering is dead' takes — Peter Steinberger's viral post arguing you should design loops instead of typing prompts. What follows is a plain-English deconstruction of what a 'loop' actually is, stripped of the hype: four parts you already half-know, a decision tree for when it's worth building one, and a live demo of standing one up in Claude Code.

Frameworks

Named ideas worth stealing.

01:30list

The Four Parts of a Loop

  1. Trigger
  2. Execution
  3. Verification
  4. State

Every loop — cruise control or AI agent — cycles through the same four stops: something starts it, something does the work, something checks the work against a goal, and something remembers what happened for the next pass.

Steal forAny recurring internal process worth handing to an agent — a content pipeline, email triage, nightly QA.
07:46list

The Real Path to a Working Loop

  1. Do it manually
  2. Turn it into a skill
  3. Add the trigger
  4. Add verification + state

Skipping straight to automation is the most common reason a first loop attempt breaks — confirm a human can do the task by hand before wrapping any automation around it.

Steal forValidating any new internal automation manually before building it.
11:19model

Is It Loopable? Decision Tree

  1. Does it repeat or take many unpredictable steps?
  2. Can the AI check 'done' itself?
  3. Not loopable yet — define a real check first
  4. Build a loop — start with a solo agent

A task only qualifies for a loop if it repeats or has too many unpredictable steps for a single prompt, and only if there's a way — objective or subjective — to check when it's actually done.

Steal forFiltering which recurring workflows deserve loop automation versus a one-shot prompt.
12:27list

The 4 Checks a Task Can Use

  1. Functional — machine checks it, zero opinion (run the test suite)
  2. Visual — has to be seen to be judged (does the UI look right)
  3. Judgment — can write a scoring rubric (rate this LinkedIn post)
  4. Human-in-the-loop — a person decides (should this email get sent)

Every loop's verification step falls into one of four buckets, from fully machine-checkable to requiring an actual human decision.

Steal forClassifying any automation candidate by what kind of check it needs before committing to build it.
CTA Breakdown

How they asked for the click.

VERBAL ASK
19:30subscribe
do subscribe to my channel so that you don't miss out on all these new new updates and share it with everyone so that I can reach out to the maximum of people

Single soft ask at the very end, after all value is delivered — no aggressive sponsor read. The paid course affiliate link (Agentic 3.0, code MAYANK) appears only in the description, never spoken on camera.

Storyboard

Visual structure at a glance.

the tweet that started it
hookthe tweet that started it00:00
four-stops loop cycle diagram
valuefour-stops loop cycle diagram01:39
the real path to a working loop, step 1
valuethe real path to a working loop, step 107:46
one-shot vs. loop quality chart
valueone-shot vs. loop quality chart09:43
should you build one — decision tree
valueshould you build one — decision tree11:18
the four checks flowchart
valuethe four checks flowchart12:40
live demo — goal command running in Claude Code
valuelive demo — goal command running in Claude Code16:07
do this / skip this for now
valuedo this / skip this for now17:06
subscribe outro
ctasubscribe outro19:38
Frame Gallery

Visual moments.

Watch next

More from this channel + related breakdowns.

21:37
AI Edge · Tutorial

Stop Prompting. Start Looping. (full guide)

A tutorial arguing prompt engineering is dying now that models are smart enough to self-correct — and a walkthrough of Claude Code's /goal, /loop, and /schedule commands with a live website-audit and YouTube-monitoring demo.

July 16th
14:18
Jay E | RoboNuggets · Tutorial

STOP Prompting Claude

A 14-minute tutorial on the three tiers of self-running Claude Code workflows — and why the creator of Claude Code stopped prompting it manually.

June 12th