The following article originally appeared on LinkedIn and is being republished here with the author’s permission.本文最初发布于 LinkedIn,经作者许可在此转载。
We’re currently at the peak of the hype cycle. On June 7, Peter Steinberger posted that you shouldn’t be prompting coding agents anymore; you should be designing loops that prompt your agents. That same week, Boris Cherny of Anthropic said on stage that he doesn’t prompt Claude anymore: “I write loops; the loops do the work.” Addy Osmani published an essay called “Loop Engineering” on June 7, swyx published “Loopcraft: The Art of Stacking Loops” on June 12, and LangChain published “The Art of Loop Engineering” on June 16. Then came the AI Engineer World’s Fair, where the word dominated the main stage. Swyx’s keynote was about Loopcraft, an entire track was devoted to software factories, speaker after speaker reached for the same word, and the conference closed on July 2 with an hour-long debate about whether the hype behind loops has outrun what works in practice.我们目前正处于炒作周期的顶峰。6月7日,Peter Steinberger 发文称,你不应该再通过提示词(prompting)来指挥编程智能体了,而应该设计能够指挥智能体的“循环”(loops)。同一周,Anthropic 的 Boris Cherny 在台上表示,他不再编写 Claude 的提示词了:“我编写循环,由循环来完成工作。” 6月7日,Addy Osmani 发表了题为《循环工程》(Loop Engineering)的文章;6月12日,swyx 发表了《循环工艺:循环堆叠的艺术》(Loopcraft: The Art of Stacking Loops);6月16日,LangChain 发布了《循环工程的艺术》(The Art of Loop Engineering)。随后,AI 工程师世界博览会(AI Engineer World’s Fair)召开,该词成为了主会场的焦点。Swyx 的主旨演讲围绕“循环工艺”展开,整个分会场专门讨论“软件工厂”,演讲者们一个接一个地使用同一个词。7月2日,会议在关于“循环背后的炒作是否已超前于实际应用效果”的长达一小时的辩论中闭幕。
The problem is that the people talking about loops aren’t all discussing the same thing. I counted at least four distinct architectures hiding behind that one word. So this post is an attempt to map out what everyone means.问题在于,谈论“循环”的人们并非在讨论同一件事。我发现这个词背后隐藏着至少四种截然不同的架构。因此,本文旨在梳理清楚大家所指的究竟是什么。
The execution loop: The agent’s own act-observe cycle执行循环(The execution loop):智能体自身的“行动-观察”周期
This is the loop most people picture when they say “agent”: call a tool, read the result, decide the next action, and repeat until there are no more tool calls to make. It’s what Addy calls the inner execution loop, the part agents can now run largely on their own, and it’s the innermost loop you can engineer. (swyx’s stack has a token loop, but nobody designs the token loop. It’s just part of the model.)这正是大多数人在提到“智能体”时脑海中浮现的循环:调用工具、读取结果、决定下一步行动,不断重复,直到没有工具需要调用为止。这就是 Addy 所说的“内部执行循环”,是智能体目前可以在很大程度上自主运行的部分,也是你能进行工程化处理的最内层循环。(swyx 的堆栈中有一个 token 循环,但没人会去设计 token 循环,它只是模型的一部分。)

The execution loop iterates on steps within one task. It ends on environment feedback: the test output, the API response, and the file contents. Humans are usually absent mid-loop and appear at the boundaries, approving plans or reviewing results. The execution loop also ends whenever the agent decides it’s done, whether or not it actually is. The first fix the field found for that was to wrap this loop in another one that doesn’t take the agent’s word for it.执行循环在单个任务的步骤中进行迭代。它以环境反馈作为结束标志:测试输出、API 响应和文件内容。人类通常不会介入循环中间,只出现在边界处,负责批准计划或审查结果。当智能体认为任务完成时,执行循环也会结束,无论它是否真的完成了。该领域发现的第一个修复方案,就是将这个循环包裹在另一个循环中,不再轻信智能体的“一面之词”。
The task loop: Restart the agent until the spec is satisfied任务循环(The task loop):重启智能体直到满足规范
This was the first loop to get a name and it’s Geoffrey Huntley’s Ralph loop, which got name-checked from the AI Engineer World’s Fair main stage when Allie Howe of Keycard introduced the software factories track by citing Geoffrey’s article “Everything Is a Ralph Loop.” A Ralph loop restarts a coding agent against the same specification over and over, allocating a completely fresh context window every iteration and doing exactly one task per loop. The apparent waste is the point: Refeeding the full spec each time prevents the context rot and compaction events that quietly degrade long-running sessions.这是第一个获得命名的循环,即 Geoffrey Huntley 的“Ralph 循环”。在 AI 工程师世界博览会上,Keycard 的 Allie Howe 在介绍软件工厂分会场时引用了 Geoffrey 的文章《一切皆是 Ralph 循环》(Everything Is a Ralph Loop),从而让这个概念声名大噪。Ralph 循环针对同一规范反复重启编码智能体,每次迭代都分配一个全新的上下文窗口,且每个循环只执行一项任务。这种看似浪费的行为正是其意义所在:每次重新输入完整规范,可以防止上下文退化(context rot)以及长期运行的会话中悄然发生的压缩事件。
What this loop iterates on is a single artifact. What ends the loop is spec compliance and passing tests. The human writes the spec and judges doneness, and in Geoffrey’s telling the human has one more job that I’ll return to later: watching the loop, spotting failure patterns, and fixing them so they never recur. In the closing debate on the conference’s final day, he compared the role to a locomotive engineer, someone whose whole job is keeping the train on the rails. Zoom out from a single spec though, and a much bigger loop comes into view: the one that runs an entire codebase.该循环迭代的对象是单一产出物。结束循环的条件是符合规范并通过测试。人类负责编写规范并判断任务是否完成。在 Geoffrey 的描述中,人类还有一项我稍后会提到的工作:观察循环,发现失败模式,并进行修复以防止其再次发生。在会议最后一天的闭幕辩论中,他将这一角色比作火车司机,其职责就是确保火车不脱轨。然而,如果从单一规范中跳出来,一个更大的循环就会映入眼帘:运行整个代码库的循环。
The product loop: The software factory产品循环(The product loop):软件工厂
This was the loudest version at the AI Engineer World’s Fair. Tereza Tizkova of Factory defined a software factory as “the whole loop, the whole lifecycle of developing software with autonomy,” and Zach Lloyd of Warp got specific about what that lifecycle is in an interview with Latent Space: triage, specification, implementation, review, verification, shipping, and monitoring. Zach’s claim is that software engineering becomes factory engineering, and that you’ll be building the thing that builds the product. Warp is dogfooding this: The company placed its own open-sourced repo under the control of Oz, its factory platform. Zach describes the adoption path as starting with low-risk repos and ratcheting the automatic PR merge rate upward from 20 percent toward 60. Anthropic appears to be running the same experiment internally. The company says 65% of its product team’s code is now created by its internal version of Claude Tag, and Mike Krieger described his team’s use of it at the World’s Fair as delegated and proactive: not “fix this bug” but take responsibility for this part of the codebase, monitor this feedback channel, and pick up tasks on your own.这是 AI 工程师世界博览会上最响亮的声音。Factory 的 Tereza Tizkova 将软件工厂定义为“整个循环,即自主开发软件的整个生命周期”。Warp 的 Zach Lloyd 在接受 Latent Space 采访时明确了该生命周期的内容:分类、规范、实现、审查、验证、发布和监控。Zach 的观点是,软件工程正在演变为工厂工程,你将构建那个“构建产品的东西”。Warp 正在践行这一理念:该公司将其开源代码库置于其工厂平台 Oz 的控制之下。Zach 描述的采用路径是:从低风险代码库开始,将自动 PR 合并率从 20% 逐步提高到 60%。Anthropic 似乎也在内部进行同样的实验。该公司称,其产品团队 65% 的代码现在由内部版本的 Claude Tag 创建。Mike Krieger 在博览会上描述其团队的使用方式时,称其为“委托式且主动式”的:不是“修复这个 bug”,而是对代码库的这一部分负责,监控反馈渠道,并自行处理任务。
The task loop and the execution loop have defined exit conditions. The product loop iterates on a codebase and its backlog, continuously, and its closing signals come from outside the codebase entirely: new issues, production logs, user feedback, review outcomes. The human role becomes configurable. In Zach’s framing, you pick the parts of the lifecycle to automate and the points where humans get brought in, and organizations differ on questions like whether code review stays human for high-risk changes. A factory improves a product. The next loop improves the factory itself.任务循环和执行循环有明确的退出条件。产品循环则持续在代码库及其待办事项上进行迭代,其终止信号完全来自代码库之外:新的问题、生产日志、用户反馈、审查结果。人类的角色变得可配置。按照 Zach 的说法,你可以选择生命周期中需要自动化的部分以及需要人类介入的点。不同组织对于某些问题(例如高风险变更是否仍需人工审查)的看法各异。工厂改进产品,而下一个循环则改进工厂本身。
The system loop: Autoresearch系统循环(The system loop):自动研究(Autoresearch)
Roland Gavrilescu of Introspection calls this autoresearch. Here’s how he framed the concept in a Latent Space interview: The inner loop is your primary system doing user-facing work, and the outer loop studies and maintains the primary system. It iterates on prompts, harnesses, model choices, and the evals themselves. His one-liner is that the loop is the product.Introspection 的 Roland Gavrilescu 将此称为“自动研究”。他在 Latent Space 的采访中这样构思:内循环是执行面向用户工作的主系统,而外循环则用于研究和维护该主系统。它在提示词、工具链、模型选择以及评估指标本身上进行迭代。他的一句话总结是:循环即产品。
This pattern now has real existence proofs at both ends of the scale. The minimal case is Andrej Karpathy’s autoresearch from March 2026, roughly 630 lines of Python that ran 50 hypothesis-edit-evaluate experiments overnight on one GPU. The shipped case is Meta’s Brain2Qwerty v2, announced in late June, where the researchers report that agents iteratively modified the codebase to invent better decoding architectures, producing a substantial improvement in word error rate. Meta’s caveat is instructive: Final training configurations were still selected by hand. Even the flagship system loop keeps a human at the last checkpoint.这种模式在规模的两端都有了现实的验证。极简案例是 2026 年 3 月 Andrej Karpathy 的自动研究,大约 630 行 Python 代码在单块 GPU 上一夜之间运行了 50 次“假设-编辑-评估”实验。已落地的案例是 Meta 在 6 月下旬宣布的 Brain2Qwerty v2,研究人员报告称,智能体通过迭代修改代码库以发明更好的解码架构,从而在词错误率上取得了显著改善。Meta 的警示很有启发性:最终的训练配置仍由人工选择。即使是旗舰级的系统循环,在最后一个检查点依然保留了人类的参与。
What ends this loop is the most demanding signal set of the four: evals, judges, filtered product feedback, and, in Roland’s design, an explicit ask-a-human tool through which the agent accumulates tacit knowledge the way a new employee does. And that’s the top of the stack. Put the four together and the shape of the whole system becomes visible.结束这个循环的信号集是四者中最严苛的:评估指标、裁判、过滤后的产品反馈,以及在 Roland 的设计中,一种明确的“询问人类”工具——智能体通过该工具像新员工一样积累隐性知识。这就是堆栈的顶端。将这四个循环放在一起,整个系统的轮廓就清晰可见了。
The four loops side by side四种循环并列

What about Agentic MapReduce?那么“智能体 MapReduce”呢?
One famous pattern from the same week is missing from this map on purpose. Cognition’s Devin Security Swarm fans parallel bounded agents out across a repository and aggregates their findings, a shape the company calls Agentic MapReduce, and it gets called a loop. I don’t think it is one. Dispatch, gather, validate is a pipeline: Nothing feeds back into a next cycle, and a loop without feedback is just a for statement. Fan-out is a topology you can deploy inside any of the four loops, not a loop of its own.同一周内的一个著名模式被我故意排除在这张地图之外。Cognition 的 Devin Security Swarm 将并行受限的智能体分散到整个存储库中并聚合其发现,这种形状被该公司称为“智能体 MapReduce”,也被称为循环。但我认为它不是。分发、收集、验证是一个流水线:没有反馈输入到下一个周期,而没有反馈的循环只是一个 for 语句。扇出(Fan-out)是一种可以部署在上述四种循环中的拓扑结构,而不是一个独立的循环。
The unnamed loop at the top is the oversight loop顶端那个未命名的循环是“监督循环”
In swyx’s loop diagram, the outermost ring, the one above the loop that makes loops, is literally labeled “???? loop.” Its verbs are “set goals, allocate, cull.” Its exit condition is listed as none.在 swyx 的循环图中,最外层的环,即位于“循环的循环”之上的那一层,被直白地标记为“???? 循环”。它的动词是“设定目标、分配、剔除”。其退出条件被列为“无”。
I think that loop has a name. I’m calling it the oversight loop: It’s where goals get set, budgets get allocated, and work gets culled, and it’s the one ring where a human should live. Addy said on the AIEWF stage: “That inner loop is capability. The outer loop is agency.” Agency is exactly what the oversight loop holds.我认为这个循环有一个名字。我称之为“监督循环”(oversight loop):在这里设定目标、分配预算、剔除工作,这是人类应该存在的唯一环。Addy 在 AIEWF 的舞台上说:“内循环是能力,外循环是代理权(agency)。” 代理权正是监督循环所持有的核心。

And the sharpest disagreements at AIEWF were all, once you translate them, arguments about who runs that top ring. Zach and Roland make the case for turning the dial up: pick your checkpoints deliberately, ratchet autonomy as trust accumulates, and, in Roland’s memorable distinction, build orchestras before factories, where an orchestra is a system that keeps a human conductor. The other camp says the dial has a stop. Geoffrey Litt of Notion called factories a depressing vision on X and argued, in a talk he has since published as an essay, that those who delegate understanding get replaced by the agent. Paul Bakaus put it as flatly as it can be put: “There is no auto, and there will be no auto.” His argument isn’t only about quality; it’s about ownership. People need purpose, and they want a role in what they create.AIEWF 上最激烈的争论,归根结底都是关于谁来运行那个顶层环的争论。Zach 和 Roland 主张调高刻度:刻意选择检查点,随着信任的积累提高自主性。正如 Roland 令人难忘的区分:先构建管弦乐队,再构建工厂,其中管弦乐队是一个保留人类指挥家的系统。另一阵营则认为刻度是有上限的。Notion 的 Geoffrey Litt 在 X 上称工厂是一个令人沮丧的愿景,并在他随后发表的文章中辩称,那些将理解力委托出去的人最终会被智能体取代。Paul Bakaus 的话最为直白:“没有所谓的自动,未来也不会有。” 他的论点不仅关乎质量,更关乎所有权。人们需要目标,并希望在创造的事物中拥有角色。
The closing debate, covered in Latent Space’s conference reporting, put both positions on one stage. Dex Horthy of HumanLayer took pains to say he isn’t anti-loop, pointing out that Kubernetes is built on control loops, but deterministic ones. His worry is that enthusiasm has gotten ahead of the engineering, and his advice was to step down an abstraction level rather than up. Geoffrey took the other side and called loops inevitable. And Mike offered the most honest data point of all: Even inside Anthropic, the team running Tag reports being bottlenecked on reviews and on the human ability to conceptualize what the system is doing. The checkpoint humans kept for themselves is now the constraint.Latent Space 会议报道中涵盖的闭幕辩论将这两种立场放在了同一舞台上。HumanLayer 的 Dex Horthy 极力表示他并不反对循环,并指出 Kubernetes 就是建立在控制循环之上的,但那是确定性的循环。他担心热情超过了工程实践,他的建议是降低抽象层级而非提高。Geoffrey 则站在另一边,称循环是不可避免的。Mike 提供了最诚实的数据点:即使在 Anthropic 内部,运行 Tag 的团队也报告称,审查工作和人类理解系统行为的能力成为了瓶颈。人类为自己保留的检查点现在成了制约因素。
Autonomy is a dial that exists separately on every one of the four loops. You can run a fully autonomous execution loop inside a heavily supervised product loop. You can hand the system loop to agents while keeping goal-setting entirely human. The interesting engineering question isn’t “Which camp wins?”; it’s “What information do you need to set each dial correctly?”自主性是一个在四个循环的每一个上都独立存在的刻度。你可以在一个受到严格监督的产品循环内运行一个完全自主的执行循环。你可以将系统循环交给智能体,同时保持目标设定完全由人类掌控。有趣的工程问题不是“哪个阵营会赢?”,而是“你需要什么信息来正确设置每个刻度?”
The table above is my attempt to fill in those blanks. Every loop, including the top one, has a nameable exit condition, and the top one is you. But naming a signal isn’t the same as wiring it in. A loop without its signal doesn’t converge. It just runs until something external stops it. Knowing whether your loops are actually closing, at production scale, means sweeping traces and clustering failures continuously instead of spot-checking transcripts, which is exactly the job Arize AX was built to do.上表是我试图填补这些空白的尝试。每一个循环,包括最顶层的那个,都有一个可命名的退出条件,而顶层的那个退出条件就是你。但命名一个信号并不等于将其接入系统。一个没有信号输入的循环不会收敛,它只会一直运行直到被外部因素强制停止。要在生产规模下了解你的循环是否真的在闭合,意味着需要持续扫描追踪记录并聚类失败案例,而不是抽查脚本,这正是 Arize AX 所要解决的问题。
Which one are you building?你正在构建哪一个?
Now the loops have names, that’s the question to ask. The word loop is doing a lot of work this month, because this field loves nothing more than jumping on the next hot thing. But real practice underlies all four loops, and it’s the same practice in each: people are dialing up their level of abstraction and pushing human judgment further up the stack. That’s the actual lesson of loops. We get more done by climbing up the stack, and now you have a map, you know where you should climb.现在循环有了名字,这就是该问的问题了。这个月“循环”一词被用得太多,因为这个领域最喜欢追逐下一个热点。但真实的实践支撑着这四种循环,且每一种的实践都相同:人们正在提高抽象水平,并将人类判断力推向堆栈的更高层。这就是循环带来的真正启示。我们通过攀登堆栈来完成更多工作,现在你有了地图,知道该往哪里爬了。



