CHAPTERS
- 0:00 – 0:30
Why “loops” beat manual prompting for AI agents
Claire frames the shift from one-off prompts to agent loops: automations where an agent can trigger and guide itself. She sets expectations for what will be covered (definitions, when loops help, and pitfalls) and positions loops as especially valuable in software engineering workflows.
- •Prompts vs. loops: why self-prompting via automation matters
- •What viewers will learn: definitions, how to write prompts/loops, pitfalls
- •Loops as a way to get agents doing work without human turn-taking
- •Practical focus: Claude Code and Codex examples later in the episode
- 0:30 – 1:32
Enterprise reality check: secure access is the bottleneck (WorkOS sponsor)
The sponsor segment explains that AI tools only work well with deep access to company systems, which triggers enterprise security requirements. WorkOS is presented as an API layer to quickly add enterprise-ready features like auth, access control, and audit logs.
- •AI copilots/chatbots need deep access to codebases and internal docs
- •Enterprise buyers require security: auth, access controls, audit logs
- •Building enterprise features in-house is costly and slow
- •WorkOS offers drop-in APIs to accelerate enterprise readiness
- 1:32 – 3:34
Demystifying loops: automated prompting vs. human messages
Claire responds to hype-driven loop discourse by defining loops in plain terms and emphasizing accessibility. She distinguishes typical chat-based prompting (human messages) from loops (automated prompting), while noting both can be useful.
- •Loop hype vs. practical understanding—making it approachable
- •Message-based prompting is human-triggered and still useful
- •A loop is about automation: the agent gets prompted without you typing
- •Goal: help people decide when loops are worth it
- 3:34 – 6:05
The 4 automation trigger types: heartbeat, cron, hooks, and goals
Claire catalogs common ways to trigger AI work, borrowing from pre-AI automation patterns. She introduces “goals” as a newer first-class loop type in Claude Code and Codex, where an agent iterates until a measurable outcome is validated or it becomes blocked.
- •Heartbeat: run every N minutes/hours to check and act
- •Cron: run at specific times/days (e.g., Sundays, 9:00 AM)
- •Hooks/webhooks: trigger from lifecycle events or external signals (e.g., email received)
- •Goals: run until an outcome is validated or the agent is blocked
- 6:05 – 9:08
What effective loops need: automation + tooling + structure
Using Addy Osmani’s framing, Claire breaks down the ingredients of a high-functioning loop system and maps them to Codex and Claude Code features. She also highlights operational supports that keep loop work clean and conflict-free, especially in engineering repos.
- •Loop foundations: automation definition + scheduling + execution surface
- •Codex: Automations tab and templates; Claude Code: scheduled tasks/routines
- •/goal support and hooks/integrations are central in both tools
- •Operational necessities: worktrees, skills, plugins/connectors, subagents, state tracking
- 9:08 – 12:09
Design loops like onboarding an employee (job-to-be-done framing)
Claire offers a mental model: writing a loop is like hiring and onboarding a worker with a recurring responsibility. She gives examples across roles (executive assistant and software engineer) including a goal-based loop tied to CI checks and standards.
- •Think like a manager: define the job, cadence, and outcomes
- •Example: weekly calendar review/follow-ups loop for an EA
- •Example: hourly issue triage → code → PR loop for an engineer
- •Goal loop example: iterate on a PR until checks/lints/standards are green
- 12:09 – 13:40
Getting started with simple scheduled loops (Claude “morning briefing”)
To lower the barrier, Claire points out that many users already run loops via scheduled tasks like Claude’s morning briefing. She positions scheduled tasks (and Claude Code routines) as “loop 101” before tackling more advanced goal-based setups.
- •Scheduled tasks are loops: recurring trigger + self-prompting + completion
- •Morning briefing as an everyday, non-technical loop example
- •Good entry point: Claude scheduled tasks / Claude Code routines
- •Contrast: scheduled loops vs. goal loops (which run until validated)
- 13:40 – 16:43
Live build #1 (Claude Code): Daily aging PR review loop
Claire creates a Claude Code routine called “Daily Aging PR Review” to reduce PR babysitting. The loop checks for PRs older than 12 hours, evaluates merge readiness, spins off threads to babysit checks to green, or posts a (deliberately mean) Slack reminder.
- •Routine runs locally or in the cloud; she chooses local execution
- •Logic: find PRs open >12 hours and assess merge readiness
- •If needed, spawn a thread/subagent to babysit PR checks until green
- •Otherwise, notify the team via Slack about PRs ready to merge
- 16:43 – 19:15
Subagents and connectors in practice: Slack/GitHub + multi-thread babysitting
Claire explains how the PR loop works autonomously after kickoff and clarifies the success criteria: either babysit PRs to green checks or send Slack updates. A quick hiccup (“No Slack MCP surfaced”) demonstrates the dependency on properly enabled connectors.
- •Automation runs without continuous human monitoring once started
- •Two outcomes/success criteria: babysit checks or message the team
- •Subagents/threads let monitoring work happen outside the main thread
- •Connectors matter: Slack must be enabled/configured for notifications
- 19:15 – 20:16
Codex loop ergonomics: automation templates as inspiration
Switching to Codex, Claire highlights templates as a learning aid for designing loops. She selects a template that analyzes recent PRs and reviews to recommend skills to deepen—turning engineering output into structured training/playbook improvements.
- •Codex calls loops “automations” and provides reusable templates
- •Templates help users learn loop patterns and good prompting structure
- •Selected template: derive skill recommendations from recent PRs/reviews
- •Goal: make recommendations grounded, specific, and actionable
- 20:16 – 22:49
Live build #2 (Codex): Weekly skill identification + goal-based validation subagents
Claire customizes the Codex automation with constraints around tool/CLI/MCP validation skills, then instructs it to spin up subthreads for each proposed skill. Each subagent is told to validate the skill against the base branch using a specific goal, creating a layered loop system.
- •Schedule: weekly (Fridays) to ensure enough data for analysis
- •Bias toward skills that validate work via CLI tools/MCPs and test suites
- •For each identified skill: spawn a subagent thread to test it in practice
- •Use goal loops inside subagents for measurable validation against base branch
- 22:49 – 25:21
Watching subagents spin up in real time (Gauss, Galileo)
As the automation runs, Claire observes Codex creating memory/scaffolding and launching named subagents to validate different skills. The subagents pursue explicit goals (e.g., validating a smoke CLI skill) and iterate until validation is complete, demonstrating parallelization and self-checking behavior.
- •Codex shows automation scaffolding and uses its own memory structure
- •Subagents appear as separate chats/threads with distinct responsibilities
- •Example skills validated: chat smoke CLI; addressing GitHub comment workflows
- •Goal pursuit: subagents loop until the validation objective is satisfied
- 25:21 – 27:22
Warning signals: cost blow-ups and sloppy goal criteria
Claire closes with cautions: loops can burn tokens quickly, especially when they trigger broad work, spawn subagents, and run until success thresholds are met. She stresses that goal-based loops require precise success/evaluation criteria and recommends using established goal-writing guidance.
- •Loops can be expensive: persistent iteration + subagents + validation runs
- •Thin/unclear validation criteria leads to wasted tokens and poor results
- •Goal prompting is a distinct skill—precision matters more than chat prompts
- •Monitor loops for both cost and efficiency; consider OpenAI goal-writing guidance
- 27:22 – 29:06
Where audiences apply loops + final recap and call for comments
Claire lists additional loop-friendly use cases beyond PRs and skills—like morning briefings, inbox cleanup, and research that branches into subagents. She reiterates the core definition of a loop and invites viewers to share what they’re building (or whether they think loops are overkill).
- •Use cases: briefings, Gmail cleanup, research with branching subagents
- •Core loop idea: schedule or goal-driven iteration until done/validated
- •Loops can prompt other loops—composability enables “teams” of agents
- •Call to action: share loop ideas and feedback; like/subscribe/review
