Claude Code Lead Says: I No Longer Prompt AI Directly—What Is Loop Engineering?

Claude Code Lead Says: I No Longer Prompt AI Directly—What Is Loop Engineering?

Addy Osmani
Addy Osmani

Introduction

The hottest topic in Silicon Valley right now is Loop Engineering, or LE for short.

On June 7, Google Cloud's Addy Osmani published a blog post that sparked intense discussion.

OpenClaw author Peter Steinberger (known in the community as "Shrimp Dad") said:

You shouldn't be prompting coding agents anymore; you should be designing loops that prompt agents.

Boris Cherny, head of Anthropic's Claude Code (the "father of Claude"), also said:

I don't prompt Claude directly anymore. I have a set of loops running that prompt Claude and decide what to do next. My job is writing loops.

Note who's saying this—one is the direct parent of Claude Code, the other a veteran of AI programming tools. They're both saying the same thing: manually writing prompts for AI is becoming obsolete.

This isn't hype. It's a paradigm that frontline engineers have naturally evolved in their daily work—once you're proficient enough, you realize manual prompting by the bottleneck of human patience and typing speed.

Human-AI ping-pong mode diagram
Human-AI ping-pong mode diagram
Loop Engineering paradigm comparison
Loop Engineering paradigm comparison

At its core, this is a scalability bottleneck: you can't hire 10 people to stare at 10 agents and feed them prompts in real-time. Human attention is a scarce resource; spending it all acting as an AI dispatcher is a massive waste.

The paradigm shift is clear:

  • PE (Prompt Engineering) is humans feeding AI answers—imperative, telling AI step by step how to do things
  • LE (Loop Engineering) is humans building AI self-evolution engines—declarative, telling AI what success looks like and letting it find the path

This analogy isn't casual. The shift from imperative to declarative is one of the most important transitions in programming history. SQL isn't more efficient than handwritten loops because it's smarter, but because it hands "how to do it" details to the engine. LE does the same—handing the details of "how to prompt step by step" to the Loop system.

Instead of agonizing over how to phrase prompts more precisely, you design the loop's laws: define goals, quality standards, and let the system iterate to completion through self-play. Future competitiveness won't belong to those who write good prompts, but to those who design the smartest, most closed-loop rule systems.

Claude Code's /loop command is a prime example.

Claude Code /loop command diagram
Claude Code /loop command diagram

Loop Engineering is replacing "personally writing prompts for agents." The core: no longer prompting agents directly, but designing systems that prompt agents. A loop is a recursive goal: define the objective, let AI iterate continuously until the task is complete.


The Five Core Components of Loop Engineering

Addy Osmani's post provides a framework diagram, viewed clockwise from 12 o'clock:

Loop Engineering architecture framework diagram
Loop Engineering architecture framework diagram

LE consists of five building blocks:

  • Automations: Scheduled automatic triggering, discovery, and triage.
  • Worktrees: Isolating parallel agents so they don't interfere with each other.
  • Skills: Documenting project knowledge so agents don't have to guess.
  • Plugins and connectors: Connecting agents to tools already in use.
  • Sub-agents: One proposes ideas, another verifies.

Plus memory (state): markdown files, Linear boards, or anything outside a single conversation that can save "what's done" and "what's next."

These five core modules are already available in both Claude Code and Codex:

Core CapabilityRole in the LoopCodex ImplementationClaude Code Implementation
AutomationsScheduled discovery and routing of tasksAutomation tabs: select project, prompt, frequency, environment; results go to triage inbox; execute with /goal until doneScheduled tasks & cron, /loop, /goal, hooks, GitHub Actions
WorktreesIsolate parallel development tasksBuilt-in independent worktree per threadgit worktree, --worktree param; isolate worktrees on sub-agents
SkillsCodify project knowledge into reusable capabilitiesAgent skills (SKILL.md), invoked via $name or implicit triggerAgent skills (SKILL.md)
Plugins / ConnectorsConnect external toolsConnectors (MCP) + plugins for distributionMCP servers + plugins
Sub-agentsCreative ideation and verificationSub-agents defined in TOML under .codex/agents/Task sub-agents defined under .claude/agents/, support agent team collaboration
StateTrack task progress and completionMarkdown files or Linear integration via connectorsMarkdown (AGENTS.md, progress files) or Linear via MCP

Each module's working logic:

Scheduled Automations: The loop's heartbeat. Automatically triggered on a schedule to handle discovery and classification without human intervention.

Parallel Worktrees: Isolation mechanism allowing multiple agents to work in parallel without interference. Without worktrees, two agents would overwrite each other's changes on the same branch, causing the loop to spiral out of control.

Skills Knowledge Persistence: Document project knowledge so agents don't have to guess every time. This converts "what only you know" into structured input that "agents also know." In my view, this is the most underestimated of the five components—it determines the system's "memory ceiling" and directly impacts the loop's quality ceiling.

Plugins and Connectors: Connect agents to existing toolchains—GitHub, Linear, Slack, databases. Loops need to read real environment info and write results back; connectors are this bidirectional channel.

Maker-Checker Sub-agents: One agent proposes solutions, another validates—creator and reviewer naturally separated. This is a built-in quality gate in the loop, preventing a single agent's errors from propagating unnoticed.


Loop Engineering ≠ Cron Job

Wait—doesn't LE just look like scheduled cron jobs?

That's many people's first reaction, but there's a crucial difference: cron jobs are deterministic; LE is adaptive.

A cron job executes the exact same operation every time—it won't adjust strategy because last run's results were subpar. LE's core is the feedback loop: the system decides the next run based on the previous output. LLMs can read context, understand result quality, and adjust accordingly—something ordinary cron jobs can't do.

Just like dev teams need to understand feature feedback, user issues, workflow optimizations, then adjust iteration plans. LE embeds this "understand→adjust→re-execute" loop into the system to run automatically.

YC CEO Garry Tan warns: don't turn agents into "Foxconn factory" repetitive labor machines; developers should let agents take on more work.

But others note: to let agents do more, you must define clear boundaries—provide clear context, trusted tools, auditable operation logs, and safe stop conditions.

This warning matters. LE isn't "letting AI run wild"; it's "designing good rules so AI runs within them." Well-designed rules make the system smarter over time; poorly designed ones make it drift further off course—and you might not discover it until dozens of rounds later.


Three Known Problems with LE

① Debugging Difficulty

Debugging a state machine that's run 47 rounds is 10x harder than fixing a prompt. And most people can't even write reliable one-shot prompts.

  • Initial setup is easy, but many pain points emerge afterward; fixes are laborious.
  • Some regret introducing Loops; migration costs time and resources, so they just keep struggling.
  • Others advise migrating early—the longer you wait, the worse it gets.

Here's a counterintuitive take: LE actually demands higher prompt skills, not lower. The core prompt you write in the loop system—goal definition, acceptance criteria—if vague, gets amplified dozens of times over. Master reliable single-shot prompts first, then consider building Loops; that's the more robust path.

② High Token Consumption

LE mode consumes tokens heavily. Boris Cherny and Peter Steinberger's companies offer near-unlimited token support, but many in the community have limited token budgets.

What to do?

  • Token-rich companies can use while loops
  • Token-constrained startups can use for loops to achieve goals

Claude Code imposes various limits on token consumption: Loops support minimum 1-minute intervals, max 3-day runs, auto-stop on expiry; Loops bind to the current Claude Code session, stopping when terminal closes or session ends; also provides a Loop disable switch.

Another angle: High token consumption is a natural filter. It forces you to use LE only where it's truly worthwhile—high-value, high-repetition tasks where human processing costs more than tokens. If a task's LE token cost far exceeds the time saved, it probably wasn't suited for LE anyway.

③ Long-Task Stability

LE's focus is keeping agents running long-term without drifting, and enabling them to judge right from wrong.

Anthropic applied AI team engineer Ash says: the company leans toward "maximally autonomous," aiming to bake human judgment into the Harness rather than inserting human fallbacks.

Last year, Claude Code evolved from running ~20 minutes continuously with frequent errors to being almost self-written and capable of running continuously for days.

Anthropic engineer Andrew notes: core challenges for multi-hour/day agent runs are context, planning, and self-judgment. Anthropic pursues two paths:

  • Improve the model itself, baking long-horizon task ability into model weights
  • Redesign the external Harness around the model

Early long-running agents decomposed requirements into persistent files, repeatedly executing tasks in new context windows to mitigate context loss and task drift. As model capabilities grew, Anthropic began simplifying the Harness.

  • Opus 4.6 excels at planning and tool selection; Sonnet 4.6 delivers near-Opus execution at lower cost. Common combo: Opus plans, Sonnet codes.
  • Server-side compression and million-token context windows keep models coherent in single long sessions.

Anthropic's experimental frontier Harness pattern is the Generator-Evaluator-Planner structure, borrowing from Generative Adversarial Networks.

This structure deserves emphasis: GANs generate high-quality images because the discriminator constantly tells the generator "what's still not good enough." Translating this to software dev means one agent writes code, another nitpicks—their adversarial pressure yields far higher output quality than a single agent self-iterating. This is architectural thinking, not an engineering trick.


My Verdict: The Developer Role Is Being Redefined

Loop Engineering's deepest impact isn't in tools, but in the structural transformation of what developers do.

Before: understand requirements → decompose tasks → write code → debug.

After LE: understand requirements → design loop rules → define acceptance criteria → observe and tune the system.

This resembles a system architect's work more than an execution-layer engineer's. Translating requirements into precise loop goals, designing sensible quality gates, judging when the system drifts—these skills are far harder and more valuable than "writing good prompts."

So LE isn't a tool for developers to slack off; it elevates developer work to a higher abstraction layer. The barrier to entry is higher, not lower.


What Is Claude Code? How to Get Started?

Claude Code is Anthropic's AI programming tool. Unlike Copilot-style code completion, it's more like an autonomous AI engineer that can decompose tasks and execute multi-step operations: read/write files, run commands, cross-file refactoring, autonomous debugging, with native support for /loop, /workflows, sub-agents, and other Loop Engineering infrastructure.

Official subscriptions: Claude Pro at $20/month, Max plans starting at $100/month.

However, official subscriptions aren't friendly to users in China—requiring overseas credit cards and network workarounds. For a more hassle-free channel, consider Code80, which provides real subscription accounts via API; just swap the endpoint for the same official experience. Details at: https://code.ai80.vip


FAQ

Q: What's the core difference between Loop Engineering and Prompt Engineering?
A: PE is imperative—humans actively instruct AI, AI executes and returns results, human intervenes again. LE is declarative—humans design a system that automatically prompts AI, gets feedback, triggers the next round; humans only define goals and acceptance criteria. Different skill sets, not a progression, but a directional shift.

Q: What tasks suit LE?
A: Three types: tasks with clear goals and auto-verifiable results (e.g., run tests and fix failures), high-repetition tasks needing intelligent judgment (e.g., scan issues and categorize), tasks where human cost far exceeds token cost. Conversely, one-off, highly creative, or hard-to-quantify tasks are better served by regular prompting.

Q: Can regular developers use LE now?
A: Yes, but build foundations first. Claude Code's /loop and /goal commands already have LE basics. But before looping, ensure you can write reliable single-shot prompts—LE amplifies prompt problems, it doesn't mask them.

Q: What's LE's biggest risk?
A: Drift that's hard to detect and fix. Once a loop runs dozens of rounds before you realize it went wrong, investigation costs are extreme. Recommend: set explicit stop conditions early, retain intermediate results per round, insert human confirmation checkpoints at critical nodes.

Q: How can users in China access Claude Code for LE?
A: Users in China can use Code80 more conveniently, without overseas payment and network hassles.

Related Articles

分享網址
AINews·AI 新聞聚合平台
© 2026 AINews. All rights reserved.