AI Chinwag
▓ machine wing — black + gold in design; shown plain here

From the AI Chinwag resource archive

How to write AI agent loops in Claude Code and Codex

ChatPRD · Claire Vo · video · agents

Read the original ↗

What it is — A walkthrough (paired with a Lenny’s Newsletter / ChatPRD piece) of designing recurring and autonomous agent loops in Claude Code and Codex.

Key points

  • Four loop types: Heartbeat (recurring schedule), Cron (fixed time), Hook (event-triggered), and Goal (runs until a validated outcome).
  • Building blocks: automation trigger, isolated worktrees, reusable skills, tool plugins/connectors, sub-agents, and state tracking.
  • Concrete examples: a daily aging-PR reviewer, and a weekly skills-identification loop using goal-based subagents that self-validate.

💬 The room said — Mixed reaction - one listener felt it left the concept of agent loops still vague, and the chat drifted straight into worries about token spend, with someone having moved off Claude to Codex partly to dodge usage costs.

Shared by Adam Tomat in #ai-dev.

More like this