Summary

Explains agent loops from first principles (discover → plan → execute → verify → iterate), the 4-condition test for whether one is worth building, a concrete coding-loop spec with a hard stop, the five building blocks Claude Code/Codex ship, and the compounding token-cost problem. Ends by pivoting to a no-code alternative for personal/life automation: Mira, a Telegram-based agent that runs “Skills” (trigger + action) across 500+ connected apps without any setup.

從第一原理解釋代理循環(發現→規劃→執行→驗證→迭代)、判斷是否值得建構循環的四條件測試、一個具體的編碼循環範例與硬性停止條件、Claude Code/Codex 提供的五個構成要素,以及循環成本會隨迭代複利增長的問題。文末轉向無程式碼的個人生活自動化替代方案:Mira,一個透過 Telegram 操作、串接 500+ 應用程式、執行「技能」(觸發+動作)且免設定的代理。

Key Points

  • Defines a loop precisely: a prompt gives one answer; a loop hands the AI a job, a way to know when it’s done (verify), and a rule for when to give up (stop condition).
  • Verify is “the heart of the loop” — without an objective check, repetition isn’t progress, it’s the agent agreeing with itself (echoes the “Ralph Wiggum loop” failure mode named elsewhere in this batch).
  • Cost compounds because context is re-sent and grows on every iteration; a 10-iteration loop costs far more than 10x a single prompt, and adding a separate checker model roughly doubles the bill.
  • The metric that matters is cost per accepted change, not tokens spent — below ~50% accept rate, the loop costs more than it saves.
  • Build order matters: get one manual run reliable → turn it into a skill → wrap in a loop with a gate and stop condition → only then schedule it. Skipping ahead is “exactly how loops blow up while you sleep.”
  • Mira is positioned as the consumer-grade, code-free version of the same five-part loop structure (trigger, action, check, memory, runs unattended) for non-engineering daily-life tasks.

Insights

This is the most pedagogically clear of the loop-engineering articles in this batch — it’s the only one that explicitly walks through a hand-runnable “self-checking loop” prompt template usable inside plain Claude/ChatGPT with no tooling, which is a genuinely actionable takeaway distinct from the others’ Claude-Code-specific advice. The pivot to promoting Mira (a third-party product) in the second half should be read with some skepticism — it’s effectively an ad embedded in an otherwise solid explainer.

Connections

Raw Excerpt

Loops also fail quietly. Engineer Geoffrey Huntley calls it the “Ralph Wiggum loop”: the agent decides it is done too early, exits on a half-finished job, and the loop keeps running and spending while producing nothing.