Modern Creator
The Next New Thing · YouTube

How an amateur (me) learned to loop: w/ Matthew Berman

Andrew Warner spends a day cramming on "agent loops," then brings Matthew Berman on screen-share to react to five other creators' examples before showing off — and fixing — his own.

Posted
1 weeks ago
Duration
Format
Interview
educational
Views
7.5K
209 likes
Big Idea

The argument in one line.

A loop is just a trigger plus a goal wrapped around an AI agent, and the entire skill of using one well comes down to picking a goal the agent can verify itself against rather than leaving the judgment call to the model.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • You've heard "agent loops" or "slash loop" mentioned and want a plain-English definition before trying it.
  • You already use Claude Code or Codex and want to know when a scheduled or goal-driven loop beats manually prompting.
  • You've had an agent falsely claim "it's done" and want a structural fix instead of just re-prompting harder.
  • You're deciding whether to run agents locally on your machine or in the cloud and want the tradeoffs named plainly.
SKIP IF…
  • You're looking for a step-by-step setup tutorial — this is a reaction/roundup video, not a walkthrough.
  • You already have a working loop practice and understand verifiable vs. LLM-as-judge goals.
TL;DR

The full version, fast.

Everyone in AI coding started talking about "loops" the same week, so the host spent a day studying five creators' examples and brought an expert on screen-share to react to each. The core framework: a loop needs a trigger (manual, scheduled, or action-based) and a goal, and goals split into two tiers — verifiable (a hard number like "page load under 50ms" or "CTR over 10%") and LLM-as-judge (the model decides when it's good enough, which is weaker and burns more tokens). Claude Code's slash loop is for scheduling; slash goal is for continuous iteration toward an end state, and they can be combined. The video closes with the host abandoning a vague "make my slides look better" loop in favor of a concrete one: fixing a broken drag-to-reorder feature that manual back-and-forth with Claude had failed to solve, which the loop fixed by letting the agent test and retry on its own instead of trusting its self-reported "it's done."

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:45

01 · Intro

Cold open explains the trend: Peter Steinberger and Boris Cherny's viral posts about loops landing the same day, host announces he crammed all day to learn loops and will show Matthew Berman what he found.

00:4501:12

02 · Testing Loop Examples — Andrew and Matthew Start in VS Code

The two open a shared screen and set expectations for walking through real examples together.

01:1203:27

03 · YouTube Thumbnail Loop — Generate, Score, Iterate Until 10% CTR

Reaction to Nate Herk's thumbnail-generation loop: 10 concepts scored against MrBeast-style thumbnails on a rubric, top 3 refined and rescored across versions until one wins.

03:2704:30

04 · What Makes a Loop Work: Trigger + Goal

Matthew distills the core definition on a whiteboard-style screen: every loop needs a trigger (manual, scheduled, or action) and a goal.

04:3006:09

05 · Verifiable Goals vs LLM-as-Judge Goals — Which Actually Works

Distinction drawn between hard-number verifiable goals (CTR, page load speed) and softer goals where the model itself judges completion.

06:0907:39

06 · OpenAI Codex Automations — Loop Templates and Routines

How I AI creator Claire's Codex automation is reviewed; Codex's built-in automation template library is highlighted as a starting point for the terminology-confused.

07:3909:00

07 · Scheduled Loops — Run Agents on a Clock Without You

Discussion of running loops in the cloud vs. locally; Matthew explains most current tools (Cursor, Codex, Claude Code) run loops locally rather than in a hosted worker.

09:0012:09

08 · Sub-Agents — How Loops Split Work Across Parallel Threads

Claire's automation spins up a dedicated validation sub-agent per identified skill; Matthew explains he mostly leaves sub-agent orchestration to the harness rather than managing it manually.

12:0913:21

09 · Matthew Reacts to Advanced Sub-Agent Workflows

Matthew calls Claire's mid-session thread management "very sophisticated," notes running 10-15 parallel Codex threads can bog down even a powerful machine.

13:2114:15

10 · Local Agents vs Cloud Agents — Where Loops Run Best

Host laments loops living on the desktop rather than the cloud; Matthew estimates cloud agents are three to five months behind local capability.

14:1516:30

11 · Claude Code /loop and /goal — Continuous Iteration Explained

Matthew walks through Claude Code's slash loop (scheduling) vs slash goal (iterate to an end state) commands and gives a realistic example: loop every 5 minutes comparing progress against spec.md until complete.

16:3018:18

12 · Why Vague Goals Make Loops Fail

Loops get harder when the goal is amorphous ("build this feature") rather than deterministic ("all tests pass"); the host asks how to write a spec and Matthew admits he doesn't write comprehensive specs either.

18:1819:48

13 · Token Budgets and Runaway Loops — How to Cap the Cost

Discussion of capping a loop by token budget vs. letting it run; the ten-day Codex-clone-Excel anecdote surfaces here as an example of an essentially unbounded loop.

19:4821:00

14 · Zapier MCP — Giving Agents Permissions Without Losing Control

Sponsor segment: Zapier MCP gives an agent scoped permissions (add/edit but not delete) across thousands of connected apps; host demos it booking a haircut and drafting (not sending) an email.

21:0023:42

15 · The Criticism of Loops — Do They Actually Work?

Pulls in Greg Isenberg's critical take: loops burn a lot of tokens, and creators need more human review in the loop, not less, including getting real customers involved rather than relying on the model's own taste.

23:4224:54

16 · When Loops Are Worth the Token Cost

Matthew defends heavy token use as forward-looking since token prices keep falling, and floats model routing — frontier model plans, cheaper model executes — as a cost-saving pattern.

24:5426:15

17 · Using Unused AI Plan Limits Productively

Reaction to a Theo (t3.gg) clip: unused weekly/5-hour usage-window quota on a paid plan is framed as money already lost if not maxed out.

26:1527:09

18 · Rewriting Hermes Agent in Rust With a 12-Hour Loop

Host mentions a 12+ hour loop rewriting his own Hermes agent in Rust for lower memory use, pointed at documentation and a GitHub repo as the spec.

27:0930:00

19 · Andrew Tests a Loop on His Own Slide Deck

Host shows his own loop: redesign a slide deck, score 1-10 on hierarchy/typography/contrast/whitespace/polish across 3 sample slides, stop at 9/10 or 3 rounds. Results shown are incremental at best; Matthew critiques it as pure aesthetic judgment with no real taste signal to improve against.

30:0032:33

20 · Matthew's Loop Library — Templates You Can Reuse

Matthew demos his Loop Library site: an aggregation of his own and community-submitted loops, plus an installable skill so any coding assistant can search or generate loops on demand.

32:3335:06

21 · Andrew's Better Loop — Fixing a Real Backend Feature With Drag-and-Drop

Host applies a loop to a real bug: a video-management backend's drag-to-reorder feature that manual back-and-forth with Claude had failed to fix. The loop tests itself every few cycles instead of self-reporting after each attempt, and lands the fix where manual prompting hadn't.

35:0635:11

22 · Watch This Next

Sign-off and next-video pointer.

Atomic Insights

Lines worth screenshotting.

  • A loop is nothing more than a trigger (manual, scheduled, or action-based) plus a goal wired around an existing coding agent.
  • Verifiable goals like "page load under 50 milliseconds" or "CTR of 10% or more" beat LLM-as-judge goals because there's no ambiguity about when to stop.
  • Letting an LLM judge its own output quality still requires a human to eventually look at the result — a model has no proven taste, it's regurgitating patterns already in its weights.
  • Claude Code's slash loop and slash goal are different tools: loop is for scheduling recurring runs, goal is for iterating until an end state is reached, and they can be chained together.
  • One creator ran Codex for ten straight days on the goal "clone Excel to feature parity," using the real Excel app on his desktop as the living spec instead of writing one.
  • A subscription's unused quota is a sunk cost — if you're on a $200/month plan and not maxing your 5-hour usage window, that unused capacity is money already spent and lost.
  • Vague goals like "build this feature" force a choice: write an exhaustive spec up front, or hand judgment to the model — most people do neither well.
  • A frontier model can plan a loop's steps and then delegate the actual execution to a cheaper, faster model, cutting token cost without losing quality on well-scoped subtasks.
  • Aesthetic-only loops ("redesign this deck, score it 1-10, iterate") add little value per round because the model has no real taste signal to improve against.
  • The most reliable loop pattern demonstrated: give the agent a specific number of test cycles before it's allowed to report back, instead of letting it check in after every single attempt.
  • An agent that repeatedly claims a bug is fixed when it isn't is a sign to change the process, not to keep re-prompting — wrapping the same request in a verifiable test loop solved in one pass what manual back-and-forth couldn't.
  • Sub-agents exist so a main agent can delegate modular pieces of work to run in parallel, then roll the results back up — most builders don't manage them manually, they trust the harness (Codex, Claude Code, Cursor) to do it.
  • Local agents currently outperform cloud agents in raw capability, with cloud agents estimated to be three to five months behind — but local ties up a personal machine's resources completely.
  • A well-designed automation can spin up its own validation sub-agent: identify a candidate skill, then automatically launch a separate thread whose only job is to test that skill against a goal.
Takeaway

A loop only works when the agent can grade its own homework.

WHAT TO LEARN

The whole trend collapses to one design choice: pick a goal the agent can verify against a hard number, and the loop runs itself; leave the judgment to the model, and you've just automated more re-checking.

03YouTube Thumbnail Loop — Generate, Score, Iterate Until 10% CTR
  • A thumbnail-generation loop that scores 10 concepts against a named competitor's style (MrBeast) on a concrete rubric — clarity, curiosity, emotional pull, contrast — turns a subjective task into something a model can iterate against.
  • Even a well-run judged loop still needs a verifiable end state to be fully trustworthy — the strongest version of this loop would publish and measure real click-through rate instead of stopping at model-scored confidence.
04What Makes a Loop Work: Trigger + Goal
  • A loop is a trigger (manual, scheduled, or action-based) plus a goal — naming both explicitly turns a vague automation idea into something buildable.
  • Manual triggers still have a place even in a fully automated workflow; the goal is to avoid needing them for everything, not to eliminate them entirely.
05Verifiable Goals vs LLM-as-Judge Goals — Which Actually Works
  • Verifiable goals (a page-load threshold, a click-through-rate number, all tests passing) remove the ambiguity of when to stop; LLM-as-judge goals still require you to look at the result before trusting it.
  • A goal like "optimize page load under 50 milliseconds" works because the agent can test itself against a fixed number without any human interpretation needed.
06OpenAI Codex Automations — Loop Templates and Routines
  • Different tools use different words for the same concept — Claude Code calls them routines, Codex calls them automations — so don't get stuck on terminology before evaluating the actual mechanism.
  • Prebuilt automation templates are a faster on-ramp than designing a loop from scratch if you're unsure what a good first loop looks like.
07Scheduled Loops — Run Agents on a Clock Without You
  • Running loops in the cloud instead of on a personal machine currently requires building your own harness for most tools — it's possible, but not yet a built-in feature everywhere.
08Sub-Agents — How Loops Split Work Across Parallel Threads
  • Sub-agents let a main agent delegate modular pieces of work to run in parallel, then roll results back up — most builders don't manage them by hand, they trust the harness to do it well.
  • A loop can be designed to generate its own sub-agent validation step: identify a candidate improvement, then automatically spin up a separate thread whose only job is testing it against a goal.
09Matthew Reacts to Advanced Sub-Agent Workflows
  • Running many parallel local agent sessions is currently the more capable path versus cloud-hosted agents, but it fully occupies a personal machine's resources.
10Local Agents vs Cloud Agents — Where Loops Run Best
  • Cloud agents are improving fast but are estimated to be three to five months behind what's achievable running the same tools locally.
11Claude Code /loop and /goal — Continuous Iteration Explained
  • Claude Code's slash loop is for scheduling a recurring prompt (e.g. every 5 minutes); slash goal is for continuous iteration toward a stated end state — they're different tools that can be combined.
  • A realistic goal-loop example: repeatedly compare the current build against a written spec file and keep building until the spec is fully met.
12Why Vague Goals Make Loops Fail
  • Vague goals like "build this feature" force an uncomfortable choice between writing an exhaustive spec up front or handing the model open-ended judgment — most people, including experienced builders, do neither well.
13Token Budgets and Runaway Loops — How to Cap the Cost
  • A token budget can act as a hard stop for a loop, but it's a weak substitute for a real goal since there's no way to predict how many tokens a task will actually take.
  • One creator ran a loop for ten straight days cloning Excel to feature parity, using the real Excel app on his desktop as the living spec instead of writing one — an example of both the power and the cost risk of unbounded loops.
15The Criticism of Loops — Do They Actually Work?
  • The strongest counter-argument to loops: most creators don't need less human review, they need more — including getting real customers involved instead of relying on the model's or even the builder's own taste.
  • Loops burn meaningfully more tokens than single prompts, a real cost that heavy users tend to downplay because they're not the ones budget-constrained.
16When Loops Are Worth the Token Cost
  • A frontier model can plan a loop's steps while a cheaper model executes them, which cuts token spend on long-running loops without sacrificing the quality of well-scoped subtasks.
17Using Unused AI Plan Limits Productively
  • Unused AI subscription capacity (a 5-hour usage window, a weekly quota) is a sunk cost the moment it resets unused — treating a paid plan's limits as a target to hit changes how aggressively you delegate work to agents.
19Andrew Tests a Loop on His Own Slide Deck
  • Aesthetic-only iteration loops add little value per round because a model has no proven taste of its own — it's remixing patterns already in its training, not developing judgment.
  • A better use of the first prompt in an aesthetic task is over-specifying what you want up front, rather than relying on iteration to discover it.
20Matthew's Loop Library — Templates You Can Reuse
  • A public library of reusable, submitted loop templates (plus an installable skill to search or generate loops) lowers the bar for someone who doesn't want to design a loop from a blank page.
21Andrew's Better Loop — Fixing a Real Backend Feature With Drag-and-Drop
  • When an agent keeps falsely claiming a bug is fixed, the fix isn't a better prompt — it's a structural change: let it test its own work over several cycles before reporting back, instead of trusting a single self-assessment.
  • Reducing how often an agent checks in with you (e.g. every four cycles instead of every cycle) can save both tokens and your own attention, without sacrificing the eventual result.
Glossary

Terms worth knowing.

Loop
An AI agent wrapped in a trigger (what starts it) and a goal (what it's trying to achieve), so it runs repeatedly or continuously without a human re-prompting it each time.
Trigger
The event that kicks off a loop: manual (a person tells the agent to start), scheduled (runs at a set time or interval), or action-based (fires when something happens, like a pull request opening).
Verifiable goal
A loop's end condition defined by a concrete, testable number or state — e.g. page load under 50ms — so the agent (not a human) can determine when to stop.
LLM-as-judge goal
A loop's end condition left to the AI model's own assessment of quality, rather than a hard number — weaker than a verifiable goal because the model may lack real taste.
Slash loop (Claude Code)
A Claude Code command for scheduling a recurring prompt or command, e.g. running the same instruction every five minutes.
Slash goal (Claude Code)
A Claude Code command for continuous iteration toward a stated end state, distinct from slash loop's scheduling function, though the two can be combined.
Sub-agent
A secondary AI agent spun up by a main agent to complete a small, modular piece of work in parallel; results get rolled back up to the main agent when finished.
Automation (Codex)
Codex's term for a scheduled or templated loop; Codex ships pre-built automation templates as starting points.
Zapier MCP
A remote MCP server from Zapier that gives an AI agent scoped permissions (e.g. add/edit but not delete) across thousands of connected apps and actions.
Resources

Things they pointed at.

00:00linkPeter Steinberger's viral tweet on loops
00:00linkBoris Cherny interview on prompting vs. loops
01:12channelNate Herk's YouTube thumbnail loop video
06:09channelHow I AI (Claire) Codex automation video
19:48productZapier MCP
21:00channelGreg Isenberg's critique of loops
24:54channelTheo (t3.gg) on maxing AI plan usage windows
30:00toolMatthew Berman's Loop Library
32:18toolThe artifact-to-skill loop (by Hieu/Heaton Shaw)
Quotables

Lines you could clip.

00:20
Here's your monthly reminder that you shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents.
the viral tweet quoted verbatim — instantly recognizable framing for the whole trendTikTok hook↗ Tweet quote
24:41
If you're paying 20 or $200 a month and you're not using that full five hour window... you're basically just losing money.
punchy, relatable pricing-psychology line with a clear personal-finance angleIG reel cold open↗ Tweet quote
32:02
I have not found a model that has phenomenal taste. It's regurgitating what's already in its weights.
sharp, contrarian, quotable skepticism about AI aesthetic judgmentnewsletter pull-quote↗ 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:00Everybody started talking about loops. The two main characters in the world of AI coding talked about it at the same time, Peter Steinberger and Boris Cherny. Here is an interview from Boris that went absolutely viral.
00:12I don't prompt Quad anymore.
00:14I have loops that are running. They're the ones that are prompting Quad and kinda figuring out what to do. My job is to write loops.
00:20And here's Peter's tweet sitting at 5,000,000 views in less than twenty four hours. Here's your monthly reminder that you shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents.
00:31I'm gonna learn how to loop from Matthew and other YouTubers, and Matthew will give me feedback on what I learned and what I build. If you wanna learn how to loop, let's get into it. Presented by Zapier, the AI automation company.
00:42I'm gonna show you what I've learned, but is this really something that you're doing a lot of? Are you literally prompting with loops or replacing loops with prompts? Peter Seinberger's tweet, which got 6,000,000 views, Anne Burrows Cherni's interview went viral on the same day.
00:56It was about two weeks ago on a Sunday.
00:59I just spent literally until right now and including right now studying, uh, learning as much as I can about loops.
01:08Okay. Let me show you the example that I found to be the most approachable. This is from Nate Herc.
01:14He said, I want better thumbnails. I'm creating YouTube videos. It's visual, so I get it on both levels.
01:20Here's what he was able to get. Number one. We got number two, number three, number four, number five.
01:25And this is, by the way, the iteration that's happening through the loops. And then what happens is that number one was one of the top contenders, number two, and so was number eight. So then it iterated on these.
01:35You can see here's number one original, here is number one v two, here's number two original, here's number two v two, and here's number eight original, and here's number eight v two. And what it did is after those version twos of all of it, it said, Number eight's the best, so here is number eight v three. Okay.
01:51So what it's doing is he's saying, I want the best thumbnail that I can. Iterate until you get there. Here's the prompt that he used.
01:57It was a slash goal prompt in Cloud Code to make me a thumbnail. So I told it basically what to use to make them. It says make 10 thumbnail concepts and score each one against mister beast YouTube thumbnails using a rubric, clarity at small size, curiosity, emotional pull, visual contrast, stuff like that.
02:11And after it makes those 10, it selects the top three. It identifies the weakest part of each concept. It improves them, rescores them, and then it continues iterating on on the strongest concept until it's satisfied.
02:23Good use of loops or what?
02:26Yeah. I think one thing to point out, which is incredibly important, is he's using an LLM as as a judge as the goal for the loop. It is not a deterministic end.
02:36It doesn't you know, he he's not saying, okay. Continue to loop until my click through rate is 10%. That 10% number would make it really easy for this loop determine how to con or when to continue and when to end.
02:50What he is doing is basically offloading the judgment to the model itself. He's saying when we've, you know, reached these different, uh, qualities of the thumbnail according to mister beast's rubric.
03:04But, ultimately, he's giving the judgment to the large language model. Um, it is still a very good use of a loop, but but, ultimately, like, these thumbnails need to be presented to human eyes to determine whether they're good or not.
03:19Okay. That actually brings me to I'm gonna skip forward to your video that explains that.
03:24Here here's the part that I thought was really helpful.
03:28Specifically? Well, you need two things. You need a trigger, and you need a goal.
03:34With those two things, you can complete the loop. A trigger is what kicks off the loop, and there are three ways to kick off a loop. One, you can do so manually.
03:45You literally tell the agent, go do this loop.
03:48And that's exactly what he did. Right? He just said, go right now and create these thumbnails.
03:52It's schedule.
03:54You can schedule a loop to happen at a certain time of day or on a repeating schedule. And then I've got an example of that. You have actions.
04:01You can have the loop kickoff based on some kind of action like opening a PR. Now to fully remove the human, we wouldn't wanna kick everything off manually, but sometimes it is required.
04:12Alright. And for the goal, the goal can be basically one of two things. It can be verifiable, or we can use LLM as a judge.
04:21So if it's verifiable, it is something concrete, some specific number or some way to test it deterministic.
04:29Can you give me any example of what's a verifiable goal?
04:34Yeah. I I think it's actually we we can use the the example from the previous YouTuber.
04:40Mhmm. Like, rather than stopping at letting the judge determine whether a thumbnail is good or not, it can actually take the full step of publishing the thumbnail, waiting for the the actual results to come in from YouTube and saying, you know, continue until you find a thumbnail in which the CTR is 10% or more.
05:00And so it'll just continue to iterate, test things, bring back the data, iterate again until it hits that 10% threshold. Now that that 10% is what I talk about That is a hard
05:13number. It's it's verifiable, exactly what I just said. Yeah.
05:17It it's not leaving the determination up to, uh, the language model. I didn't even think of that. Okay.
05:23So now you connect back in whatever platform you're advertising on with whatever data you have, and you just tell the system keep checking, and if it doesn't hit my number, run another test.
05:34And here's another version of a verifiable loop. You can say, okay. Optimize the page load speed until it is under fifty milliseconds.
05:43That's kind of the one of the more obvious ones. And I use that all the time. I say click to every single page in my app.
05:50If it takes more than fifty milliseconds to load, uh, continue to optimize it. Whether that's optimizing the database or the the number of elements on the page, it doesn't matter. Optimize it any way you see fit.
06:02Get the page load speed under fifty milliseconds. Okay. Alright.
06:05I like that a lot. This helps me understand it. Here's an example of an automation
06:10from How I AI, Claire. Loops.
06:12So in Cloud Code, they're called routines. In Codex, they're called automations. And what I like about what Codex has done is they have these templates.
06:23And so they actually have given you a couple good ideas of, quote, unquote, loops, automations, routines that you can run. So if you're looking for inspiration, I would really look at these automation template.
06:35And you've got a whole site of automation templates. Let me ask you before we go into the one that she used and then customized. So far, everyone is putting it on their computer like it's their own personal automation.
06:47Can I put this into, like, Cloudflare, has a worker or something in the cloud so I don't have to have it dependent on my system?
06:54Um, Yeah. Technically, you can. Uh, you you would basically have to design the harness yourself, though.
07:00Right? You're you're essentially saying, hey. Can I take Codex?
07:03Can I take Cursor, put it in the cloud? Some of them already have it. And then can I run those loops in the cloud?
07:09Yeah. Technically, you can. I think I believe Cursor doesn't actually let you run goals in the cloud quite yet.
07:18Um, but the the main way to do it is through Cursor, ClaudeCode, Codex locally on your computer.
07:25Nate, who we showed earlier, was doing it in Versus Code on his computer, and he was using Cloud Code. She is using Codex, the desktop app, and here's the here's the prompt that she came up with. So this is like By the way, what she essentially said was, um, and then I'll I'll take it to the sub agents part because I think that's the most interesting.
07:42She said, I want you to take a look at what we're doing that can be turned into skills. That's essentially one of the templates, and she customized it.
07:50She also wanted to show sub agents, and I still don't fully get that, but let's play what she said. A loop
07:55with sub agents that is probably gonna generate its own loop. I'm actually gonna force it to generate its own loop by saying, you should use a goal when validating the skill.
08:07So when you prompt the sub agent, make sure you prompt it with a very specific goal it can use to validate against. You know, basically, when you write a loop or a goal or an agent, you just say validate loop goal validate loop goal, and you're good to go.
08:22And just to point out, on the very bottom, you can see on the bottom of her screen, it says Fridays at 10AM. That's when this runs. This is an automated system.
08:29It's not a human kicking it off. But the sub agent part, I don't get. Yeah.
08:34Oh, a couple of things. So automations are a way of kicking off things.
08:38They don't necessarily have to be loops. Mhmm. What she is doing is a loop kicked off by some kind of automation, which is really cool.
08:46And yeah. Yeah. So I I think that's that's a that's a good way to do it.
08:49When she's talking about sub agents, I actually don't manually manage sub agents usually at all.
08:57Mhmm. But whatever sub agent is is you have a main agent you can think about. That's the agent you're speaking to in Codex and ChatGPT and anything.
09:05And then typically, that main agent will delegate small portions, very modular pieces of work to sub agents to go complete in parallel.
09:15And that's the benefit of sub agents is you can run a bunch of them in parallel. They'll finish their work, they'll roll it back up to the orchestrator, the main agent, who will then, uh, kind of, uh, synthesize the data and present it back to you. I again, I don't manually think about subagents.
09:32I trust that the harnesses, so codex, cursor, Claude code, that they are gonna manage the subagents for me better than I could.
09:42Okay. I do feel like she was trying to explain it so thoroughly that it added a layer of complication, and it helps me to understand that you're not doing it this way. Let's take a look at how it comes across when you do a loop with sub agents
09:56that is probably gonna generate its own loop. I'm actually gonna force it to generate its own loop
10:02Yeah. Like, oh, I by saying man.
10:05You should use a goal Get all the code I merged. I want you to identify skills that are missing. There are specific types of skills that I think are very important, which is skills to use some of the internal tools we've developed.
10:17If you see a new skill, I want you to spin up a sub thread, another chat. I want you to validate that skill with a goal loop.
10:27So not only are we setting a loop at the schedule basis, we are setting up sub agents to work on specific things, and then we're using a goal in those sub agents, which is a different type of loop to validate the work. So this is like a very meta task, but I think one that illustrates the looks like.
10:46See see here memory. So you can see here a little bit of the scaffolding of what an automation automation looks like, and then it just gives its own prompt.
10:56Now again, it's gonna go ahead and search the code, run its own commands. It's gonna look at GitHub, and it's hopefully going to create those new skills.
11:08And then what ideally we're gonna see in the left hand side in these all chats is new threads being kicked off to test the skills that it's identified it needs to run. And so it found one strong automation candidate.
11:21Let's see if it actually kicks off a thread to validate it. Okay. So it did it.
11:25Identified a chat smoke CLI skill. Basically, this is a command line tool I built to sort of test chats without having to use the UI in chat PRD.
11:37And it basically spawned a dedicated sub agent to test the skill with a goal to test it against the base branch and tell us whether its instructions actually hold up in practice. So look, it spun up this agent.
11:51You can see agent, it's got a little key name, and it's given it a goal. So you can see here, it's pursuing this goal, which is validate the local repo chat smoke CLI skill on the base branch.
12:03And it's basically gonna loop until that validation is done.
12:07I'm trying to read your face as you see this. It feels like you you're kind of impressed by this. Are you drawn at all to doing it this way?
12:13No. What she's doing is very sophisticated. It is very cool.
12:17I've actually only come to the realization recently that one thread in Codex can manage other threads, not only spin up and invoke new threads, but actually go in mid session in another thread and start managing it. It it's really cool stuff.
12:34Yeah. For sure. What she's doing is really cool.
12:37I'm not doing a ton of manual sub agent creation again. I'm generally just leaving it up to the the prompt that I'm giving.
12:45If if my agent decides that it wants to spin up sub agents, wonderful. If it doesn't, that's fine too. I think what she does is is cool because it actually probably saves a lot of time.
12:57Because if you're spinning up all these sub agents that are running in parallel, you're not having to wait through kind of one one chat sequence, uh, for for everything to finish before it gets to the next thing. So, uh, yeah, I might experiment with this.
13:09It's very cool. Yeah. I I like the way that she's showing all the different chats.
13:13And if you keep watching the video, you'll see she's got multiple chats going on at the same time. Let's go on to the next one. This is another one, uh, from you.
13:19Yeah. By the way by the way, Andrew, uh, like, I usually have 10 or 15 threads running at the same time in codecs, and it oh my god. My my machine is just crawling at that point.
13:31So I can imagine if each one of those has a bunch of sub agents and different threads that it's spinning up. I don't I don't know most and I have a monster computer. I don't know if most people are gonna be able to do that.
13:43I hate that all this is on the desktop instead of in the cloud. I feel in some ways we've gone backwards because, like you said, it just wastes a bunch of resources. Computer goes down.
13:51I shut the laptop. Everything is done. I I keep a separate Cloud agents are wonderful, by the way.
13:55Cloud agents are awesome, and they're gonna continue to get better. I think Cursor's probably in the lead there in terms of its functionality. But
14:05they're probably, like, three to five months behind what you can do on local.
14:10Okay. We saw Codex.
14:12We saw Versus Code. Let's look at Claude code. Alright.
14:15So if you're using Claude code, here is how to use loops, and they literally have a feature called slash loop. So you just start typing slash loop, and it says run a prompt or slash command on a recurring interview. So loop five minutes and then whatever you want.
14:30So you could say loop every five minutes, reach feature parity with Google. Obviously, that's ridiculous, and I'm gonna have a trillion dollar token bill at the end of the month, but that's how you do it.
14:41And you can set any goal you want. So here's a more realistic example. Slash loop every five minutes, compare what we have built with our full spec, spec.md.
14:49It could be anything, whatever product you have a vision for, and continue building until we complete the full spec. So every five minutes, it's gonna kick off an agent.
14:59That agent is going to determine what is left to build and start building it. And it's just gonna keep kicking off agents and keep looping until it finally reaches that goal.
15:10You just gave me an idea. So all of these clips, I have an agent go and get for me, But freaking a, YouTube will cut me off, and I have to wait a little bit and then come back.
15:21What I could do is say, every ten minutes or every fifteen minutes, I want you to go back to YouTube, grab the clips that I need, and then just stop. And come back and do this over and over again until you've completed all the clips that I want you to get. Good use.
15:35Right? Absolutely.
15:36And and one other thing to note, which I'm realizing now that I'm watching my own video back, is, uh, ClockCode has two different things. It has slash loop and slash goal. What is the difference?
15:47Yeah. I I yeah. Of course, in very anthropic way, they made it more, uh, complicated than it needed to be.
15:53Uh, slash loop is for scheduling. So every five minutes, do this thing, which I don't know why they call it a loop, but fine.
16:02They also have slash goal, which is more akin to a loop, actually. It's more it's more like, here's the thing I want to accomplish, continue looping until you reach that goal.
16:13You can use loops and goals
16:15together in Claude Code. So I I think I need to put out a little update to this video. You know what?
16:22I'm so glad you said that. I just kind of assumed that they both meant the same thing based on the context. Okay.
16:26That makes sense. Let's take a look at why, um, when it's tough.
16:31So far, we've looked at all the great things about it. Loops get more complicated when the goal becomes more amorphous.
16:37Rather than all the test passing, which is a very deterministic and clean way to know if the goal has been achieved or not, you might wanna say, okay. The goal is build this feature in my product.
16:50But how do you actually define what the end state of that feature is? You basically have to write all of it. You have to determine the full spec up front.
17:00And for a lot of people, including myself, that is very difficult.
17:04How how do I do that? Do I just go back and forth with Claude or whatever I'm using until I have a clear enough spec that I can walk away?
17:11Yeah. Yeah. Exactly.
17:12I think you you need to determine what the spec is, but that, for me, at least, that's very difficult. I like to just start building and see where it takes me. Right.
17:20Um, and and, like, if you think about the hierarchy of goals in a loop, the the best one is a verifiable deterministic goal.
17:28Something where it's, again, like, get the page load speed under fifty milliseconds. It's beautiful because it's verifiable. Yeah.
17:34And the the AI will continue to loop on it till it reaches that threshold. The the kind of the next rung down is if you're leaving the judgment up to the model, and this falls into that. You can either leave the judgment of feature complete up to the model, or you have to define it completely.
17:52And, like, I don't know. I don't see a lot of people writing, uh, absolutely comprehensive specs for every single thing that they want to build.
18:02So I think like for for things that are, uh, more hand wavy, like build this feature, uh, know, you're probably gonna leave it up to the judgment of the language model to see when it's actually complete.
18:14Do you think I can say spend this number of tokens and be done? Like, this is how much I'm willing to spend on you figuring this out and figuring out what the finished product looks like. I mean, technically, you can.
18:25I don't actually think that's gonna be a great result because it's gonna you there's no way for you to determine how many tokens it's gonna take to reach feature completion.
18:36I I I just wanna just let it stop before it burns everything. Oh, yeah. Yeah.
18:40Yeah. If you wanna have a token budget, certainly, that is that is a great idea. Just continue to build until you reach this token budget.
18:46So for example, I I had Codecs clone Excel.
18:52I literally said clone Excel to feature parity. Okay. And it was running for, like, ten days before I just finally said, okay.
18:59Stop. And the way that it knew what feature parity is, so rather than me having to describe or write a spec for every single feature in Excel, which I would never be able to do, it literally just opened up Excel on my desktop and would click through and say, oh, there's a new feature I haven't built.
19:17Let me go build it. Okay. Is it working exactly like Excel?
19:21Okay. Good. Let's move on to the next one, and then click the next one.
19:23And, yeah, it was running for ten days. I have no idea how long it would have run for, uh, but probably a long time. What it cost you, do you think?
19:32Um, I I I don't actually know. Billions and billions of tokens. How do you have all that money to spend on tokens?
19:39I'm I'm very fortunate that, uh, a few a few of these research labs give me, uh, some tokens to play with. Okay. Alright.
19:48Oh, by the way, speaking of, my sponsor is Zapier. You also work with Zapier. They told me that you're, like, one of their number one people if not their number one.
19:55What do you like about Zapier and ZP?
19:58I okay. So I have used Zapier throughout my career for, like, at least ten plus years.
20:04So it's like, Zapier is not new to me. I love them. But, yeah, I'm I Zapier is great because you get basically all of the automations, all of the tooling
20:15just easily available to your agents. I'll give you my number one use. Hermes agent, I do all kinds of screwing around.
20:21I sometimes, when I'm not paying attention, will tell it what to do. I don't wanna give it the power to delete stuff. I wanna give it the power to add, to edit, and certain things delete.
20:28I have one MCP URL that has all that power. I give it to Hermes, and it could do whatever it needs to do.
20:34Like, it booked a haircut for me for later in the day. It told my wife that I was doing it by email. It added to my calendar, but it didn't email out of my personal email account.
20:44It just drafted out of my personal email account. Alright. I love Zapier.
20:48Go to zapier.com/mcp. Tell him Matthew sent no. Tell him Andrew sent you.
20:53Matthew's getting a lot of credit over there. Let's let Andrew get a little credit. They do love you over there.
20:56Let's keep going Alright. Now we're getting into a little bit of the the challenges with this. It's not that useful.
21:02Details in Greg Eisenhower.
21:04Eisenhower. Yes. This is the worst thing to be trending right now, in my humble opinion.
21:12Yeah. This is like you. If you didn't have that, can you imagine how much you'd be spending?
21:15Let's keep listening. Right here just to make sure, Craig, I'm making sense because, as you could see, I'm pretty passionate about this.
21:21So slash goal is also trending at the moment. You know?
21:25Is slash goal a loop? Like, how should people think about slash goal and a loop? They're all the same thing.
21:31They have different names. Like, slash goal, I know
21:34This is why I was confused, actually, and I assume that they were the same. That people have people have been saying it. I like the distinction that you had.
21:40He's saying look They're they're they call it goals, like, of the the nomenclature in the actual products are goals. We talk about it as a concept
21:49of loop, but Cloud Code also has something called loops that is it's not really a loop. It it is quite confusing.
21:57Oh, the details and you Let's see. In the following. Experimentation.
22:02Like, let me do a new line. Experimentation. Right?
22:06Let's say you wanted to like, I'll I'll share with you a fun, cool, little tool I built the other day, Greg. I was doing a talk, and I wanted to build an Among Us simulator for for AI models.
22:17Right? Basically, it's this game where there's one bad guy, one impostor, and everyone's trying to figure out who it is. And I wanted to have, like, my own benchmark to find out which models, like, are good at lying.
22:28And I didn't wanna I didn't care about the details. I didn't care about how it looked. I just wanted the simulation, the benchmark to work.
22:34So I told it, I want the simulation. I want this benchmark. I wanted to do this.
22:38Go and do it. It took about, I think, an hour and a half, and it got it done. Now there were a lot of details that I had in mind that it completely got wrong that I didn't specify in the initial instruction set.
22:51But guess what? Because I didn't care about the what it built in a sense that I didn't really care for the details.
22:58It was a great thing. I didn't spend a lot of time. I just got slash goal to take care of everything.
23:04But when you and I are trying to use AI to build something meaningful
23:09You know, let me sum up where where they said it. They said, look. It does burn a lot of tokens.
23:12Most of us need to create and look at what we're creating before moving on to the next point. And Greg made a really good point.
23:20He said, most creators don't need less human experience. They need more. In fact, they need to figure out a way to get customers involved in here, not just their own artistic taste.
23:30And I thought all of that was super was super valid.
23:36Anything else about the the negativity before I go to one interesting one last video where someone had a a good take on when you should use it?
23:45No. I think this is completely valid and fair criticism of loops.
23:49If you look at the people who are talking about it, and to be fair, including myself Mhmm. We're not necessarily concerned with token budgets.
23:58Right? I mean, you know, Boris Churney and Peter Steinberger are two of the kind of biggest token users probably in the world. And so, yeah, they they burn a lot of tokens, but they are the future.
24:09And just like any other technology, tokens will continue to come down in price. And then you can also think about model routing.
24:19And you don't necessarily need a single model to do the entire loop. You can have the frontier model do the planning for each loop and then delegate out.
24:29So, you know, using Claire's sub agents, for example, delegate out to a, um, a much cheaper, faster model that is still just as good at writing the code, but maybe doesn't understand kinda the the big picture as well as a frontier model would. So that's a way to save some some tokens there.
24:46I like that. I I always forget that I can do that.
24:49Alright.
24:50Final one. How to think about loops, and then here's his interesting use case. The point I'm trying to make here is that you should be treating these limits like challenges.
24:58If you're on the expensive plan, you should be trying to get close to maxing it out because that's just money you're losing if you're not. The 70% I'm not gonna hit in my weekly limit here at eight hours is thousands of dollars of inference that I paid for, that I could have done, that I didn't do.
25:15Totally.
25:16Totally. Right? Just play with it at that point?
25:18Yeah, man. Yeah. Yeah.
25:19Yeah. I mean, if you're paying 20 or $200 a month and you're not using that full five hour window, eat like, the quota during that window, each and every five hour window or during the weekly batch of quota you get, you're you're basically just you're losing money.
25:33I I and it's so frustrating. I think about this weekly. I'm always checking my quota, always checking my usage, and I always, especially especially with Anthropic, I wanna max out the the number of tokens that they're giving me as part of my subscription.
25:47You know what I'd love to do is I'd love to have something some kind of task list on my computer and, uh, and an agent that says, okay. Andrew hasn't been on the computer in four hours.
25:56I'm now going to take some item from the task list, send it over to Claude Code, and use that. You can obviously, you could do it with Codex because that works with Hermes agent, it could watch itself. But I wanna be able to do it everywhere.
26:08Mhmm. Okay.
26:10Speaking of Hermes, check out what he's doing. I have a goal running right now that's over twelve hours in that's trying to rewrite Hermes agent in Rust so that I can run it in isolates that are much smaller and use less resources because my Hermes agent uses over a gig of RAM. It is getting close.
26:24It'll
26:26Pretty fun little project. That's kinda like your Excel spreadsheet, but, strangely, his crazy idea is more reasonable than yours.
26:34Yeah. It's interesting. I don't know.
26:36Yeah. I I guess that is a loop, technically. Yeah.
26:39Just point it at Hermes agent documentation and the GitHub repo and just say, like, rebuild it until it's feature parity in Rust.
26:48Any other crazy ideas that you've used? And then I'm gonna show you what I did. For for specific loops, I mean, I have a bunch that I'm testing.
26:55Again, I think my favorite loops are still the ones that have a verifiable goal to them. Because I I just I feel better kicking it off knowing that the agent knows what I'm trying to accomplish at the end and and not necessarily relying on their judgment.
27:10Hey. Time out. It's the next day, and I don't love the loop that you're about to see me show Matthew.
27:15So at the end of this video, I have a better idea for a more ambitious loop, and you'll see it and see if it works. Back to the show. Alright.
27:23Here's what I am doing. Where's Versus Code here? I wanna be able to show you what I did.
27:28We do a React. Uh, we do a GitHub show here every week, and this is the loop that I wrote.
27:33Loop, redesign the deck the deck at, and here's where the deck is, to look better. Work on a copy in a new folder, score it one to 10. For each round, score one to 10 on hierarchy, top typography, color contrast, white space, polish, judging only three sample slides, the title, uh, the one repo, and the outro, write the CSS, etcetera, stop at an average of three, uh, stop at an average of nine out of 10 or after, uh, three rounds.
28:00I'll show you what it created. Now that I'm talking to you, I'm realizing, oh, Andrew, you did not you did not did not go ambitious enough, number one.
28:08And I'm also thinking this isn't the type of thing I should be applying it towards, but it was a good test. Yeah. I have a I have a few thoughts about it if you wanna talk about that.
28:16Yeah. Do you wanna do it before or after I show you the slides that it created? Uh, let's see the slides.
28:21Okay. So this is the original. Kinda weak.
28:23I I don't love the intro, but okay. Uh, and just so you get a sense, this is what, uh, what a repo on the slides look like. This is a little bit better.
28:32I like how things pop out a little bit more. Here, you get a little bit more like a line here before and after the date. Things are starting to not look that much different, to be honest with you.
28:44Here, they went a lot overboard, but I do like that these boxes are popping out. I like how you can see when I mouse over, it it has a little bit of animation. I like how the so what stands out.
28:56Not not world changing, but nice. What are your thoughts on this now that you see this?
29:03I I don't know if you're getting any additional value out of each iteration. Because The reason is because this is pure aesthetic determination.
29:14Right? This is purely asking the model, how do you feel about this design?
29:19I have not found a model that has phenomenal taste. It's regurgitating what's already in its weights.
29:27Mhmm. So I don't know if you're going to get a bunch of additional value for each iteration.
29:32It'll probably just change it. You you pro you might just do better by having that first prompt and and elaborating a little bit more on what you're looking for in that first prompt.
29:44I think so too. And then giving it my own feedback or even finding somebody who has a design as a okay. I can see that, but I wanted something to experiment with that wouldn't burn up tokens and take forever.
29:55Alright. Speaking of, you've got this loop library. What's the point?
30:00Why would I need to use your loops instead of just creating my own?
30:05Yeah. So this is an aggregation of both my own loops and then loops that other people have submitted as well as ones that I found on the public web. Like everything in AI, it it like, loops started with something that was just very hand wavy and and conceptual.
30:23And what I like to do is give things some weight, some practicality, and so I wanted to put together actual practical loops that people can use or at least be inspired to try and and potentially create their own loops.
30:39And so if you want if you don't want to have to think about what is a loop, how do I design one, how do I design it for my own use case, you can come here and you can be inspired and look and see if any of these apply to you.
30:52And you can just learn about loops in general from the loop library. We also have a skill, which you can find in that top nav bar. And if you install the skill, the loop library skill will basically give you that in whatever coding assistant you're using.
31:10And so you could say slash loop library, help me create a skill to do x, or find a skill that can accomplish this thing that I'm looking to do.
31:19And it'll both search the existing repository of skills,
31:23and it'll help you develop your own skill if you want as well. I like this artifact to skill loop. This is a little bit more of a judgmental one.
31:33Right? I basically would copy this, and I'd say, I've got this doc. I really like the design of it.
31:37I want you to create some kind of skill that would allow me to create more docs like this.
31:41Is that right? Yeah. I think this is, uh, from Heaton Shaw, and I think, uh, you know him.
31:47I do know him. We were just talking last week. Cool.
31:50Yeah. He, uh, he put this one together. I thought it was really cool.
31:53So, uh, yeah, published it.
31:55You know, because there was so much to cover here, I didn't get to cover all the examples that I have. I'll have links to everything below. But one of the examples was from somebody who took one of your skills and just made a little tweak to it and then showed what that would look like, and so I'll have that below.
32:11Thanks for doing this with me, Matthew. I'm excited to Yeah. See
32:14This is cool. Yeah. Check out the loop library.
32:17Go star the repo if you're into that. I already did. And, yeah, I I I would love to hear what your audience thinks about loops and what loops they're playing with.
32:25Alright. Here. Look.
32:26Start it. Oh, you hit a thousand. Hey.
32:28Know you're aiming for that. I'm
32:30seeing this for the first time now. Hell, yeah. Very nice.
32:33Okay. Congratulations. Okay.
32:37Here's the loop that I have in mind. You see this? This is the back end of the videos that I showed Matthew.
32:42It's this thing that I created for myself, and you can see that I've got all the playable buttons here that take me to the videos. Everything works beautifully.
32:51If I don't like this video, I could archive it. If I wanna change a time stamp, I can. Everything is great except for one thing here.
32:58If I want to move a video up or down, it doesn't work. I've gone back and forth with Claude on this to just build a way for me to rearrange these videos and it hasn't done it.
33:09So that's the loop that I'm going to create. Let's see if it works. It did it.
33:14I'm so giddy excited about this. Okay. Check it out.
33:17Look. Remember how before I couldn't slide anything down? So if I wanted to, for example, take the Theo video and move it up, it wouldn't work.
33:24Now I can. And then I can move it down. So freaking exciting.
33:28It works. Let me show you how, uh, I got it to work. Okay.
33:32This is Versus Code where I like to use Claude code, and you can see I didn't know how to even write the for this. So I said, I want you to write a prompt for me for a loop, etcetera. And then just like I told Matthew I was worried about burning through too many tokens, I said, I want you to figure out how I won't burn through too many tokens.
33:50And I came up with a with a prompt that I could give, and then I realized, you know what? The way it was saving me tokens was by having Opus check with me after each cycle. That's too much.
34:00So I told it, I don't need you to check with me after each cycle. Check with me after think I forget the number. I think it was, like, after four cycles.
34:06Fine. And so then it went to work, and here's what the end looked like. It did a bunch of passes.
34:13It tested them to make sure that the slider actually worked. It kept going back and forth, and I saw it fail at times and fix it and so on until it finally nailed it.
34:24And the exciting thing for me is before this loop, I had gone back and forth with Opus. Opus would say, it's done. It works.
34:32And I would go and test it and go, it doesn't work. And then the way that I operate is, I would start giving it suggestions for what to do. And then it wouldn't get that right, but it would tell me that it worked.
34:41And then I would say, go freaking figure it out, and I get angry because I was in a rush because I was gonna record with Matthew. And then it would go back and iterate again. It would say, I'm done.
34:49And then anyway, and it wasn't done. Now instead of me sitting back and getting frustrated and going over and over, I did the loop, and it worked. And I'm so excited about it.
34:57I've got a good use. I hope you're as excited about this as I am. It out on a project, and, uh, let's see if let's see what happens for you.
35:05And now that this is over, I've got the next video for you to watch right here, another one for both of us to get excited about. See you there.
The Hook

The bait, then the rug-pull.

Two of AI coding's loudest voices posted about "agent loops" on the same day and the internet reacted — so the host locked himself in a room, crammed on every example he could find, and brought an actual practitioner on screen-share to fact-check what he'd learned.

Frameworks

Named ideas worth stealing.

03:37model

Trigger + Goal

  1. Trigger: manual, scheduled, or action-based
  2. Goal: verifiable (hard number) or LLM-as-judge (model decides)

The minimal definition of a loop given on-screen: something that kicks it off, and something that tells it when to stop.

Steal forFraming any agent automation pitch or internal tooling doc — forces you to name both halves before building.
16:30concept

Verifiable Goal Hierarchy

  1. Best: deterministic/verifiable (tests pass, page load under 50ms, CTR over 10%)
  2. Weaker: LLM-as-judge (model decides when quality is sufficient)

A ranking of loop goal types by reliability — verifiable goals remove ambiguity about when to stop; judge-based goals require human review anyway.

Steal forDeciding whether a given automation task is loop-ready, or needs a spec written first.
CTA Breakdown

How they asked for the click.

VERBAL ASK
19:48product
Go to zapier.com/mcp. Tell him Andrew sent you.

Mid-roll sponsor read delivered as a live product demo (booking a haircut, emailing a spouse, adding a calendar event via Zapier MCP) rather than a scripted ad break — folded into the loop-permissions discussion so it reads as an example, not an interruption.

MENTIONED ON CAMERA
19:48productZapier MCP
FROM THE DESCRIPTION
PRIMARY CTAWhere the creator wants you to go next.
Storyboard

Visual structure at a glance.

open
hookopen00:01
definition
valuedefinition03:37
framework
valueframework14:55
sponsor
ctasponsor20:24
loop library
valueloop library32:17
real fix
valuereal fix34:20
Frame Gallery

Visual moments.

Watch next

More from this channel + related breakdowns.

Chat about this