I-GUESS COURSE GUIDE

Agent Loops: Stop Prompting, Start Orchestrating

A chapter-by-chapter readback of the free course by Theo (t3.gg) on Theo - t3․gg.

Length24:44
Chapters14
Modules5
Plain Markdown with clickable timestamps — drops into Obsidian, Notion or GitHub as-is.

The sharpest angle is that loops — not hand-written prompts — should drive most agent runs, because dynamically generated workflows fit the shape of the work better than static sprint-style cycles. Theo backs this with real numbers: ~$10,000 of inference consumed in one month on three $200 plans.

Who it's for
Read this guide if
  • You already use Claude Code or Codex daily and want to automate PR reviews and refactors
  • You're on a $200 consumer plan and want to know whether running more loops is worth it
  • You're curious about orchestration patterns like Codex threads spawning other threads or /goal primitives
Skip ahead if
  • You're new to AI coding tools and haven't run a single agent session yet
  • You pay API prices per token and can't absorb the cost of long-running loops
  • You need fully autonomous, no-oversight agent workflows — Theo explicitly rejects that stage
In brief
  • Duration: 24 minutes 44 seconds (1484 seconds)
  • Roughly 14 chapters grouped into 5 chronological modules
  • Tools covered: Claude Code, Codex, Opus, GPT 5.5, CodeRabbit, Greptile, Macroscope, Magic Patterns (sponsor)
  • Level: intermediate to advanced — assumes you already prompt coding agents regularly
  • Includes real cost data: ~$6,000/month on his main machine plus $2,600 on a Mac Mini

The walkthrough

Each chapter below is our original written explanation of what happens at that moment in the video — a paraphrase, not a transcript. Click any timestamp to jump the player.

Why Loops, and Pete's Influence

This opening module sets up the core thesis: instead of prompting agents by hand, design loops that prompt agents. It grounds the idea in Pete's experiment where a Codex thread wakes every five minutes to direct work and can spawn other Codex threads.

0:00

Introduction

Theo opens with the video's thesis: stop prompting coding agents manually and start designing loops that prompt agents for you. He admits early attempts like the Ralph loop increased agent error rates, forcing him back to manual plan, execute, review cycles for a while. He describes 'Pete' as an experimental figure ahead of the curve, showing a rough version of what agent-driven building looks like. After building loops where agents review code, watch pull requests and re-review feedback, he now argues the majority of agent runs should use prompts the human never wrote.

3:39

Sponsor Break: Magic Patterns

The sponsor segment covers Magic Patterns, an AI design tool that operates inside an existing codebase's frontend. Theo lists its design system selector with options like Shadcn, Chakra, Mantine, MUI and Figma import, plus model switching, an auto router, inline comments, a visual editor and responsive frame previews. He notes companies including DoorDash, Vappy and Granola use it. While promotional, the segment is brief and the features described are real capabilities of the tool relevant to frontend workflows.

4:05

Pete's Codex Orchestrator Loop

Theo walks through Pete's influential tweet describing a simple loop where Codex maintains repos, waking every five minutes to direct work across threads. The setup uses an orchestrator skill plus triaging, auto-review and computer-use skills. The key discovery Theo highlights is that a Codex thread can spin up another Codex thread, which unlocks recursive orchestration. He connects this to Anthropic's recursive self-improvement article, tracing the workflow's evolution from person-to-chatbot copy-paste, to IDEs and terminals where models edit code directly.

5:51

Against Hard-Coded Sub-Agent Personas

Theo criticizes the common pattern of pre-defined sub-agent personas — adversarial reviewer, security reviewer and so on — written ahead of time in markdown skill files. His argument is that this misses the dynamic nature of agents, which can build their own context on the fly rather than being hard-coded in advance. The next step, he says, is a model that not only picks and spins up sub-agents but audits its own work and re-runs the loop. He draws a line at full autonomy, calling no-oversight claims like Boris's 'stupid', while still wanting to experiment.

First Real Experiments

Theo describes his first concrete loop experiments: an Opus-driven refactor where the agent autonomously addressed PR comments for over six hours, and a follow-up where Claude runs Codex for review feedback. The through-line is removing manual copy-paste orchestration from the plan-execute-review cycle.

7:58

The Six-Hour Autonomous PR Experiment

Theo details a concrete experiment where Cloud Code opened a pull request for a large refactor, with Opus deciding how to split work among sub-agents. Rather than manually copy-pasting comments from CodeRabbit, Greptile and Macroscope into the agent, he let the agent monitor PR comments itself, running in an isolated work tree on a separate network machine. The agent addressed feedback autonomously for six-plus hours. The next refinement was telling Claude to run Codex with a review-feedback command upon completion and address that feedback itself.

10:10

Lakebed Rebuild and Data Architecture Findings

Theo had the agent rebuild the isolate layer in Lakebed for cost efficiency. A deep-dive on performance and alternative runtimes with GPT 5.5 flagged the data architecture as the real bottleneck: subscriptions and validations re-ran after every mutation on every query subscription. The agent identified fixes including dependency-aware validation, mutation coalescing per app, batch validating, shared results for identical subscription arguments, plus back pressure and max refresh frequency. The work was split into at least three PRs, mostly stacked with some parallelization opportunities.

The Overnight Loop Workflow

This module covers the centerpiece experiment: an automated workflow that creates PRs, reviews them, loops on comments and merges — running overnight from 2:29am to 6:50am. It produced four stacked PRs, all merged, and revealed that loops generate sub-loops dynamically.

11:38

HTML Plans and Self-Threaded PRs

Theo describes using an HTML plan pattern, crediting Thorek, which makes agent plans easier to read even on a phone. He then had the agent create a new thread that independently filed a PR implementing the first plan. He pushed further, asking the agent to build a full automated workflow: spin up a thread to make the PR, another to review it, loop the implementation thread on comments until approvals, then merge and trigger the next piece. The agent proposed a heartbeat polling the thread every five to ten minutes, reading implementation status and creating fresh review threads on new head SHAs.

13:21

Overnight Results and Dynamic Sub-Loops

The workflow ran overnight, starting Sunday at 2:29am and finishing — after breaking the editor — at 6:50am. Theo woke to four stacked PRs, heavily reviewed and all merged. The key insight he draws out: the loop created sub-loops dynamically, meaning a workflow was generated from the specific problem rather than hard-coded review cycles. He contrasts this with traditional agile and waterfall sprint loops, which he calls static and shape-forcing, arguing the most productive teams build structure around the problem — and agent loops let work structure be dynamically generated to match the work's shape.

Use Cases and Delegation Advice

Theo moves from experiments to practical guidance: audit every manual step around prompting and delegate each one to the agent. Concrete use cases include PR triage loops and a deal-checking loop that surfaced a Verizon 5G hotspot plan via Discord.

15:52

Practical Use Cases

Theo lists immediate applications: monitoring PRs worth merging, and scheduled morning PR triage. He also shares a personal loop that checks deals, which surfaced the new Verizon 5G hotspot plan early and notified him via Discord. These examples show loops aren't limited to code — any recurring monitoring task with a clear completion signal can be delegated. The underlying principle is that the workflow structure should come from the task itself, which loops handle naturally.

16:39

Prompt Yourself Out of the Loop

Theo's core recommendation: examine your work before, during and after prompting — running the dev server, verifying, committing, pushing, opening the PR, addressing review feedback — and delegate each step to the agent. His spicier take is that reading agent code before another agent has reviewed it wastes your time. He notes he uses almost no custom skills or plugins, just stock Claude Code with a normal account, proving this doesn't require elaborate tooling. The goal is finding where you must personally be involved and prompting yourself out of everything else.

Costs, Limits, and the Verdict

The final module is the reality check: loops burn tokens, wrong paths persist longer, and one 3-million-token Opus run addressed just three small comments. But on flat-rate $200 plans Theo hit only 29% of his weekly limit, so his advice is to run more loops and treat unused limits as wasted money.

18:50

The Cost Warning

Theo offers an honest caveat: loops burn far more tokens, and wrong paths persist longer, which costs real money. His verdict is that if you're paying API prices, loops probably aren't worth it yet. He gives a stark example: under ten minutes of agent feedback led to an eight-hour, three-million-plus token Opus run to address roughly three small comments. He also notes GPT 5.5 writes functioning code but not code he likes, describing the cleanup work as unfucking TypeScript that looks like Python.

21:23

Rate Limits as a Budget

Theo shares his usage numbers: on the $200 plan he ran roughly five Opus loops for days and hit only 29% of his weekly limit. By contrast, a Cloud Code workflow with Opus 4.8 at launch instantly hit the five-hour limit on the $100 plan. His advice: if you're on $200 and not near limits, run more loops. He notes consumer plans generally can't be used at companies due to enterprise rules, so they're best for 'crazy' experiments. Unused limits are wasted money — the unhit 70% of his weekly limit equals thousands of dollars of paid-for inference.

21:42

Harness Tools and /goal

Theo reports on experimenting with harness tools: Codex's thread spawning he finds very cool, and both Codex and Cloud Code offer a /goal primitive — a linear never-ending loop that re-checks completion each turn. He distinguishes this from dynamic workflows that create work from a preplanned goal. One of his 12-plus hour /goal runs is rewriting the Hermes agent in Rust to run in smaller isolates, since the current version uses over 8 GiB of RAM. His verdict: it likely works but isn't production-ready.

23:12

The Numbers and Final Takeaway

Theo closes with hard usage data: May totaled about $1,900 of inference on his main computer; June, seventeen days in, was around $6,000 there plus $2,600 on his Mac Mini — roughly $10,000 for the month across three $200 plans (two Cloud Code, one Codex). Spending $600 a month yields $10,000 of inference, so underusing your subscription is leaving value on the table. The core takeaway: the value of loops isn't the tech itself but letting agents do more — after finishing a prompt, look at your next manual steps and ask the model if it can do them.

Moment by moment

TimeWhy it matters
4:05Pete's tweet reveals a Codex thread can spawn another Codex thread — the founding idea of the whole video
13:21The overnight run result: four stacked PRs started at 2:29am, all merged by morning
14:21The key insight: loops generated sub-loops dynamically instead of following hard-coded review cycles
18:50The cost warning: 3 million Opus tokens spent on three small review comments
23:52The closing takeaway: after prompting, ask the model which of your next manual steps it can do

Do this next

  1. List every manual step in your current agent workflow (dev server, commit, push, PR, review responses) and delegate one of them to the agent this week
  2. If you're on the $200 Claude plan, check your weekly usage percentage and design one overnight loop experiment to push toward the limit
  3. Try the HTML plan pattern for your next agent task so plans are readable on your phone before you approve implementation threads

Common questions

What is an agent loop, according to Theo?

An agent loop is a workflow where the AI agent, rather than the human, writes and drives the prompts — for example, an agent that creates a PR, spins up a second thread to review it, loops the implementation thread on review comments until approval, then merges. Theo's central claim is that the majority of agent runs should use prompts the human never wrote, after his early attempts like the Ralph loop showed manual prompting scales poorly.

Why did Theo's early loop attempts fail?

His first loops, like the Ralph loop, increased agent error rates, which pushed him back to manually orchestrating plan, execute, review cycles for a time. He also criticizes pre-defined sub-agent personas such as adversarial or security reviewers written in markdown skill files, because they hard-code what agents should do instead of letting them build their own context dynamically around the specific problem.

What happened in the overnight loop experiment?

Theo started an automated workflow on Sunday at 2:29am and it finished — after breaking his editor — at 6:50am. He woke up to four stacked pull requests that had been heavily reviewed, and all four were merged. The workflow used a heartbeat polling every five to ten minutes, created fresh review threads on new head SHAs, and pulled latest main before creating each new worktree.

How much does running agent loops cost?

Theo shares his real numbers: May was about $1,900 of inference on his main machine; June, seventeen days in, hit roughly $6,000 there plus $2,600 on his Mac Mini — about $10,000 total across three $200 plans (two Cloud Code, one Codex). One cautionary case: under ten minutes of agent feedback triggered an eight-hour, 3-million-plus token Opus run to fix roughly three small comments.

Is it worth running loops on API pricing?

No — Theo says if you're paying API prices, loops probably aren't worth it yet, because they burn far more tokens and wrong paths persist longer, costing money. Loops make sense on flat-rate consumer plans: on his $200 plan he ran about five Opus loops for days and only reached 29% of his weekly limit, meaning the unhit 70% was effectively thousands of dollars of paid-for inference going unused.

What is the /goal primitive in Codex and Claude Code?

Both Codex and Claude Code have a /goal primitive, which Theo describes as a linear never-ending loop that re-checks completion each turn. He distinguishes it from the dynamic workflows his experiments used, which create work from a preplanned goal. One of his 12-plus-hour /goal runs is rewriting the Hermes agent in Rust so it can run in smaller isolates, since the current Hermes uses over 8 GiB of RAM — likely functional, but not production-ready.

Does this require custom skills or plugins?

Surprisingly little. Theo says he uses almost no custom skills or plugins — just stock Claude Code with a normal account, not T3 code. The emphasis is on identifying the steps around prompting (verify, commit, push, open PR, address feedback) and delegating each to the agent, rather than building elaborate tooling. He does credit Thorek's HTML plan pattern, which makes agent plans easy to read even on a phone.

Should you read agent code before another agent reviews it?

Theo's 'spicier' take is no — reading agent code before another agent has reviewed it wastes your time. His recommendation is to insert yourself only where you genuinely must be involved and prompt yourself out of everything else, letting review agents like CodeRabbit, Greptile or a second agent thread handle the first pass before a human looks at the code.

Spot a mistake?

Every chapter summary on this page is hand-checked against the video, but agents (and editors) make mistakes too. If you spot a wrong timestamp, misquoted figure or drifted paraphrase, email us and we'll fix it.

More course guides