虎嗅

"Big News: AI Programming Is Changing Again! The Father of Claude Code and the Founder of Lobster Both Support a New Paradigm – Could This End the Use of Hint Words in Programming?"

原文:大人,AI编程又变天了,Claude Code之父、龙虾创始人同时力捧新范式,杀死提示词工程?

Summary of Key Points

Recently, there has been a new trend in the field of AI programming known as “Loop Engineering.” In the past, developers had to manually provide prompts for AI to write code. Now, experts suggest designing feedback-driven loop systems that allow the AI to prompt itself and work continuously. Two industry leaders—Boris Cherny, the creator of Claude Code, and Peter Steinberger, the founder of Lobster—are championing this new paradigm. However, this approach faces practical challenges such as high token costs and difficulties in debugging. Claude Code already supports Loop functionality natively and has addressed some of these technical issues.

1. Loop Engineering: From “Commanding AI” to “Letting AI Command Itself”

Simply put, the traditional method of coding involved opening an AI tool, requesting a task (e.g., “Create a user login page”), and then adjusting the output after it was generated. With Loop Engineering, you design a set of rules for the AI to follow, such as “Check the login page for bugs every hour, fix them if found, automatically test the fixes, and submit the code if the tests pass.” This way, the AI can execute these tasks in a loop without requiring manual instruction each time.

Boris Cherny explains that his work has shifted from writing prompts to designing loops that guide the AI’s actions. Peter Steinberger adds: “We shouldn’t be providing prompts to the AI; instead, we should create loop mechanisms that enable it to prompt itself.” This is like giving the AI an “autonomous work manual,” transforming it from a temporary employee into a continuous contributor.

2. Loops Are Not “Indefinite Repeats”; They Need “Brakes” and “Navigation”

Some might think that a Loop is just about repeatedly performing an action (e.g., sending emails automatically). However, an effective Loop must include a feedback loop—similar to how you assign tasks to employees, specifying goals, performance criteria, and stoppoints.

For example, in an e-commerce optimization Loop, the goal might be to increase conversion rates. The AI would perform tasks like analyzing user behavior data, adjusting page layouts, conducting A/B tests, and checking conversion rates. If the goal is not met, it would continue to optimize; if it is achieved, the process stops. In this case, the “feedback” comes from conversion rate data, the “brakes” determine when to stop, and the “navigation” ensures that the AI takes the right direction.

Garry Tan, CEO of YC, warns against turning AI into a “Foxconn-style repetitive machine” that merely repeats tasks without critical thinking. The goal is for AI to identify issues and optimize processes autonomously.

3. Practical Challenges: High Token Costs Are a Barrier for Most Developers

While the concept of Loop Engineering sounds promising, the biggest obstacle is its cost. Each iteration of a Loop involves an API call, which consumes tokens (the “fuel” for AI). For instance, running a Loop every minute would result in 480 token calls over 8 hours, which can be very expensive. Large companies like Anthropic and OpenAI have unlimited token supplies, but most developers or small teams have limited budgets. One developer commented, “A $20 subscription is simply not enough!” Peter Steinberger argues that time is more valuable than tokens, but others point out that this is a financial issue, not a technical one.

Claude Code has implemented cost-saving measures, such as requiring a minimum loop interval of 1 minute and limiting the Loop to run for no more than 3 days, with automatic cessation when the terminal is closed. However, these solutions only address the symptoms; to enable continuous AI operation, additional funding is still needed.

4. The Evolution of Claude Code: From 20 Minutes to Multiple Days of Operation

A year ago, Claude Code could only run for 20 minutes before needing to restart. Now, it can run for several days. It has overcome three key challenges:

  • Context Loss: Previous loops started from scratch, causing the AI to forget previous actions. Now, loops retain session context, allowing the AI to remember previous steps (e.g., fixed bugs).
  • Poor Planning: AI used to either try to complete everything at once or stop halfway. Now, it uses models like Opus for planning (e.g., dividing a task into steps like “home page → product page → payment page”) and Sonnet for code execution, with clear divisions of labor.
  • Inaccurate Self-Judgment: AI might mistake partial completion for success. Now, a “generator + evaluator + planner” architecture is used: the generator writes code, the evaluator uses tools (like Playwright) to test it, and the planner sets acceptance criteria before starting to write new code, ensuring consistency.

5. Practical Difficulties in Implementation: Debugging and Migration

Many developers find that implementing Loop Engineering is more complicated than expected:

  • Debugging: Debugging a Loop that has run 47 rounds can be ten times harder than debugging a single prompt, as you need to track the state of each round to identify errors.
  • Migration Costs: Teams that try Loop Engineering may find it unsuitable for their projects and must spend significant time and resources to migrate it to other tools. One developer said, “I introduced Loop to my company, but now no one wants to manage it!”
  • Lack of Foundation: Many developers struggle with basic tasks (writing reliable prompts) before attempting Loop Engineering, leading to numerous issues.

In summary, Loop Engineering represents the next phase of AI programming, enabling AI to work more autonomously. However, challenges such as cost, debugging, and implementation difficulties remain. For large companies, it’s a tool for improving efficiency; for developers, waiting for better technology and lower costs may be wise. Nevertheless, this trend is already on its way—maybe in a few months, LinkedIn will start showing resumes of “Loop Engineers.”