A Paradigm Shift in AI Programming: From ‘Prompt Engineers’ to ‘Loop Designers’
Recently, several top experts in the AI field, including Anthropic engineer and Claude Code creator Boris Cherny, and Peter Steinberger, now at OpenAI, have publicly advocated for a new AI programming paradigm called ‘Loop Engineering.’ The core idea is that developers’ future focus should shift from manually writing prompts for AI programming Agents to designing ‘loop’ systems that automatically and continuously prompt, orchestrate, and constrain these Agents. This shift is interpreted by some in the community as an evolution from ‘prompt engineer’ to ‘meta-prompt engineer,’ marking another leap in the level of abstraction in AI development.
Boris Cherny described his workflow’s evolution in a recent talk: from using code completion in his IDE, to relying entirely on prompts to drive development with Claude, to his current stage—writing loops to automate the prompting and decision-making process. Coincidentally, Peter Steinberger also explicitly stated on social media that developers should design loops to drive Agents, a statement that quickly garnered over 1.5 million views. These developments suggest that the focus of AI-assisted development may be shifting from the immediacy of human-computer interaction to building long-term, autonomous intelligent systems.
The Essence of the Loop: A Closed-Loop System with Feedback and Goals
‘Loop Engineering’ is far more than a simple cron job or mechanical repetition. Industry experts and developers widely agree that an effective loop must be a closed-loop system that includes a feedback mechanism. This means the loop must not only execute tasks but also have the ability to evaluate results, make corrections, and have clear objectives.
A robust loop system requires the following elements:
- Clear Objectives: Similar to OKRs in business management, the Agent needs clear optimization goals, such as improving application performance, fixing security vulnerabilities, or optimizing conversion rates.
- Feedback and Validation: The system needs to integrate mechanisms like tests, type checking, or real-world error analysis to allow the Agent to determine if its output is correct. Peter Steinberger mentioned using a
VISION.md file as a form of constraint and feedback mechanism.
- Clear Boundaries and Controls: To prevent the Agent from going rogue, it’s essential to provide clear context, a trusted set of tools, auditable operation logs, and safe stopping conditions. As YC CEO Garry Tan warned, we should avoid turning Agents into the digital equivalent of assembly-line workers performing repetitive labor; instead, they should be given more autonomy within well-defined boundaries.
Anthropic’s internal ‘Skill Methodology’ also provides a framework for building this high-quality context. The methodology emphasizes progressively guiding the model through structured information (including instructions, reference examples, scripts, etc.) and places special importance on accumulating and utilizing ‘Gotchas’ (common pitfalls) to enhance the Agent’s reliability.
Technical Implementation and Frontier Exploration: Anthropic’s Internal Practices
On the technical side, Claude Code already has built-in support for Loop Engineering. Its command-line tool provides /loops and Routines commands, allowing developers to create periodic tasks using natural language or commands. For example, the command /loop "Summarize new posts" --interval 30m can set up a task to run every 30 minutes. Unlike traditional script calls, Claude Code’s loops run continuously within the same session, retaining context, tool permissions, and other information, thus avoiding the ‘cold start’ problem of each call and enabling more coherent long-running task execution.
Anthropic itself is continuously iterating on its internal framework (Harness) for long-running Agents. The team has revealed that over the past year, their Agent’s capabilities have evolved from running for only about 20 minutes to being able to work continuously for several days. This progress is due to optimizations on two levels:
- Model Level: New-generation models like Opus 4.6 show significant enhancements in planning, tool use, and long-context processing capabilities.
- Framework Level: Anthropic is experimenting with a ‘Generator-Evaluator-Planner’ architecture that borrows ideas from Generative Adversarial Networks (GANs). In this architecture, the ‘Generator’ writes the code, the ‘Evaluator’ acts as a separate, more stringent critic using tools like Playwright to actually test application functionality rather than just reviewing code. Additionally, the ‘Planner’ breaks down high-level requirements and negotiates a definition of ‘done’ with the generator, forming an acceptance contract that is agreed upon before development begins.
Real-World Challenges: Cost, Complexity, and Maintenance
Despite the promising outlook for ‘Loop Engineering,’ its practical implementation faces three core challenges:
- High Token Costs: Continuously running AI Agents generate a large volume of API calls, leading to a sharp increase in costs. For individual developers or startups without the deep pockets of a large company, this represents a significant barrier. When asked about the cost issue, Peter Steinberger’s response, ’Isn’t your time valuable?' highlights the difficult trade-off between time efficiency and financial investment.

Debugging and Maintenance Complexity: Some developers have pointed out that debugging a loop state machine that has run for dozens of cycles is far more difficult than correcting a single prompt. Many developers are still figuring out how to write reliable one-off prompts, making the leap to designing and debugging loop systems a high technical hurdle.
Vendor Lock-in and Migration Costs: Experiences shared by early adopters indicate that once a loop system is deeply integrated into a project, exporting data and migrating the system becomes extremely time-consuming and laborious if problems arise or a change in technology is needed, creating a de facto vendor lock-in.
To mitigate these risks, tools like Claude Code have implemented corresponding safety measures, such as a maximum 3-day runtime for loop tasks, binding tasks to the current session (closing the terminal stops the task), and providing a global disable switch to help users control costs and prevent runaway tasks.