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

EPISODE · Jun 17, 2026 · 29 MIN

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

from How I AI · host Claire Vo

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:The plain-English definition of a loop—and why it’s just an automated prompt, not a scary new paradigmThe four loop types (heartbeat, cron, hook, and goal) and when each one actually fits your workflowHow to think about loop design using the “onboarding an employee” mental modelThe five things every effective loop needs: work trees, skills, plugins/connectors, subagents, and state trackingHow to build a scheduled PR-review routine in Claude Code that babysits aging PRs and alerts your teamHow to set up a weekly skills-identification automation in Codex that spawns its own validating subagentsWhy goal-based loops are the hardest to write well—and where most people burn tokens for nothingThe 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 todayRunway—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].

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:The plain-English definition of a loop—and why it’s just an automated prompt, not a scary new paradigmThe four loop types (heartbeat, cron, hook, and goal) and when each one actually fits your workflowHow to think about loop design using the “onboarding an employee” mental modelThe five things every effective loop needs: work trees, skills, plugins/connectors, subagents, and state trackingHow to build a scheduled PR-review routine in Claude Code that babysits aging PRs and alerts your teamHow to set up a weekly skills-identification automation in Codex that spawns its own validating subagentsWhy goal-based loops are the hardest to write well—and where most people burn tokens for nothingThe 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 todayRunway—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].

NOW PLAYING

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

0:00 29:06

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

Chewing the Fat with WorkForge WorkForge Bite-Sized Conversations for Building a Stronger Workforce Welcome to Chewing the Fat, a podcast delving deep into the world of food manufacturing. Dive into real conversations around critical topics like staffing, retention, onboarding, and career development in this essential industry. Subscribe now to gain insights from your peers, subject matter experts and more on the biggest issues facing food manufacturers today: -Hiring and retaining employees -Addressing the challenges of the Silver Tsunami -Improving time to productivity of new employees -Engaging employees from hire to retire And more... Tune in to Chewing the Fat, a WorkForge podcast, and join the conversation on how to build and sustain a resilient, high-performing workforce in food manufacturing. Solving for Change MOBIA Technology Innovations Solving for Change welcomes business and technology leaders to share stories of bold business transformation within complex organizations. In an era when technology and markets are changing around businesses, the key to staying competitive is to evolve in response to those changes.  MOBIA’s Mike Reeves and Marc LeBlanc investigate business transformation, deconstructing the challenges, ambitions, and market disruptions that drive companies to embark on transformation journeys, and exploring their unique approaches to achieving meaningful outcomes.  What sparks leaders to pursue business transformation? How do they overcome the challenges along the way? What are the keys to creating enduring change?  Through in-depth conversations with business and technology leaders, Mike and Marc answer these questions and explore how businesses evolve by pulling four key transformation levers: people, process, technology, and culture. The Lee Olsen Show Lee Olsen CJF I want to help you improve all areas of your life by 3 types of podcasts!👉Blood, Sweat & Blessings-Interviews of normal people that have achieved BIG things!👉Series!!! For Love of the Horse- Brad Jackman DVM & Lee Olsen CJF, how to help your horse!👉Business Tips- Proven Life Changing Business Strategies with Lee Olsen The Field Priest Methodius Chwastek The Field is a place of cultivation and of battle. In the Church, we learn to cultivate a life pleasing to God. This life is shaped in the spiritual battle. This series examines, chapter by chapter, the Christian classic The Field, by Saint Ignatius Brianchaninov. Please join me as I explain this great work in terms the modern Orthodox Christian can understand. 

Frequently Asked Questions

How long is this episode of How I AI?

This episode is 29 minutes long.

When was this How I AI episode published?

This episode was published on June 17, 2026.

What is this episode about?

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...

Can I download this How I AI episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!