Why Claude Code’s Lead Abandoned Prompts for Loop Engineering

Loop engineering—an automated agent workflow that replaces manual prompting—has reshaped how developers will use Claude Code and OpenAI Codex by 2026, introducing six core building blocks, token‑cost trade‑offs, and a new emphasis on validation and understanding debt.

21CTO
21CTO
21CTO
Why Claude Code’s Lead Abandoned Prompts for Loop Engineering

Loop engineering (also called "loop engineering") is the shift from manually issuing prompts to AI coding agents toward an automated, self‑sustaining workflow. Boris Cherny, head of Claude Code at Anthropic, says he no longer writes prompts himself; his job is now "just writing loops." Addy Osmani of Google popularized the term and highlighted its impact on developer tooling.

Core definition

Cherny defines loop engineering as "replacing yourself with a prompting agent." The pattern combines four essential capabilities: scheduled execution, isolated workspaces, agent validation, and persistent memory, turning a coding agent into an autonomous software worker.

Six building blocks

Automation : a scheduled discovery and triage inbox (e.g., /loop hook, GitHub Actions).

Worktree isolation : each thread runs in its own git worktree to keep sub‑agents separate.

Skill files : project knowledge encoded in SKILL.md for both agents.

Connectors : MCP connectors and plugins that link external tools.

Sub‑agents : a writer agent and a checker agent defined under .codex/agents/ or .claude/agents/.

Memory : persistent state stored in AGENTS.md or CLAUDE.md, optionally linearized via connectors.

Both Claude Code and OpenAI Codex expose a /goal command that runs the model continuously until a verifiable stop condition is met; Claude Code uses a separate model to evaluate the result.

Practical example

Osmani’s workflow runs each morning, classifies CI failures from the previous day, and spawns a sub‑agent in an isolated worktree to generate a fix (using the git worktree isolation). A second sub‑agent then reviews the fix against the project’s test suite.

Cost, correctness, and understanding debt

Osmani warns that token costs can vary dramatically and that unattended loops can produce silent errors. He stresses "understanding debt": when a system deploys code the developer has never read, the gap in comprehension widens, leading to divergent outcomes for engineers with different levels of code understanding.

Future outlook

Loop engineering is expected to become the orchestration layer for AI‑assisted software development. Platforms that make loops portable—allowing developers to start with a scheduled triage flow and a verification sub‑agent—will likely dominate the market, while current tools like Cursor, Google Antigravity, and GitHub Copilot still lack native loop‑as‑a‑unit support.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

automationAI agentssoftware developmenttoken costOpenAI CodexClaude CodeLoop Engineering
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.