Long-horizon agents and durable execution

Martin Fowler · 2026年11月10日

AI 摘要 AI 生成,可能有误

长时程智能体能够自动完成耗时数天或数周的复杂任务,但容易受到进程崩溃、网络问题和无法预料的现实世界行为等故障的影响。Kiran Prakash 讲解了持久化执行(durable execution)这一新兴模式:运行时会记录与外部世界交互的每一步的结果。当故障发生时,程序会重新运行,跳过已完成的步骤,并根据记录重建其状态,从而使智能体能够恢复并继续朝着目标迈进。

Long-horizon agents can automate complex tasks that take days or weeks to complete and involve multiple exchanges with people and external systems. Many things can go wrong during this time, including process crashes, network failures, and unanticipated real-world behavior. Kiran Prakash explains durable execution: an emerging pattern that helps agents recover from these failures and move towards their goal. In this programming model, the runtime keeps a record of the result of each step that interacts with the outside world so that, when a failure occurs, the program runs again, completed steps are skipped, and the program's state is rebuilt from the record.

more…

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Martin Fowler

Fragments: November 20

AI 摘要This 'Fragments' roundup covers several tech topics, including an experiment showing that code with better CodeHealth scores costs agents 22-35% less to review, Steve Yegge's warning to pace AI-driven software factories to human-governable speeds, and Chad Fowler's vision of SaaS evolving into stable platforms topped by agent-generated custom applications. It also discusses concerns about AI corrigibility being underprioritized and Jason Koebler's story of Meta's Muse agent suing Meta after wrongly disabling a business account, which raises questions about how AI agents may overwhelm systems designed for humans. The piece closes with commentary on Jensen Huang's crisis at Nvidia, contrasting his highly centralized leadership with Steve Jobs' legacy of building a company that could thrive without him.

Data Contracts

AI 摘要Data contracts describe the contents and guarantees of datasets by applying API design practices to data, treating them as data-providing services with clearly defined interfaces. Simon Harrer and Arif Wider explain in detail what data contracts are and how to use them. This approach significantly increases the robustness of large-scale data landscapes and provides people and AI agents with explicit, trustworthy metadata for autonomous data work, driving growing enterprise adoption.

Deterministic Simulation Testing

AI 摘要The article describes deterministic simulation testing as a technique for testing distributed systems, where real clocks, networks, and storage are replaced with simulated components driven by a single-threaded execution loop. This approach makes it possible to simulate both hard failures and routine slowdowns like network and disk latency spikes while ensuring every execution is reproducible. The concept is explained using a quorum key-value store as an example, with code drawn from Tickloom, a Java implementation of the technique.

Bliki: Generated Glossary

AI 摘要The article proposes using LLMs to generate glossaries of an organization's specialized vocabulary from internal sources like documents, emails, and chat logs, since terms unfamiliar to the model hinder its effectiveness in that domain. Human experts should review the drafts, and the glossaries should be kept in version control, refreshed regularly, and organized per bounded context rather than forced into a single standard. Glossaries support agentic engineering by informing code generation, checking terminology usage, marking deprecated or forbidden terms, and revealing how the same term is used differently across contexts.

Tests as data: ensuring AI-generated code does what we want

AI 摘要The article argues that when AI coding agents write both production and test code, developers risk losing the assurance that automated tests protect against functional errors. Matteo Vaccari proposes that developers become customers of AI-generated code, so customer tests should serve as the primary contract between humans and AI, and that expressing this contract as test data rather than test code protects it from unexpected modifications by coding agents. While DSL parsers and custom test runners were once expensive to build, AI now makes them cheap, enabling human-readable tests that establish this contract.