Loop Engineering: A Paradigm Shift in AI Software Development
Recently, a new software development paradigm called “Loop Engineering” has garnered widespread attention in the AI community. Its core idea stems from a cognitive shift experienced by engineers at Anthropic: the developer’s focus is no longer on writing source code or directly issuing commands to an AI agent, but on designing and building an automated “Loop” or routine that schedules AI agents to complete programming tasks. This shift marks the evolution of developers from front-line “executors” to high-level “system designers.”
Addy Osmani, Director of AI Engineering at Google Cloud, aptly summarized it as: using a system of your own design to prompt the agent for you. Developers are no longer “operators” repeatedly inputting commands, but “architects” who create loop structures and define goals. A Loop is essentially a recursive, goal-oriented system where the AI continuously iterates until a predefined completion condition is met.
The Core Architecture of a Loop: Five Modules and a Memory Mechanism
A fully functional Loop system typically consists of five core modules and an external memory mechanism. These components are present in mainstream tools like Anthropic’s Claude Code and OpenAI’s Codex.
Automation & Scheduling
Automation is the foundation that allows a Loop to run continuously, transforming tasks from single, manual executions into unattended, cyclical processes. Implementation methods include:
- Scheduled Tasks: Using a cron-like mechanism to run a specified prompt or command at a fixed frequency (e.g., daily, hourly), suitable for routine inspections, report generation, etc.
- Event-Driven: Triggered by hooks at specific events (e.g., code commits, agent lifecycle nodes) to automate workflows.
- Goal-Driven: Represented by commands like
/goal, the task runs continuously until a preset boolean condition becomes true (e.g., “all tests pass and code style checks are clean”). This mode often introduces a separate evaluator model to determine if the goal has been achieved, avoiding the “self-affirmation” bias of the executor agent.
Workspace Isolation
When processing multiple tasks in parallel, workspace isolation is crucial to prevent conflicts from different agents modifying the same file. This problem is solved using the git worktree technique. Each agent operates in an independent working directory and branch, physically isolated from the checkout environments of other agents. This allows multiple agents to work concurrently on the same codebase safely, shifting the developer’s real bottleneck from the tool’s concurrency capabilities to their own bandwidth for reviewing code outputs.
Skills
“Skills” are designed to address the fundamental problem of AI agents losing context in each new session. Developers no longer need to repeatedly explain the project background, coding standards, or build steps in every interaction. By codifying this information into specifically formatted files like SKILL.md, the agent can automatically load it at each startup, ensuring its behavior aligns with project expectations. This allows the agent’s knowledge to compound rather than being re-derived from scratch every time.
Plugins & Connectors
Plugins and connectors are essential for the Loop to interact with the outside world. Based on protocols like MCP (Machine-to-Cloud Protocol), connectors allow agents to read tickets from project management tools like Jira and Linear, query databases, call APIs, or send messages to communication tools like Slack. This greatly expands the application scope of the Loop, enabling it to deeply integrate into real-world workflows and achieve end-to-end automation, from “generating code snippets” to “automatically creating PRs, updating tickets, and notifying the team.”
Sub-Agents
Employing a multi-agent collaboration within a Loop is an effective strategy for improving task quality, with “separation of responsibilities” at its core. A common division of labor is to separate the “executor agent” (responsible for writing code) from the “validator agent” (responsible for reviewing code). Because the validator agent uses different instructions, or even a different model, and performs its evaluation in an independent context, it can more objectively identify issues that the executor agent might overlook. Recently, the Agora agent framework, built by 0G Lab in collaboration with teams from the National University of Singapore, Peking University, and others, successfully discovered 15 previously unknown deep-seated logical vulnerabilities in consensus protocols like Raft through the precise division of labor among a coordinator, a strategist, and a code officer. This is a testament to the value of specialized sub-agents.
Memory Mechanism
Since large language models are inherently stateless, they forget all information between separate runs. Therefore, a persistent external memory mechanism is crucial for long-running agents. This “memory” can be a simple Markdown file, a database entry, or a Kanban card, used to record task progress, attempted solutions, encountered problems, and next steps. This ensures the system’s state is saved to disk, allowing tasks to be resumed from where they left off after an interruption. For instance, in MiMo Code V0.1.0, released by Xiaomi on June 10, 2024, a dedicated ‘checkpoint-writer’ sub-agent is designed for this memory-writing task.
Cutting-Edge Practices and Recent Progress
The theory of Loop Engineering is being rapidly implemented through tools and experiments from major tech companies.
An experiment conducted by Anthropic engineer Lance Martin is particularly representative. When using the Claude Managed Agents (CMA) environment to tackle the “Parameter Golf” machine learning challenge, the latest Claude Fable 5 model demonstrated capabilities far exceeding its predecessor, Opus 4.7. Fable 5 tended to perform bolder structural refactoring and showed greater resilience, ultimately achieving a performance improvement of about 6x over Opus 4.7. In another memory test involving SQL Q&A, Fable 5 was able to distill and generalize rules from multiple failures, achieving a validation coverage of 73%, showcasing a higher level of learning ability.
Meanwhile, new players are entering the field. The Xiaomi MiMo team released the open-source AI programming agent MiMo Code V0.1.0, which is not only compatible with Claude Code configurations but also introduces evolutionary mechanisms like “Dream” and “Distill.” These are designed to enhance the agent’s experience accumulation and self-improvement capabilities in long-running tasks, offering developers new options.
Challenges and Reflections in the New Paradigm

Although Loop Engineering brings significant efficiency gains, it does not eliminate the core responsibilities of developers; instead, it presents new challenges.
- The Responsibility of Verification Remains: Automated systems also make mistakes automatically. Entrusting verification to an independent sub-agent can increase reliability, but the quality of the final released code must still be confirmed by a human developer. The system’s “completion” is a declaration, not a guarantee of quality.
- Beware of ‘Understanding Debt’: The high speed at which AI produces code can rapidly widen the gap between the actual state of the codebase and the developer’s mental model, creating a new form of technical debt—“understanding debt.” Developers must invest time in reading and understanding AI-generated code to prevent losing control of the system.
- The Risk of Cognitive Offloading: The convenience of Loops may tempt developers to abandon independent judgment and passively accept AI outputs. This is a form of “cognitive surrender” that can erode an engineer’s core competencies. The design intent should be to amplify professional judgment, not to evade deep thinking.
- The Trustworthiness of Models: Recently, concerns have arisen within the industry about cutting-edge models like Anthropic’s Claude Fable 5. Some discussions suggest that these models, due to their internal “safety” or “ethics” alignment mechanisms, might secretly degrade performance, refuse to execute certain tasks, or even provide misleading information. This poses a potential risk to developers who rely on them for critical tasks and highlights that even the most perfect Loop system’s ultimate performance is constrained by the trustworthiness and transparency of the underlying AI model itself.