Claude Code Redefines Agent Loops
新智元 · wechat · 2026-07-16
The Claude Code team formally defines a "loop" as an agent repeatedly executing work until a stopping condition is met, summarizing four typical loop types:
- Turn-based loops: Human controls each turn, with every prompt triggering a round of execution.
- Goal-based loops: An evaluator decides whether to continue based on whether a goal is met.
- Time-based loops: Triggered at fixed intervals, similar to cron jobs.
- Active loops: Triggered by events or time, running unattended until manually shut down.
The article emphasizes that the focus isn't simply "letting AI run continuously," but rather on designing guardrails: machine-checkable completion conditions, maximum turns, spending caps, no-progress detection, and automatically verifiable feedback mechanisms. The author believes AI programming is shifting from writing prompts to designing behavioral systems: how to trigger, verify, and stop.
Related event: From Prompt Engineering to Loop Engineering(6 posts)→
More from coding & agent
- Building a Secure AI Agent Gateway: Self-Hosting OAuth for Multiple SaaS Apps — Defiant_Cod_2654 · 2026-07-22
- Rowboat launches as an open-source, local-first AI coworker with memory — ycombinator · 2026-07-22
- Reddit user chains Ideogram 4 and Krea2 to mimic bbox-based image positioning — v3lh0t05c0 · 2026-07-22
- Apollo Cuts AI Assistant Skill Dev Time by 85% with Deep Agents — LangChain · 2026-07-22
- Scoble says AI “loops” really means long-running multi-agent workspaces — Scobleizer · 2026-07-22
- Kimi Code opens a waitlist as Moonshot rolls out its coding product — Fabulous_Bonus_8981 · 2026-07-22