How I AI

How to design AI agent loops: schedules, goals, and subagents in Claude Code and Codex


Listen Later

I break down every loop type from scratch—what a heartbeat, cron, hook, and goal loop actually are, when each one fits, and the five things any effective loop needs before it touches production. Then I build two live loops: a daily aging-PR reviewer in Claude Code that schedules itself at 10:15 a.m. and spins off its own subagents, and a weekly skills-identification loop in Codex that spawns goal-based subagents to validate its own output in real time.


What you’ll learn:

  1. The plain-English definition of a loop—and why it’s just an automated prompt, not a scary new paradigm
  2. The four loop types (heartbeat, cron, hook, and goal) and when each one actually fits your workflow
  3. How to think about loop design using the “onboarding an employee” mental model
  4. The five things every effective loop needs: work trees, skills, plugins/connectors, subagents, and state tracking
  5. How to build a scheduled PR-review routine in Claude Code that babysits aging PRs and alerts your team
  6. How to set up a weekly skills-identification automation in Codex that spawns its own validating subagents
  7. Why goal-based loops are the hardest to write well—and where most people burn tokens for nothing
  8. The two warning signs that your loop is going to get expensive before it gets useful

Brought to you by:

WorkOS—Make your app enterprise-ready today

Runway—The creative AI platform for images, video, and more

In this episode, we cover:

(00:00) Prompts are out and loops are in

(02:30) Defining a loop

(03:03) The four ways to automate a prompt: heartbeat, cron, hooks, and goals

(06:03) Five things every effective loop needs

(09:26) The “onboarding an employee” framework for designing loops

(11:58) Live build #1: Daily aging PR loop in Claude Code

(17:08) Subagents inside loops

(19:00) Live build #2: Weekly skills identification loop in Codex

(22:57) Watching subagents spin up in real time

(25:28) Warning signals around loops

(27:31) What listeners are doing with loops

Tools referenced:

• Claude Code: https://claude.ai/code

• Codex: https://chatgpt.com/codex

• OpenClaw: https://openclaw.ai/

Other references:

• Claire’s article “Why OpenClaw Feels Alive Even Though It’s Not”: https://x.com/clairevo/article/2017741569521271175

• Addy Osmani’s article on loop engineering: https://addyosmani.com/blog/loop-engineering/

• Using Goals in Codex: https://developers.openai.com/cookbook/examples/codex/using_goals_in_codex

Where to find Claire Vo:

ChatPRD: https://www.chatprd.ai/

Website: https://clairevo.com/

LinkedIn: https://www.linkedin.com/in/clairevo/

X: https://x.com/clairevo

Production and marketing by https://penname.co/. For inquiries about sponsoring the podcast, email [email protected].

...more
View all episodesView all episodes
Download on the App Store

How I AIBy Claire Vo

  • 4.8
  • 4.8
  • 4.8
  • 4.8
  • 4.8

4.8

143 ratings


More shows like How I AI

View all
The Twenty Minute VC (20VC): Venture Capital | Startup Funding | The Pitch by Harry Stebbings

The Twenty Minute VC (20VC): Venture Capital | Startup Funding | The Pitch

544 Listeners

The a16z Show by Andreessen Horowitz

The a16z Show

1,095 Listeners

Y Combinator Startup Podcast by Y Combinator

Y Combinator Startup Podcast

227 Listeners

Practical AI by Practical AI LLC

Practical AI

211 Listeners

Product Thinking by Melissa Perri

Product Thinking

148 Listeners

The Startup Ideas Podcast by Greg Isenberg

The Startup Ideas Podcast

210 Listeners

No Priors: Artificial Intelligence | Technology | Startups by Conviction

No Priors: Artificial Intelligence | Technology | Startups

144 Listeners

This Day in AI Podcast by Michael Sharkey, Chris Sharkey

This Day in AI Podcast

228 Listeners

The AI Daily Brief: Artificial Intelligence News and Analysis by Nathaniel Whittemore

The AI Daily Brief: Artificial Intelligence News and Analysis

690 Listeners

AI and I by Dan Shipper

AI and I

36 Listeners

The Next Wave - AI and The Future of Technology by Mindstream (Hubspot Media)

The Next Wave - AI and The Future of Technology

54 Listeners

AI + a16z by a16z

AI + a16z

32 Listeners

Training Data by Sequoia Capital

Training Data

40 Listeners

The Pragmatic Engineer by Gergely Orosz

The Pragmatic Engineer

75 Listeners

OpenAI Podcast by OpenAI

OpenAI Podcast

58 Listeners