Loop engineering for beginners
Claire Vo explains how to build AI loops, which are autonomous scheduled workflows that let agents prompt themselves, using tools like Claude Code and Codex.
The gist
-
Loops let AI agents work on a schedule without manual input, making them useful for recurring tasks like daily PR reviews or inbox cleanup.
-
Every loop needs five things: work isolation, reusable skills, tool connectors, sub-agents, and state tracking to keep execution clean.
-
Goal-based loops run an agent repeatedly until success is met, but vague prompts can cause indefinite looping and expensive token burn.
-
Vo says to design loops like onboarding an employee by giving the agent one clear, repeatable job rather than a complex workflow diagram.
"I'm going to build one in Claude Code and one in Codex. In Claude Code they're called routines. I'm going to create a routine — a daily aging PR review — that looks for open PRs that have been open more than 12 hours and babysits them till they are ready for merge or alerts th..."
▶ Play at 2:56113 creators recommend it, including Riley Brown, Liam Ottley, and Peter Yang.
See all on the Claude Code page"I'm going to pull up Codex and show you another loop that I think is really interesting. What I like about what Codex has done is they have these templates — automation templates that give you good ideas for loops you can run. I'm using one: from recent PRs and reviews, sugges..."
▶ Play at 2:56100 creators recommend it, including Riley Brown, Dan Shipper, and John Coogan.
See all on the Codex pageWhat they recommend · 4 picks
“I'm going to build one in Claude Code and one in Codex. In Claude Code they're called routines. I'm going to create a routine — a daily aging PR review — that looks for open PRs that have been open more than 12 hours and babysits them till…”
“I'm going to pull up Codex and show you another loop that I think is really interesting. What I like about what Codex has done is they have these templates — automation templates that give you good ideas for loops you can run.”
“I pulled up Claude.ai Co-work instead of Claude Code just to really break this down for people who are not technical. There is a loop front and center here in Claude.ai Co-work which is my morning briefing.”
Also mentioned
Ads in this episode
WorkOS, Runway. They're paid, so we keep them out of the picks above.
See what How I AI recommends without being paid →Related episodes
Episodes covering similar topics