Table of Contents
1828 words
9 minutes
Loop Engineering: When AI Agents Can Work on Their Own, What Should Human Developers Do

1. Introduction#

In June 2026, the AI development community was flooded by one term: Loop Engineering.

The tipping point was a series of voices from key industry figures. Peter Steinberger (founder of OpenClaw) posted a single line on X that garnered over 8 million views:

“You shouldn’t be writing prompts for your coding agent anymore. You should be designing Loops that write them for you.”

Boris Cherny (head of Anthropic Claude Code) followed up:

“I don’t write prompts for Claude anymore. I have Loops running, and they decide what to do on their own. My job is writing Loops.”

He revealed that by 2026, he had stopped writing a single line of code by hand.

Then Addy Osmani (Director of Google Cloud AI, former head of Chrome engineering) published a long-form article systematically laying out the complete framework of Loop Engineering. Silicon Valley’s AI circle has since gained another keyword with the “Engineering” suffix.

This article explains Loop Engineering clearly across four dimensions: conceptual origins, core components, practical patterns, and risk warnings.


2. The Evolution of Four Engineerings#

To understand why Loop Engineering is “the next stop,” you first need to see the evolutionary path of AI development paradigms:

StageTimeCore QuestionCore CapabilityAnalogy
Prompt Engineering2023How to ask AILanguage expression, task decompositionLearning to ask questions
Context Engineering2024What to show AIInformation filtering, context organizationLearning to prepare lessons
Harness Engineering2025Where to run safelySystem design, rule-makingLearning to build the stage
Loop Engineering2026How to keep it spinningGoal definition, process designLearning to manage

This evolution has a clear throughline: the human role keeps moving upward.

  • In the Prompt Engineering era, humans manually operated every step
  • In the Context Engineering era, humans began thinking about information architecture
  • In the Harness Engineering era, humans began designing constraint systems
  • In the Loop Engineering era, humans only define goals and rules, and the system runs itself

Boris Cherny’s words capture the essence: “My job is writing Loops” doesn’t mean there’s less work — it means the leverage point for creating value has shifted.

An analogy: early factory owners operated machines themselves, then designed assembly lines, then designed automated management systems. Loop Engineering is the AI era’s “designing assembly lines” — you’re not tightening screws, you’re designing the entire assembly line.


3. The Six Components of Loop Engineering#

Addy Osmani breaks Loop Engineering into six core modules. All six are indispensable, each solving a distinct class of problems.

3.1 Automations — The “Heartbeat” of the Loop#

Automations are responsible for making the Loop start itself, rather than waiting for someone to call it. It includes two types of triggers:

Trigger TypeExampleClaude Code Equivalent
Scheduled triggerScan Open Issues every morning at 9 AM/loop, cron
Event triggerCI failure automatically starts a diagnostic LoopGit hooks, GitHub Actions
Goal-drivenSet a big goal, the Loop automatically decomposes subtasks/goal

Key design principle: Don’t let “a human remembering to start it” become a precondition of the system. A good Loop should be self-driving.

3.2 Worktrees — Isolated Runtime Environments#

When multiple Agents work in parallel, they can’t share the same file system — they’d overwrite each other’s changes.

Git’s Worktree mechanism solves this problem:

Terminal window
# Each subtask runs in an independent Worktree
git worktree add ../fix-auth-bug main
cd ../fix-auth-bug
# The Agent works in this environment without interference

The three major values of Worktrees:

  • Parallel safety: 10 Agents fixing bugs simultaneously won’t conflict
  • Rollback capability: If an Agent breaks something, just delete the Worktree without affecting the main branch
  • Reviewability: One branch per Worktree, changes isolated and independently reviewable

3.3 Skills — Persistent Project Knowledge#

If Context Engineering solves “what to show the Agent in a single session,” Skills solve “how to accumulate knowledge across sessions.”

Skills are Markdown files stored in the project that the Agent automatically loads each round. They contain:

.claude/
├── SKILL.md # Overall project conventions
├── agents/
│ ├── reviewer.md # Behavior definition of the code review Agent
│ └── fixer.md # Behavior definition of the bug fix Agent
└── skills/
├── coding-style.md # Code style conventions
├── architecture.md # System architecture conventions
└── pitfalls.md # Pitfalls encountered

Every pitfall you’ve stepped into and every convention you’ve summarized settles into a Skill, becoming the “muscle memory” of all subsequent Agents. The quality of Skills determines the quality of the Loop’s output.

3.4 Connectors — Letting Agents Access the Real World#

Based on MCP (Model Context Protocol), Agents can connect to external tools:

Agent ←→ MCP Server ←→ External Systems
├── GitHub API (read Issues, open PRs)
├── Slack (send notifications, receive commands)
├── Database (query data, validate results)
├── CI/CD (trigger builds, read logs)
└── Linear / Jira (update ticket status)

Without Connectors, an Agent is just “talking to itself in a sandbox.” With Connectors, it can truly affect the outside world — opening PRs, updating tickets, notifying the team.

3.5 Sub-agents — Maker/Checker Separation#

This is the most easily underestimated yet most important design pattern in Loop Engineering: Don’t let the same Agent both write code and review code.

// Incorrect design: one Agent produces and reviews its own work
const result = await agent("Fix this bug, then review your own fix");
// Correct design: separation of Maker and Checker
const fix = await agent("Fix this bug", { role: "maker" });
const review = await agent(`Review this fix: ${fix.diff}`, { role: "checker" });

Why separate them?

Same Agent Self-reviewingMaker/Checker Separation
Tends to “go easy on itself”Independent perspective, finds blind spots
Easily overlooks security issuesChecker is explicitly told “your job is to find problems”
Lacks adversarial verificationCan be designed as “reject by default unless proven correct”

The Checker should be prompted with “default to distrust unless proven correct,” not “default to pass unless there’s an obvious problem.” This tiny difference in the prompt determines the effectiveness of verification.

3.6 Memory / State — Beyond the Context Window#

An Agent’s context window is limited, but a continuously running Loop needs to remember what has been done and what remains to be done.

The Memory layer can be implemented very simply:

state.md
## Current Status
- Last run: 2026-06-16 09:00 UTC
- In progress: fix-login-timeout (PR #42 awaiting review)
## Completed
- [x] Fix API timeout retry logic — #41 merged
- [x] Update dependency versions — #40 merged
## Pending
- [ ] Investigate intermittent CI failures — assigned Worktree ci-flaky-test
- [ ] Upgrade Node.js to v26 — awaiting LTS

Osmani emphasizes: “Behind every successful Loop, there’s a set of quietly working state files.” State files are the Loop’s “short-term memory,” and Skills are the Loop’s “long-term memory.”


4. Complete Loop Example: A Real Workflow#

Stringing the six components together, a typical CI auto-fix Loop looks like this:

08:00 Scheduled task triggers automatically
08:01 Triage Agent scans:
- 3 CI failures last night
- 2 new Open Issues on GitHub
- 1 regression in PRs merged yesterday
08:05 Write to state file state.md
08:06 Open a separate Worktree for each issue worth handling
08:07 Worktree A — Maker Agent drafts a fix plan
Worktree B — Maker Agent drafts a fix plan
Worktree C — Maker Agent drafts a fix plan
08:15 All three fix plans are submitted to their respective branches
08:16 Checker Agent reviews the three plans against the SKILL.md spec
08:25 Plan A passes → automatically open PR
Plan B is rejected → sent back to Maker Agent for rewrite
Plan C passes → automatically open PR, update the corresponding Issue
08:30 Those that cannot be handled are marked as need-human-triage
08:31 Update the state file, record progress
08:32 Send a Slack summary to notify the team
The next day continues from the state file.

The developer doesn’t type a single character throughout. Your job is to:

  1. Ensure the rules of this Loop are reasonable
  2. Review PRs that the Checker Agent approved but you find suspicious
  3. Continuously refine the project conventions in Skills

5. Loop Maturity Model#

In his article, Osmani proposed a six-level maturity model to help teams assess what stage they are at:

LevelNameCharacteristicsHuman Involvement
L0Manual turn-by-turn promptingManually paste Prompt each time100%
L1Scripted retriesUse scripts to batch-call Agent90%
L2Scheduled LoopRuns on a schedule, only reports without automatic modifications70%
L3Stateful LoopProgress persists across sessions40%
L4Self-verifying LoopHas deterministic checks, Agent can judge whether it did things correctly25%
L5Multi-Agent collaborationMaker/Checker separation, specialized Agent division of labor15%
L6Production-grade supervisionHas safety guardrails, automatic rollback, exception escalation mechanisms10%

Most teams are currently at the L1-L2 stage. Loops above L4 already have the capability to replace junior-to-mid-level developers—which is also why JetBrains’ 2026 Q2 survey shows that global demand for junior developer positions plummeted 40% year-over-year.


6. Three Deep Pitfalls You Must Watch Out For#

Loop Engineering is not a silver bullet. Both Osmani and Cherny explicitly warned about three core risks.

6.1 Verification Is Still a Human Responsibility#

A Loop can automatically complete “declaring done,” but it cannot automatically complete “proving correct.”

“Done” is a declaration. “Did it right” is a fact. A declaration is not a fact. —Addy Osmani

A Checker Agent can reduce omissions, but it cannot replace human judgment. Security changes, architectural decisions, user experience issues—these require human confirmation.

Principle: A Loop can automatically handle problems you fully understand; for problems you do not understand, a Loop only helps you make the problem clearer, and the decision is still yours.

6.2 Comprehension Debt#

This is a key concept proposed by Osmani, more hidden and more dangerous than technical debt.

Loop's speed of generating code
>
Your speed of understanding code
=
Comprehension debt is accumulating

When a Loop produces tens of thousands of lines of code every day, while your comprehension speed is constant, comprehension debt will grow exponentially. One day, you will face a system whose workings you have no idea about.

Mitigation strategies:

  • Set an “output rate cap” for the Loop—do not let it run as fast as possible
  • Periodically stop and manually review all recent automatic changes
  • Forbid the Loop from automatically modifying core modules; allow only manual operations

6.3 Cognitive Surrender#

This is the most profound risk—when the system can run on its own, people instinctively stop thinking.

Cherny’s exact words: “The most comfortable posture is precisely the most dangerous one. When you no longer understand what the Loop is doing but the Pipeline can still run, you have already handed over the core capability of an engineer.”

Counter-strategies:

  • Regular “offline days”: One day a week without using Agents, purely handwriting, to keep your skills sharp
  • Self-questioning test: If this Loop disappeared tomorrow, could you still do what it does on your own?
  • Keep building Loops “as an engineer”: You are designing a system, not pressing the “start button”

7. One-Sentence Summary of How Different Roles Should Face Loop Engineering#

RoleWhat You Should Do
Junior developerLearn to read the Loop’s output, focus on understanding rather than piling up code
Mid-level developerDistill your experience into Skills, become the Loop’s “coach”
Senior / ArchitectDesign the Loop’s constraint boundaries and verification rules, define the standard for “done”
Technical managerRethink team structure and performance measurement; lines of code are no longer a good metric

Addy Osmani’s final paragraph is the best closing:

“Build your Loop, but build it as someone who plans to remain an engineer—don’t be the person who only knows how to press the ‘start button.‘“


8. References#

Loop Engineering: When AI Agents Can Work on Their Own, What Should Human Developers Do
https://www.hehonglei.com/posts/loop-engineering/
Author
HHLBlog
Published at
2026-06-16
License
CC BY-NC-SA 4.0