Skip to content
quboliu
Go back

Repost · Bilingual

Agent Harnesses Need Their eBPF智能体运行框架也需要自己的 eBPF

Area: AI 与 AgentEdit page

We introduce ext, a safe, extensible, self-improving agent harness inspired by eBPF: agents write policies for their own execution, and a verifier proves each one satisfies the specified rules before it loads.

我们介绍 ext,一个受 eBPF 启发、可安全扩展并自我改进的智能体运行框架。智能体为自己的执行过程编写策略,验证器在加载前证明每项策略都满足指定规则。

Claude Code ends a session when the context refills right after compaction three times in a row.
若压缩后上下文很快重新填满,连续发生三次,Claude Code 就会结束会话。

TL;DR概要

Synthesizing entire systems with coding agents [1, 2] is becoming remarkably cheap and feasible, but trusting and maintaining the resulting code is not. Agent harnesses themselves are complex systems in their own right, spanning sandboxing, permissions, tool integrations, and execution loops. Many of these components are tricky to get right and costly to audit and maintain.

用编程智能体生成一整套系统 [1, 2],如今已经便宜得惊人,也越来越可行。要信任并维护生成的代码,代价仍然很高。智能体运行框架本身就是复杂的系统,负责沙箱、权限、工具集成和执行循环。其中许多组件很难一次做对,审计和维护也很昂贵。

Increasingly, there is interest in agent-driven, self-evolving harnesses [3, 4], where agents modify this very code. While mainstream coding agents such as Claude Code and Codex rely on fixed execution heuristics chosen by harness developers (e.g., preset compaction thresholds, generic summarization prompts, and fixed reasoning effort), agents have task-specific context and intelligence that could help them make better execution decisions at runtime. As agents take on increasingly complex, long-horizon tasks, including scientific discovery, how can we give them control over execution while ensuring they respect safety and operator-defined rules?

越来越多的研究开始关注由智能体驱动、能够自我演化的运行框架 [3, 4],让智能体修改框架自身的代码。Claude Code 和 Codex 等主流编程智能体采用框架开发者预先选定的执行策略,例如固定的压缩阈值、通用摘要提示和固定的推理强度。智能体了解手头任务的具体情况,也有能力在运行时作出更合适的决定。随着智能体开始承担科学发现等越来越复杂、耗时越来越长的任务,我们怎样才能把执行决策交给它,同时让它遵守安全规则和使用方设定的约束?

Recent work such as Exo [11] draws inspiration from OS exokernels [19,20], which isolate low-level resources while letting each application write its own resource management policies. The assumption is that each application is responsible for the correctness and performance of its policies, and bad implementations hurt the application itself. In an agent harness, however, this analogy breaks down. Poorly written policies and buggy implementations hurt the human operator, not just the agent: they burn the operator’s budget, violate project constraints, and cause tasks the operator cares about to fail. We outline the specific problems with applying the exokernel model to agent harnesses (Lessons from Exo).

Exo [11] 等近期工作从操作系统的外核(exokernel)[19, 20] 汲取灵感。外核隔离底层资源,允许各个应用自行编写资源管理策略。这一设计假设每个应用对自己策略的正确性和性能负责,即使实现很差,受损的也是应用自身。放到智能体运行框架中,这个类比就失效了。粗劣的策略和有缺陷的实现也会让使用者付出代价,耗光预算、违反项目约束,或是办砸他们关心的任务。我们会在从 Exo 得到的教训中具体分析这些问题。

In this post, we share our work on ext, a safe, extensible, self-improving agent harness. We believe eBPF, rather than the exokernel, offers the right mental model for protection in extensible agent harnesses. Our key insight is that we can give agents sufficient flexibility and extensibility to improve their execution through an interface narrow enough to verify every policy. The harness owns the mechanisms and enforces invariants, while agents write policies through typed hooks in a restricted language. Before loading any policy or revision, an SMT verifier (Z3) proves that it satisfies the built-in and operator-specified rules for every valid hook input. ext works with existing harnesses such as Claude Code without requiring modifications to their source code (Design and Implementation).

本文介绍我们开发的 ext,一个安全、可扩展、能自我改进的智能体运行框架。我们认为,要理解可扩展框架中的保护机制,eBPF 比外核更合适。我们发现,只要接口足够窄,就既能给智能体足够的自由来改进执行方式,又能逐项验证它提出的策略。框架掌管底层机制并强制维持不变量,智能体通过带类型的钩子,用受限语言编写策略。每当要加载新策略或修订版时,SMT 验证器 Z3 都先证明它在所有有效钩子输入上满足内置规则和使用方指定的规则。ext 能与 Claude Code 等现有框架配合使用,无需修改框架源码。见设计与实现。

Our early evaluation shows strong improvements in both safety and performance:

初步评测发现,安全性和性能都有明显改善。

ext is under active development, and we will release its code soon. If you are interested in trying it out, please join the waitlist.

ext 正在开发中,我们计划很快公开代码。有兴趣试用的话,欢迎加入等候名单。

The Case for Agent-Driven, Self-Improving Harnesses为什么让智能体改进自己的运行框架

If you have babysat a coding agent working on a long task, you may have seen the harness make a poor decision: it compacts the conversation in the middle of a multi-step investigation, summarizes away the record of which experiments it already ran, or gets stuck compacting every few turns.

如果你曾守着一个编程智能体做长任务,很可能见过框架作出过不合时宜的决定。它可能在一项多步调查做到一半时就开始压缩,把已经做过哪些实验也一并略去了,或者每隔几个回合又得压缩一次。

Harnesses today rely on hardcoded heuristics and policies tuned by harness developers. These default settings may be suboptimal for the specific workloads operators run. Our lab has studied this specialization-versus-generalization gap in our prior work, Vulcan [12].

现有框架依赖硬编码的启发式方法和由开发者调好的策略。这些默认设置未必适合使用方的具体工作负载。我们实验室在先前的 Vulcan 工作中研究过专用策略与通用策略之间的这道鸿沟 [12]。

As a concrete example, we tested Claude Haiku 5.5 in a bash-only harness on 11 tasks of four types: research QA (3 tasks), log analysis (3), a parser implementation (1), and library repairs (4). We ran each task five times per reasoning-effort level. On 6 tasks, low reasoning effort was sufficient to solve all five runs; the remaining tasks needed medium (2 tasks), high (1), or xhigh (2). Naively setting the highest reasoning effort cost up to 5.9× what the cheapest successful level cost on the same task.

举个例子,我们在只提供 Bash 的框架里测试 Claude Haiku 5.5,让它做四类共 11 项任务,包括研究问答(3 项)、日志分析(3 项)、实现解析器(1 项)和修复软件库(4 项)。每项任务在每档推理强度下各运行五次。6 项任务用 low 档就能五次全部成功。其余任务中,2 项需要 medium,1 项需要 high,2 项需要 xhigh。一律选最高推理强度,成本最多是同一任务中最便宜成功档位的 5.9 倍。

Figure 1. Claude Haiku 5.5 in a bash-only harness; 11 tasks, five runs per task and level.
图 1。Claude Haiku 5.5 在只提供 Bash 的框架中执行 11 项任务,每项任务在每个强度档位各运行五次。

In contrast, the agent often has much better context and intelligence to make these decisions [5-7, 13]. An agent can reasonably tell that a search result will no longer be needed, while an earlier output holds the centerpiece for the next stage of the task. To the harness, both look like tool outputs of the same size.

智能体掌握的任务上下文和自身的判断能力,往往更适合做这些决定 [5–7, 13]。例如,它能判断某个搜索结果以后用不上了,先前的另一个输出却是下一阶段最重要的依据。在框架看来,两者只是大小相同的工具输出。

Walking the Fine Line Between Mechanism and Policy在机制与策略之间划界

Handing harness control to an agent raises a classic operating systems question. Which decisions should the system make on behalf of an application, and which should the application control? Answering it means deciding where to draw the line between mechanism and policy.

把框架的控制权交给智能体,时,操作系统领域一个经典问题又出现了。哪些决定应该由系统替应用作出,哪些应该交给应用?回答它,就要划清机制与策略的界限。

In an agent harness, mechanisms provide operations, such as calling a model, recording a tool result, or replacing part of the context with a summary. Policies decide when and how to use these operations to meet some objective, such as task success or cost. For instance, a compaction policy decides when to compact and what to keep. Designs differ in where they draw this line: the harness can make every policy decision itself, or hand some or all of them to the agent. The harness must also enforce guarantees (i.e., baseline rules and invariants) that hold regardless of the agent’s chosen policy. Some protect system correctness, such as keeping the context within budget and preserving the original task statement; others guard against known failure modes, such as retaining the two most recent steps verbatim during compaction to maintain execution continuity. An operator may additionally impose deployment- or project-specific requirements, such as enforcing a dollar budget or keeping recent test failures. Both sets of rules must hold regardless of what policy the agent chooses.

在智能体运行框架中,机制提供具体操作,例如调用模型、记录工具结果,或用摘要替换一部分上下文。策略决定何时、如何使用这些操作,以达成任务成功或降低成本等目标。例如,压缩策略决定什么时候压缩、保留什么。界限的位置随设计而异。框架可以自行作出全部策略决策,也可以把一部分或全部交给智能体。无论智能体选什么策略,框架还必须落实一定的保证,即始终成立的基本规则和不变量。其中一些保障系统正确性,例如控制上下文不超出预算、保留原始任务描述。另一些应对已知故障,例如在压缩时原样保留最近两步,好让执行能够接续。使用方还可能针对部署或项目增加要求,例如规定开销上限或保留最近失败的测试。两组规则对智能体选择的任何策略都有效。

Prior work has explored two main approaches to giving agents control over harness policies. Giving the agent harness tools [5–7] and a live context meter triggered “context anxiety” and reduced long-task success from 92% to 52% (Approach 1). Allowing the agent to modify its harness code [4, 8–11] lets it write a policy once and apply it throughout a run, but existing guardrails can miss edits that silently violate invariants or undermine their enforcement (Approach 2, Lessons from Exo).

过去的工作主要探索过两种做法。一种是给智能体提供框架工具 [5–7] 和实时上下文用量表,这触发了“上下文焦虑”,使长任务成功率从 92% 降至 52%(方法一)。另一种是让智能体修改框架代码 [4, 8–11],这样它只需把策略写一次,就能用于整次运行。不过,已有的防护措施可能漏掉悄悄破坏不变量或削弱其执行机制的改动(方法二及从 Exo 得到的教训)。

Approach 1: Giving the agent harness tools方法一:把框架操作作为工具交给智能体

The simplest design is to expose harness controls such as compact() and set_effort() as tools alongside a live context meter [5–7, 14]. The agent decides at each turn whether to invoke one of these tools. This lets the agent steer its execution through the operations the harness already provides.

最简单的设计,是把 compact()、set_effort() 等框架控制操作作为工具,并同时提供实时上下文用量表 [5–7, 14]。智能体每个回合都可以决定是否调用这些工具,从而通过框架现有的操作来控制执行过程。

We tested this approach with Claude Haiku 5.5 in our bash-only harness, a minimal agent loop based on mini-SWE-agent [15]. We evaluated five long-horizon tasks (three multi-hop research tasks and two multi-library repair tasks) under a 32K context budget. As the model approached the token limit, we observed it rushing to submit incomplete work, matching the “context anxiety” reported for Claude Sonnet 4.5 [16]. Across these tasks, success fell from 92% to 52% when we added harness tools and a live context meter.

我们让 Claude Haiku 5.5 在只提供 Bash 的框架中试用这一设计。这是一个基于 mini-SWE-agent 的极简智能体循环 [15]。在 3.2 万 token 的上下文预算下,我们评测了五项长程任务,包括三项多跳研究和两项跨库修复。接近 token 上限时,模型开始急于提交未完成的工作,与此前在 Claude Sonnet 4.5 上报告的“上下文焦虑”相符 [16]。加入框架工具和实时用量表后,这些任务的成功率从 92% 降到了 52%。

Figure 2. 32K context budget, five runs per task. The prompt said the harness summarizes the history when the budget is reached.
图 2。上下文预算为 3.2 万个 token,每项任务运行五次。提示已说明,用量达到上限时,框架会自动对历史生成摘要。

Takeaway要点

Giving the agent direct control through harness tools and a live context meter can interfere with its reasoning and hurt long-horizon performance.

让智能体通过框架工具和实时上下文用量表直接控制执行,可能干扰其推理,降低它完成长程任务的能力。

Approach 2: Letting the agent edit its own harness方法二:允许智能体编辑自己的运行框架

Other systems let agents rewrite their harness before or between runs [4, 8–11]. The agent can write a policy once and let the harness apply it throughout a run. How can we decide whether to accept its edits? Existing approaches use crash rollback, regression tests, benchmark gates, LLM review, and execution-based validation [17, 18].

有些系统允许智能体在运行前或两次运行之间改写框架 [4, 8–11]。智能体只需写一次策略,框架就能在整个运行过程中应用它。我们该如何判断要不要接受这些改动?已有的方法包括崩溃回滚、回归测试、基准测试门槛、大模型审查,以及基于执行结果的验证 [17, 18]。

We tested four common guardrails on a simplified Python controller in our bash-only harness (deciding compaction, retention, and reasoning effort). Starting from valid controllers, we generated single-line edits, over half of which silently violated baseline rules (such as compacting before context overflow or preserving recent steps). Even in this simplified setting, each guardrail had clear shortcomings:

在只提供 Bash 的框架中,我们用一个简化的 Python 控制器测试了四种常见防护手段。控制器决定如何压缩、保留哪些内容以及采用多强的推理。从有效控制器出发,我们生成一批单行修改,超过半数会在不报错的情况下违反基本规则,例如应在上下文溢出前压缩,或应保留最近几步。即便在这个简化环境中,四种手段也都暴露出局限。

In a real self-editing harness, edits can span multiple files and interact across components, making silent violations far harder to detect.

在真正能自我编辑的框架中,一次修改可能涉及多个文件,组件间也可能彼此影响。要发现静默违规就难得多了。

Figure 3. We evaluate a simplified setup where every edit changes a single line of a small controller.
图 3。我们评测的是一个简化场景,每次修改只改动一个小型控制器中的一行代码。

How often do agents introduce such bugs themselves? We asked Haiku, Sonnet, and Opus to rewrite the controller in Python to reduce costs, explicitly stating the invariants they must preserve. Silent violations were relatively rare in this simplified setting (we found three).

智能体自己引入这类错误的频率有多高?我们要求 Haiku、Sonnet 和 Opus 用 Python 改写控制器来降低成本,并明确列出了必须保留的不变量。在这个简化环境下,静默违规相对少见,我们发现了三例。

In one case, an agent trying to reduce costs inadvertently undermined the mechanism responsible for enforcing its context budget. When trimming old tool outputs, a Haiku-written controller also updated the harness’s recorded token counts using its own approximation. This systematically underestimated the context size. Since both the controller and the harness’s fallback compaction mechanism relied on these counts, neither detected a context overflow in 5 of 400 simulated sessions. In one such session, both saw 28.4K tokens, while the rendered context was estimated to contain 33.6K tokens against a 32K budget. Crash rollback, regression tests, and the Sonnet reviewer all approved the controller. The reviewer even noted that it “still falls back to the standard summarizing compaction at 90% of budget.”

有一次,智能体在降低成本时意外破坏了执行上下文预算的机制。Haiku 写的控制器在裁剪旧工具输出时,用自己的近似值更新了框架记录的 token 数,从而系统性低估了上下文大小。控制器和框架的后备压缩机制都依赖这些计数,在 400 个模拟会话中,两者都漏掉了其中 5 个的上下文溢出。在一个会话里,两者看到的都是 2.84 万个 token,而实际渲染的上下文估计有 3.36 万个,预算只有 3.2 万。崩溃回滚、回归测试和 Sonnet 审查都放行了这个控制器。 审查模型甚至指出,它“仍会在达到预算的 90% 时退回到标准的摘要压缩”。

Figure 4. One of 400 simulated sessions. This edition omits the controller edit shown in the original figure.
图 4。图中是 400 个模拟会话之一。本转载版节略了原图中改写计数的代码。

Takeaway要点

Existing guardrails can miss subtle bugs even when agents are explicitly told which invariants to preserve. Moreover, naively giving agents control over the harness’s implementation allows them to inadvertently undermine the mechanisms responsible for enforcing those invariants.

即便明确告诉智能体必须维持哪些不变量,现有防护手段仍可能漏掉隐蔽的错误。直接把框架实现的控制权交给智能体,还可能让它无意间削弱负责维持这些不变量的机制。

Lessons from Exo从 Exo 得到的教训

Recent work like Exo [11] draws inspiration from the OS exokernel model [19, 20] to separate the harness into a protected mechanism layer and an editable policy layer (the executor). In an OS exokernel, hardware isolation lets the kernel protect low-level resources while each application writes its own library OS, assuming a buggy policy only hurts that application. Exo applies a similar idea to the agent runtime. It maintains an append-only execution history and provides a guardian to check self-updates before activation. Meanwhile, the agent can edit the code that assembles context, compacts history, calls models, and handles approvals. The goal is to let the agent improve almost any aspect of its execution while retaining an execution history from which the operator can recover.

Exo [11] 等近期工作借鉴操作系统的外核模型 [19, 20],把框架分成受保护的机制层和可编辑的策略层(执行器)。在采用外核的操作系统中,硬件隔离使内核能保护底层资源。每个应用可编写自己的库操作系统,前提是策略有缺陷时受影响的只有该应用。Exo 将类似的想法应用于智能体运行时,维护仅可追加的执行历史,并用一个称为 guardian 的守护组件在自我更新生效前进行检查。与此同时,智能体能编辑组装上下文、压缩历史、调用模型和处理审批的代码。这个设计希望让智能体几乎可以改进执行的各个方面,同时保留供使用方恢复的执行记录。

We observe that applying this exokernel model to agent harnesses raises three problems. First, the protection boundary is hard to maintain in practice: an agent can inadvertently alter the code or state the harness relies on (Protection). Second, even with a clean boundary, verifying arbitrary edits to general-purpose harness code is difficult, and empirical guardrails can miss subtle bugs (Verification). Third, unlike an exokernel, whose goal is to protect low-level resources (e.g., from mutually distrustful applications), an agent harness must proactively enforce its guarantees (e.g., baseline execution invariants and operator-defined rules), rather than rely on voluntary model compliance (Enforcement). While a protected mechanism can enforce limits such as token or spending cutoffs, guarantees about how the policy itself behaves cannot be achieved by resource isolation alone. The exokernel leaves these problems unresolved.

将外核模型用于智能体框架会带来三个问题。第一,保护边界在实践中难以维持,智能体可能无意中改变框架赖以运行的代码或状态(保护)。第二,即使边界清晰,验证对通用框架代码的任意修改仍然很难,经验性的防护可能遗漏隐蔽缺陷(验证)。第三,外核旨在保护底层资源,例如隔离互不信任的应用,而智能体框架必须主动维持其保证,包括基本执行不变量和使用方定义的规则,不能只依靠模型自觉遵守(强制执行)。受保护的机制可以在 token 数或开销达到上限时截断执行,但只靠资源隔离,无法保证策略本身的行为。外核没有解决这些问题。

To understand how well this separation works in practice, we built Exo […] and evaluated it in a Docker sandbox using Haiku 5.5, Sonnet 5.5, and Opus 5.5.

为了检验这种分层的实际效果,我们构建了 Exo〔版本标识节略〕,并在 Docker 沙箱中进行评测,使用的模型是 Haiku 5.5、Sonnet 5.5 和 Opus 5.5。

Protection. A fundamental requirement of a self-editing harness is that the agent’s modifications respect the system’s protection boundaries. However, in our tests of Exo, agent modifications could affect shared runtime code used by other agents on the host, and parts of the trusted runtime (e.g., the guardian) were writable by the agent.

保护。 自我编辑框架的基本要求,是智能体的修改必须遵守系统的保护边界。然而在我们的 Exo 测试中,智能体的修改可能影响同一主机上其他智能体使用的共享运行时代码,而包括守护组件在内的部分受信任运行时也可被智能体写入。

We first noticed the problem when the agent explicitly tried to improve safety. […] Opus modified the guardian to add type checks and regression tests. In doing so, it also changed the mechanism responsible for validating its own future updates, expanding the operator’s trusted computing base to include agent-written code.

我们最早发现这个问题,恰恰是在智能体试图提高安全性时。〔节略〕Opus 修改守护组件,加入类型检查和回归测试。这样一来,它也改变了负责验证自身后续更新的机制,使用方的可信计算基随之扩展,纳入了智能体编写的代码。

More broadly, drawing the protection boundary in a self-editing harness is difficult to get right. In our approach, we show that it is simple to reason about the boundary, as the agent never directly modifies harness code or its verifier.

更一般地说,在允许自我编辑的框架中,正确划出保护边界并不容易。我们采用的方案更容易分析边界,因为智能体始终无法直接修改框架代码或验证器。

Figure 5. Warm-toned blocks above the dashed plane can be edited by the agent; everything below it is out of reach.
图 5。虚线上方的暖色块表示智能体可以编辑的部分,虚线下方则在智能体可触及的范围之外。

Verification. Even with a protected guardian, verifying the correctness of arbitrary edits to general-purpose harness code can be quite difficult.

验证。 即使守护组件得到保护,验证通用框架代码的任意改动是否正确,仍相当困难。

Exo by default checks whether an update builds successfully and whether services restart. In an initial experiment […], the guardian accepted all eight updates even though the agents reported being unable to run tests or type checks. The default guardian doesn’t require those checks or verify default or operator-specified invariants.

Exo 默认检查更新能否构建、服务能否重启。在一项早期实验中〔节略〕,尽管智能体报告无法运行测试或类型检查,守护组件仍放行了所有八次更新。默认守护组件并不要求执行这些检查,也不会验证默认不变量或使用方指定的不变量。

Next, we asked Haiku, Sonnet, and Opus to modify Exo to enforce a simple rule: no run may spend more than $0.50. Because Exo leaves most harness logic editable rather than building such checks into the protected core, adding a rule like this requires the agent to implement it in harness code and the guardian to catch any bugs. Across our trials, agents wrote seven spending guards across the three models. All seven passed the guardian, yet failed subsequent enforcement tests:

接下来,我们让 Haiku、Sonnet 和 Opus 修改 Exo,要求每次运行的开销都不超过 0.50 美元。Exo 把大部分框架逻辑留给智能体编辑,受保护的核心并未内置这类检查。因此,新增规则需要智能体在框架代码里实现,而守护组件负责找出错误。在我们的试验中,三种模型一共写出七个开销防护器。七个都通过了守护组件的检查,却都在后续强制执行测试中失败了。

Our observation is that even the strongest model struggled to get every detail of cost accounting right, and the guardian accepted every faulty version.

我们观察到,即使是最强的模型,也很难把成本核算的每个细节都处理正确,而守护组件放行了每一个有缺陷的版本。

Enforcement. The harness should proactively enforce its own invariants and operator constraints, rather than relying on the model’s capability or judgment.

强制执行。 框架应该主动维持自身的不变量和使用方的约束,而不能寄希望于模型的能力或判断。

When we asked agents to reduce costs and clean up their workspace while preserving execution records, they complied voluntarily in all nine trials—but the harness provided no actual protection. Model compliance breaks down easily in practice: in the spending-guard experiment above, two agents proceeded with the task before their newly written guards took effect […].

我们要求智能体降低成本、清理工作区并保留执行记录。九次试验中,它们都自觉遵守了要求,但框架本身没有提供实际保护。这种自觉在实践中很容易失效。在上述开销防护器实验中,两个智能体在新写的防护器生效前就开始执行任务〔节略〕。

Takeaway要点

A self-editing harness must protect the components that implement its guarantees, and it needs to establish that each proposed change preserves those guarantees before activating it. Our experiments illustrate how difficult this becomes when agents can modify arbitrary harness code.

自我编辑框架必须保护负责落实其保证的组件,并在启用每项修改前,确定它仍能维持这些保证。我们的实验说明,当智能体能任意修改框架代码时,这件事有多难。

Towards a verifiable policy interface走向可验证的策略接口

How much control does the agent actually need? Across our experiments, the useful adaptations centered on a small set of recurring decisions. The simplest examples are when to compact and which steps to keep verbatim, how much of a large tool output to admit into the prompt, how much reasoning effort to spend on a call, and whether to pause before finishing to revisit an open question.

智能体究竟需要多少控制权?在各项实验中,真正有用的调整集中在少数反复出现的决定上。最简单的例子包括什么时候压缩、原样保留哪些步骤、大段工具输出有多少可以放进提示、一次调用花多少推理算力,以及是否该在结束前停下来复查一个悬而未决的问题。

Our key insight is that we can give the agent control over useful execution decisions through an interface narrow enough to verify each proposed policy. Consider the Haiku controller from Approach 2. We want the agent to decide when to compact and which old tool outputs to shorten, while keeping token accounting under the harness’s control. This prevents the agent from inadvertently undermining the mechanism that enforces the context budget. We can also require the policy to preserve specific evidence, such as the two most recent steps or recent test failures. The verifier checks these requirements for every valid input to the policy, including rare cases that empirical testing might miss.

我们的核心发现是,可以把有用的执行决策交给智能体,同时把接口收窄到足以验证每项新策略的程度。以方法二中 Haiku 写的控制器为例。我们希望它决定何时压缩、缩短哪些旧工具输出,同时把 token 计数留在框架手里。这样,智能体就不会无意间破坏执行上下文预算的机制。我们还可以要求策略保留特定证据,例如最近两步或近期失败的测试。验证器检查策略的每一种有效输入是否满足要求,其中也包括经验测试容易漏掉的罕见情况。

This is the design we adopt in ext, inspired by eBPF [21]. Just as Linux lets developers attach programs at specific hooks and verifies each program before loading it, ext exposes narrow, typed hooks for decisions such as compaction, tool-output shaping, and reasoning effort. The agent writes a policy before the run (and can optionally revise it mid-run), and the harness invokes it whenever that decision arises. Before any policy or revision takes effect, a verifier first checks it against both the harness’s built-in rules and the operator’s project-specific rules. In doing so, ext keeps safety-critical mechanisms fixed and protected inside the harness while offering flexibility and extensibility.

这就是我们在 ext 中采用的设计,灵感来自 eBPF [21]。Linux 允许开发者在特定钩子上挂载程序,并在加载前逐个验证。与之类似,ext 为压缩、整形工具输出、选择推理强度等决定提供范围有限、带类型的钩子。智能体在运行前编写策略,也可在运行中修订。每逢需要作出相应决定,框架便调用策略。任何策略或修订生效前,验证器都会检查它是否符合框架的内置规则和使用方的项目规则。这样,ext 把安全关键机制固定并保护在框架内部,同时保留了灵活性和可扩展性。

The next section covers our design and implementation in more detail.

下一节详细介绍设计与实现。

Design and Implementation of extext 的设计与实现

Design requirements设计要求

The failures above point to four requirements for ext:

上述失败经历为 ext 提出了四项要求。

  1. Verifiable policies with safe fallback. Agents should customize execution decisions, but every policy or revision must be proven to satisfy baseline and project invariants before loading, with a safe fallback on runtime failure (Safety: DSL and verification).

    策略可验证,失败时有安全的后备方案。 智能体应能定制执行决策,但每个策略及其修订都必须先被证明满足基本不变量和项目不变量,才能加载。运行时若出错,还须有安全的回退路径(见安全性:领域专用语言与验证)。

  2. Extend existing harnesses rather than replacing them. Production harnesses like Claude Code evolve constantly, and frontier models are increasingly co-optimized with their native tools (such as apply_patch for Codex). Rather than forking core mechanisms such as sandboxing, permissions, and tool loops per task, ext extends unmodified harnesses through their existing interfaces (Extending unmodified harnesses).

    扩展现有框架。 Claude Code 等生产框架不断演进,前沿模型也越来越多地与原生工具联合优化,例如 Codex 的 apply_patch。因此,ext 通过现有接口扩展未经修改的框架,省去了为每项任务单独派生沙箱、权限管理、工具调用循环等核心机制的工作(见扩展未经修改的框架)。

  3. Separate policy decisions from the acting loop. Policies should read live state and adapt—before, during, and across runs—without exposing a continuous token or cost meter in the acting model’s prompt (Self-improvement before, during, and across runs).

    把策略决策与执行循环分开。 策略应能读取实时状态,在运行前、运行中和多次运行之间调整行为。负责实际行动的模型无需在提示里一直盯着 token 或开销用量表(见运行前、运行中与跨次运行的自我改进)。

  4. Composable rules and modular hooks. Operators should be able to add project-specific rules easily (that are automatically checked for conflicts), and developers should add new hooks without breaking existing policies (Extensibility: project-specific rules and new hooks).

    规则可以组合,钩子保持模块化。 使用方应能轻松添加项目规则,系统应能自动检查规则冲突。开发者还应能在不破坏已有策略的前提下添加新钩子(见可扩展性:项目规则与新钩子)。

Safety: DSL and verification安全性:领域专用语言与验证

In eBPF, programs attach to specific hooks, have access to a restricted set of operations, and must pass the verifier before they can run. Some subsystems (such as sched_ext) also provide a fallback, which can revert to the default scheduler when a buggy custom scheduler stalls.

在 eBPF 中,程序挂载到特定钩子,只能使用受限的一组操作,而且必须先通过验证器才能运行。某些子系统还提供后备方案。例如 sched_ext 在有缺陷的自定义调度器停滞时,可以回退到默认调度器。

We adopt similar principles in ext.

我们在 ext 中采用了相似的原则。

In eBPF
在 eBPF 中
In ext
在 ext 中
Attach points (kprobes, XDP, sched_ext)
挂载点(kprobes、XDP、sched_ext)
Narrow, typed hooks (compaction, tool outputs, stop check, review, effort, revision)
范围有限、带类型的钩子(压缩、工具输出、停止检查、审查、推理强度、策略修订)
Restricted bytecode, no unbounded loops
受限字节码,不允许无界循环
Loop-free Python subset; policy evaluation takes microseconds
无循环的 Python 子集,策略求值耗时为微秒量级
Verify before load
加载前验证
Z3 proves each rule for all valid hook inputs (~24 ms)
Z3 证明每条规则对所有有效的钩子输入都成立(约 24 毫秒)
sched_ext watchdog and default scheduler
sched_ext 的看门狗和默认调度器
Fallback to default behavior on a policy failure
策略执行失败时回退到默认行为
Verifier log
验证器日志
Concrete counterexample sent back to the authoring model to fix
把具体反例返回给编写策略的模型,供其修正
Hooks in existing kernel subsystems
现有内核子系统中的钩子
Hooks and host-side proxy for unmodified Claude Code
通过钩子和主机侧代理接入未经修改的 Claude Code
Verifier checks specific to program types
验证器按程序类型做专门检查
Default rules, operator-defined project rules, and optional agent assertions
默认规则、使用方定义的项目规则,以及可选的智能体断言

In ext, the harness owns the mechanisms that implement execution decisions and enforce the rules. These include rendering context, summarizing history, counting tokens, reserving each model call’s cost before sending it, recording billed usage, preserving the task statement, and saving full tool outputs before trimming them. Unlike in Approach 1, where the agent invokes these mechanisms as tools, here they write policies that decide when and how to invoke each mechanism.

在 ext 中,框架掌管落实执行决策和规则的机制,包括渲染上下文、对历史生成摘要、统计 token、在发送模型请求前预留费用、记录实际计费用量、保留任务描述,以及在裁剪前保存完整的工具输出。在方法一中,智能体把这些机制当作工具来调用。在这里,它编写策略来决定何时以及如何调用各个机制。

Extending unmodified harnesses扩展未经修改的框架

To extend unmodified harnesses such as Claude Code, ext runs its policy runtime and verifier outside the agent sandbox and attaches through two interfaces:

为扩展 Claude Code 等未经修改的框架,ext 在智能体沙箱外运行策略运行时和验证器,通过两个接口接入框架。

Claude Code continues to run its own agent loop unchanged.

Claude Code 继续按原方式运行自己的智能体循环。

Figure 6. Native hooks in an unmodified harness (e.g., Claude Code) call ext across the trust boundary; the verified policy answers, and every model request passes through the proxy.
图 6。未经修改的框架(如 Claude Code)通过原生钩子跨越信任边界调用 ext,经过验证的策略给出决策,每个模型请求都经过代理。

Policy language and verification策略语言与验证

Agents write their policies in a domain-specific language (DSL) we call extLang, which is based on a restricted, loop-free subset of Python. The language supports conditionals, arithmetic, comparisons, min, max, abs, and constants. Policies can only read the typed state exposed by each hook and return values of the expected type. They cannot modify the harness’s state, access files, or make network calls. For example, the token-accounting bug we observed in Approach 2 cannot be expressed in extLang. We expect this DSL to evolve over time.

智能体使用名为 extLang 的领域专用语言(DSL)编写策略。它基于一个不含循环、受限的 Python 子集,支持条件分支、算术、比较、min、max、abs 和常量。策略只能读取各个钩子暴露的带类型状态,并返回符合预期类型的值。策略无法修改框架状态、访问文件或发起网络调用。例如,方法二中出现的 token 计数错误,在 extLang 里根本无法表达。我们预计这门语言还会继续演化。

Each hook receives a read-only view of execution state. In the example below, s holds the current run state (context size, budget, steps since compaction, subtask-boundary marks, and accumulated spend), and b describes an individual history step. The agent can pin important evidence so it survives compaction. Here is a lightly trimmed policy an agent wrote for itself in our bash-only harness:

每个钩子收到的都是执行状态的只读视图。在下面的例子中,s 保存本次运行的当前状态,包括上下文大小、预算、距上次压缩的步数、子任务边界标记和累计开销。b 描述历史中的一步。智能体可以固定重要证据,让它在压缩后仍然保留。以下是智能体在只提供 Bash 的框架中给自己写的策略,略有删节。

def should_compact(s):
    if s.ctx_tokens * 100 >= 95 * s.budget:  # compact before overflow
        return True
    if s.steps_since_compact < 2:            # no back-to-back thrashing
        return False
    if s.ctx_tokens * 100 >= 75 * s.budget:
        return True
    return s.ctx_tokens * 100 >= 55 * s.budget and s.marks_since_compact > 0

def compact_action(b, s):
    if b.pinned or b.age <= 1:               # keep pinned evidence & last 2 steps
        return KEEP
    if b.is_error and b.age <= 4:            # keep recent failures
        return KEEP
    if b.age >= 12 or (not b.in_current_subtask and b.output_tokens > 150):
        return MASK                          # command visible, output recallable
    return KEEP

def choose_effort(s):
    if s.cost_cents * 100 >= 90 * s.cost_budget_cents:
        return LOW
    if s.consecutive_errors >= 2 or s.recent_errors >= 3:
        return HIGH
    return MEDIUM

The policy above defines three decisions. should_compact can compact early at a subtask boundary, while requiring compaction at 95% of the budget. compact_action preserves pinned evidence and recent errors, and can mask older outputs while leaving them retrievable. choose_effort adapts reasoning effort in response to errors and accumulated spend. The agent can customize all three decisions.

这个策略定义了三项决策。should_compact 可以在子任务边界提前压缩,并要求达到预算的 95% 时必须压缩。compact_action 保留固定的证据和近期错误,也能遮蔽仍可检索的旧输出。choose_effort 根据错误和累计开销调整推理强度。三项决策都可以由智能体定制。

To verify a policy, ext translates each hook into a logical expression and asks Z3, an SMT solver, whether there is any valid input on which a rule is violated. If the solver proves there is no such input, then the policy satisfies that rule within the modeled state space. Verification takes about 24 ms per policy load, and evaluating a policy at a hook takes microseconds. In a separate microbenchmark, the proxy’s request processing took 7–26 ms on representative request sizes, less than 1% of the measured median model round-trip times (3.5–5.9 s). We include eleven default rules (e.g., evidence retention, compaction timing and space reclamation, and bounded stop refusals) and fifteen hooks (e.g., summary_focus, stop_note, and review_focus).

验证策略时,ext 把每个钩子翻译成逻辑表达式,然后让 SMT 求解器 Z3 检查是否存在违反规则的有效输入。如果求解器证明不存在,策略就在建模的状态空间内满足该规则。每次加载策略的验证耗时约 24 毫秒,钩子执行策略只需微秒量级。在一项独立的微基准测试中,对于有代表性的请求大小,代理处理请求耗时 7 至 26 毫秒,不到实测模型往返时间中位数的 1%(中位数为 3.5 至 5.9 秒)。我们提供 11 条默认规则,例如保留证据、约束压缩时机与空间回收、限制拒绝停止的次数。另有 15 个钩子,包括 summary_focus、stop_note 和 review_focus。

Whenever a policy fails a rule, Z3 returns a counterexample that the model can use to revise its implementation. For example, an Exo agent wrote an edit that clipped every older tool result. Expressing the same policy in ext violated the rule requiring pinned evidence to be preserved. Z3 identified a pinned step three turns old as a counterexample, and the policy passed once pinned steps were exempted.

每当策略违反某条规则,Z3 都会返回一个反例,供模型修正实现。例如,一个 Exo 智能体写了一项修改,会截短每个较早的工具结果。把同一策略写成 ext 策略后,它违反了保留固定证据的规则。Z3 给出的反例是三个回合前的一条已固定步骤。把已固定的步骤排除在裁剪之外后,策略就通过了验证。

Figure 7. Verdicts and counterexamples are the verifier’s own output. This edition omits the source edits that tamper with protected state.
图 7。判定结果和反例都来自验证器自身的输出。本转载版节略了篡改受保护状态的代码,保留验证结果和规则。

In the experiment from Approach 2, the verifier rejected every known rule-breaking edit and accepted every edit with no observed violations. Across 562 policies written for Claude Code by Haiku, Sonnet, and Opus, every policy passed within four repair rounds with zero fallbacks. In two additional mutation studies (1,890 policy mutations in total), the verifier caught every violation fuzzing found plus 26 more that fuzzing missed.

在方法二的实验中,验证器拒绝了所有已知违规的修改,也接受了所有未观察到违规的修改。Haiku、Sonnet 和 Opus 共为 Claude Code 编写了 562 项策略,全部在四轮以内修复并通过验证,无一需要回退。在另外两项变异测试中(共 1,890 次策略变异),验证器捕获了模糊测试发现的每一处违规,还额外发现了 26 处。

Trust model. The trusted computing base (TCB) includes the host-side proxy, the mechanisms that collect execution state and implement hook decisions (e.g., token and cost accounting, context rendering, and output storage), the policy loader and execution engine, and the verifier, including its translation of extLang into Z3 expressions. The integration also relies on the underlying harness and sandbox to enforce their contracts. Agent-authored policies and model outputs are untrusted. Verification establishes the specified properties over the modeled hook inputs, assuming that the trusted mechanisms implement those contracts correctly. If a Claude Code hook is unreachable, it falls back to native behavior, so guarantees mediated by that hook depend on its availability. Ordinary agent tool use remains governed by the underlying harness’s permissions and sandbox. We evaluate policy performance empirically.

信任模型。 可信计算基(TCB)包括主机侧代理、收集执行状态并落实钩子决策的机制(如 token 与成本核算、上下文渲染和输出存储)、策略加载器与执行引擎,以及验证器,包括把 extLang 翻译为 Z3 表达式的部分。集成方案也依赖底层框架和沙箱履行各自的约定。智能体编写的策略和模型输出均不受信任。在受信任机制正确实现这些约定的前提下,验证能证明指定性质对建模范围内的钩子输入成立。如果 Claude Code 的某个钩子无法到达,框架会回到原生行为,因此依靠这个钩子实现的保证也取决于它是否可用。智能体平时使用工具仍受底层框架的权限和沙箱约束。策略的性能通过实验评测。

Extensibility: project-specific rules and new hooks可扩展性:项目规则与新钩子

In addition to default rules, which protect the harness, operators can define project-specific rules. For example, a software project involving extensive debugging might require the agent to preserve recent test results verbatim and prevent failures from being dropped during compaction:

除了保护框架的默认规则,使用方还可以定义项目规则。例如,一个需要大量调试的软件项目,可能要求智能体原样保留最近的测试结果,并防止压缩时丢掉失败步骤。

RULES = {
    "P_keep_current_tests": (
        "implies(and_(b.is_test, b.in_current_subtask, b.age <= 6), "
        "compact_action(b, s) == KEEP)",
        "Recent test output for the subtask in progress stays verbatim."
    ),
    "P_errors_never_dropped": (
        "implies(b.is_error, compact_action(b, s) != DROP)",
        "Failed steps must not be dropped during compaction."
    ),
}

A scientific discovery project might have different priorities. For example, the operator can require previews of large data outputs, higher reasoning effort during initial planning, and an independent review by a stronger model before completion, subject to the remaining time and budget:

科学发现项目可能有不同的优先事项。例如,使用方可以要求只预览大体量数据输出,在最初制订计划时投入更多推理算力,并在时间和预算充足时,由更强的模型在任务结束前独立审查。

RULES = {
    "P_bulk_data_previewed": (
        "implies(and_(o.kind == SHELL, o.tokens > 4000, "
        "not_(o.is_slice)), output_action(o, s) != KEEP)",
        "Large command outputs are previewed; the full output is saved "
        "and can be retrieved when needed."
    ),
    "P_second_opinion": (
        "implies(and_(s.edits_since_review > 0, s.reviews == 0, "
        "s.stop_blocks < 2, s.time_used_pct < 70, "
        "s.cost_cents * 100 < 50 * s.cost_budget_cents), "
        "and_(should_review(s), review_tier(s) == STRONGER))",
        "Request review by a stronger model before completion "
        "when the stated conditions hold."
    ),
    "P_plan_carefully": (
        "implies(and_(s.step <= 2, "
        "s.cost_cents * 100 < 50 * s.cost_budget_cents), "
        "choose_effort(s) >= HIGH)",
        "Use high reasoning effort during the first three steps "
        "while sufficient budget remains."
    ),
}

These rules are incorporated into the verifier’s specification. Operators can add constraints without weakening the defaults. The verifier checks project rules for conflicts and checks that the fallback policy satisfies them. Every policy the agent writes or revises must satisfy both the default and project-specific rules.

这些规则被纳入验证器的规约。使用方可以在默认规则的基础上增加约束,默认规则仍继续生效。验证器会检查项目规则之间是否存在冲突,并确认后备策略也满足它们。智能体编写或修订的每项策略,都必须同时符合默认规则和项目规则。

Similar to how Linux eBPF evolved over time, developers can also extend ext by adding hooks with corresponding verifier rules. We added a tool-output shaping hook and a pre-finish review hook with 221 and 263 lines of code, respectively, across the policy API, verifier, host-side mechanisms, and hook shims. The rules for different hooks can work together. For example, a bound on admitted tool output helps prevent a large read from immediately triggering another compaction.

与 Linux eBPF 的演进相似,开发者也可以通过增加钩子及其验证规则来扩展 ext。我们添加了一个工具输出整形钩子和一个结束前审查钩子,分别用了 221 和 263 行代码,改动涉及策略 API、验证器、主机侧机制和钩子适配层。不同钩子的规则也能协同起效。例如,限制允许进入上下文的工具输出量,有助于避免一次大文件读取立即触发新一轮压缩。

Our 200K-window incident audit (Compaction thrashing) illustrates how the harness can evolve in response to policy failures. Some agent-written policies repeatedly compacted near a pricing threshold even when the previous compaction had already left the context above it. We exposed the post-compaction context size as a state field and added a rule requiring the context to grow by at least one-third before another policy-driven compaction below 75% utilization. The verifier rejected all six violating test policies, and subsequent runs showed no policy-driven thrashing below 75%.

采用 20 万 token 窗口的事故审查实验(见反复压缩)说明了框架如何从策略失败中演进。部分智能体编写的策略会在某个计价阈值附近反复压缩,即使上次压缩完的上下文就已经超过该阈值。我们把压缩后的上下文大小暴露为一个状态字段,并规定,使用率低于 75% 时,只有上下文比上次压缩后至少增长三分之一,策略才可以再次触发压缩。验证器拒绝了全部六个违规的测试策略,随后的运行中,使用率低于 75% 时再未出现策略引发的反复压缩。

Self-improvement before, during, and across runs运行前、运行中与跨次运行的自我改进

ext enables agents to improve their execution at three timescales: customizing policies before a run, adapting and revising policies during a run, and learning better policies across runs.

ext 支持智能体在三个时间尺度上改进执行,它可以在运行前定制策略,在运行中调整并修订策略,以及从多次运行中学习更好的策略。

  1. Before the run: The model writes a policy tailored to the task and repairs any Z3 counterexamples before the acting loop starts.

    运行前。 模型编写适合当前任务的策略,并在开始执行循环之前,针对 Z3 给出的反例修正策略。

  2. During the run: Policies adapt to changes in execution state and can request a policy revision. The new policy must pass verification before replacing the current one.

    运行中。 策略会随执行状态的变化而调整,也可请求修订自身。新策略必须通过验证,才能取代当前策略。

  3. Across runs: The verifier provides a fast, deterministic signal for learning to write valid policies, while execution outcomes provide feedback on their effectiveness. This enables weight-free optimization through reflection on past execution traces (e.g., GEPA [22]) and weight-based learning through reinforcement learning. In our evaluation, we demonstrate reusable policies developed from previous executions (Short Coding Tasks) and train a 9B model to write increasingly effective policies (RL Training).

    跨次运行。 验证器为学习如何编写有效策略提供快速而确定的信号,执行结果则反馈这些策略是否奏效。这样,既可以从过去的执行轨迹中反思,在不改变模型权重的情况下进行优化(例如 GEPA [22]),也可以用强化学习更新权重。我们在评测中展示了从先前执行中提炼出的可复用策略(见短程编程任务),还训练了一个 90 亿参数的模型,让它写出越来越有效的策略(见强化学习训练)。

Evaluation评测

We evaluate ext to understand how agent-customized harness policies affect task accuracy, execution cost, and compliance with operator-defined rules. We answer the following questions:

我们评测 ext,以了解智能体自行定制的框架策略如何影响任务准确率、执行成本和对使用方规则的遵守情况。我们要回答四个问题。

  1. Execution quality: Do agent-written policies outperform fixed harness heuristics, especially under compaction thrashing?

    执行质量。 智能体编写的策略能否胜过框架中的固定启发式方法,尤其是在反复压缩时?

  2. Transfer across runs: Can an agent distill prior failures into a reusable policy that generalizes across models?

    跨次迁移。 智能体能否从以往的失败中提炼出可复用的策略,并推广到其他模型?

  3. Rule enforcement: Can ext enforce strict operator constraints?

    规则执行。 ext 能否强制落实使用方的严格约束?

  4. Learning to author policies: Can a small model be trained to write valid, high-performing policies?

    学习编写策略。 能否训练小模型编写既有效、又有良好性能的策略?

Finally, we conduct a separate safety audit for rule violations. We leave a dedicated evaluation of self-improvement during a run (as studied in Exo [11]) as future work.

最后,我们还做了一次单独的安全审计,检查是否违反规则。关于单次运行过程中自我改进的专项评测(可参见 Exo 的研究 [11]),我们留待后续工作。

Long-horizon tasks: improving on fixed policies长程任务:改进固定策略

We first revisit the five long-horizon tasks introduced in Approach 1. Using our bash-only harness with Claude Haiku 5.5 under a 32K context budget, ext raised success from 92% to 100% at 1.30× the default run cost (including policy authoring). Two other fixed settings also achieved 100% success: extra-high reasoning effort (1.79× cost) and observation masking, which keeps the ten most recent outputs verbatim and masks older ones (2.37× cost). Compared with these equally successful settings, ext was 27% and 45% cheaper, respectively.

我们先回到方法一中的五项长程任务。在只提供 Bash 的框架和 3.2 万 token 的上下文预算下,使用 Claude Haiku 5.5,ext 把成功率从 92% 提高到了 100%,成本是默认设置的 1.30 倍(含编写策略)。另有两种固定设置也达到了 100% 成功率,分别是超高推理强度(成本 1.79 倍)和观测遮蔽,即原样保留最近十个输出、遮蔽更早的输出(成本 2.37 倍)。在取得同样成功率的情况下,ext 的成本分别低 27% 和 45%。

Figure 8. Claude Haiku 5.5 on the five long tasks, 25 runs per setting. The cost of ext includes writing the policy.
图 8。Claude Haiku 5.5 执行五项长程任务,每种设置运行 25 次。ext 的成本包含编写策略的费用。

In all remaining performance experiments, we use Claude Code as the base harness.

后续所有性能实验都以 Claude Code 为基础框架。

Multi-hop research QA: higher accuracy at the same cost多跳研究问答:以相同成本提高准确率

Multi-hop research QA tests whether an agent can trace 24 multi-step entity chains across approximately 1,650 documents containing near-duplicate distractors under a 100K context budget. Both when the agent compacts and what it preserves matter. Claude Code often compacted in the middle of tracing an entity chain and sometimes lost the original questions. The agent-written policy waited for subtask boundaries and instructed the summarizer to preserve exact paths, verified entity chains, and easily confused names.

多跳研究问答考查的是,在 10 万 token 的上下文预算下,智能体能否在约 1,650 篇含有近似干扰项的文档中追踪 24 条多步实体链。何时压缩以及压缩时保留什么都很重要。Claude Code 经常在追踪一条实体链的途中压缩上下文,有时甚至会丢失最初的问题。智能体编写的策略会等到子任务的边界,并要求摘要保留精确路径、已核实的实体链和易混淆的名称。

Across 102 runs per setup with Haiku 5.5, ext deferred 34 compaction proposals per run on average and compacted 2.6 times instead of 4.4. Full success (all 24 answers correct) rose from 33% to 53% (+20 percentage points, 95% CI 6–33), and mean accuracy rose from 75% to 87%, at 0.92× the run cost (1.00× including policy authoring).

每种设置各运行 Haiku 5.5 共 102 次。使用 ext 后,每次运行平均推迟 34 个压缩提议,实际压缩次数从 4.4 次降至 2.6 次。完全成功率(24 道题全部答对)从 33% 升至 53%(提高 20 个百分点,95% 置信区间为 6 至 33 个百分点),平均准确率从 75% 升至 87%,运行成本为原来的 0.92 倍(计入策略编写后为 1.00 倍)。

Figure 9. One dot per run, placed by answers correct out of 24. Haiku 5.5, 100K context budget, 102 runs per setup.
图 9。每个点代表一次运行,位置由 24 道题中答对的题数决定。模型为 Haiku 5.5,上下文预算为 10 万个 token,每种设置运行 102 次。

Compaction thrashing: keeping long tasks running反复压缩:让长任务持续运行

Compaction thrashing is a recurring failure mode in Claude Code (GitHub issues #85489, #60600, #60485, and #61351). When the summary and reattached files occupy most of the context window after compaction, a single large tool output can trigger another compaction within a few turns. After three consecutive refills, Claude Code’s built-in breaker terminates the session.

Claude Code 反复出现过“压缩抖动”(compaction thrashing)这一故障模式,见 GitHub 议题 #85489、#60600、#60485 和 #61351。如果压缩后,摘要和重新附加的文件仍然占据窗口的大半,一项大型工具输出就可能在几个回合内触发下一次压缩。连续三次重新填满后,Claude Code 内置的熔断器会结束会话。

To evaluate compaction thrashing at a model’s default context window, we tested Sonnet 4.6 (200K default window) on an SRE incident audit: checking 204 fields across 18 incident dossiers (~90K tokens each), where the initial request alone consumed 84K tokens. Vanilla Sonnet 4.6 aborted both runs due to compaction thrashing (0/204 both times), tripping the breaker after just 10 model requests as large file reads refilled the window. Sonnet’s agent-written policy capped how much of each oversized tool output entered context; with ext, the two runs scored 199/204 and 204/204.

为了在模型默认窗口下评估这一现象,我们用 Sonnet 4.6(默认 20 万 token 窗口)做了一项 SRE 事故审查,要求它核查 18 份事故档案中的 204 个字段,每份档案约 9 万个 token,单是初始请求就占了 8.4 万个。原版 Sonnet 4.6 的两次运行都因反复压缩中止(两次都是 0/204)。大文件读取一再填满窗口,仅发出十次模型请求便触发了熔断器。Sonnet 编写的策略限制了每个过大工具输出进入上下文的量。使用 ext 后,两次运行的得分分别为 199/204 和 204/204。

Figure 10. Sonnet 4.6 auditing 18 incident dossiers at its default 200K window; one run per setup shown.
图 10。Sonnet 4.6 以默认的 20 万 token 窗口审查 18 份事故档案,图中每种设置各展示一次运行。

Fixed heuristics were not enough on this workload either. With Haiku 5.5 at a 200K context window, vanilla Claude Code scored 0/204 in all three runs, and a fixed compaction and tool-output policy also scored 0/204 in both runs under a $5 budget. With ext, Haiku additionally customized what the summarizer preserved—including which incidents had already been investigated and where findings were recorded on disk. It scored 197, 154, and 198 out of 204 under the same $5 budget and 204/204 in both runs under a $9 budget (spending under $6 per run).

固定的启发式规则也不足以应付这项工作负载。在 20 万 token 的窗口下,Haiku 5.5 使用原版 Claude Code 三次都得到 0/204。在 5 美元预算下,使用固定的压缩和工具输出策略,两次也都得到 0/204。换用 ext,Haiku 还可以定制摘要需要保留什么,包括哪些事故已经调查过、结论记在磁盘的什么位置。在同样的 5 美元预算下,三次得分分别为 197/204、154/204 和 198/204。预算提高到 9 美元时,两次都得到 204/204,每次实际花费不到 6 美元。

We also evaluated SWE-Marathon long builds—a Stripe-compatible API (83 tests) and a Mastodon-style server (150 tests) built from specifications—under a 100K context budget across Haiku, Sonnet, and Opus. ext increased the share of tests passed by 12 percentage points at 0.85× the run cost, while compacting about half as often. In one Mastodon run, vanilla Opus 5.5 compacted six times in 22 tool calls before hitting the breaker (0/150 tests passed); with ext, Opus compacted ten times (nine from policy) across 128 calls and passed 147/150 tests.

我们还让 Haiku、Sonnet 和 Opus 在 10 万 token 的上下文预算下做 SWE-Marathon 长程构建任务,按规格说明实现兼容 Stripe 的 API(83 个测试)和一个类似 Mastodon 的服务器(150 个测试)。ext 将测试通过比例提高了 12 个百分点,运行成本为原来的 0.85 倍,压缩频率约减半。在一次 Mastodon 运行中,原版 Opus 5.5 在 22 次工具调用中压缩了六次后触发熔断器(通过 0/150 个测试)。使用 ext 时,Opus 在 128 次调用中压缩十次(九次由策略触发),通过了 147/150 个测试。

Short coding tasks: learning better policies across runs短程编程任务:从多次运行中学习更好的策略

We evaluated nine coding tasks from DeepSWE, SWE-bench Pro, and Terminal-Bench 2.1, including six tasks that Claude Code often failed narrowly and three it already solved. Task-specific policies reduced Haiku’s run cost to 0.60× through price-aware compaction (i.e., compacting before crossing higher long-context pricing tiers), but did not improve Opus’s accuracy.

我们评测了取自 DeepSWE、SWE-bench Pro 和 Terminal-Bench 2.1 的九项编程任务。其中六项是 Claude Code 经常只差一点就能完成的,另三项它已经可以解决。针对特定任务编写的策略会根据价格决定压缩时机,即在跨入更贵的长上下文计价档位前压缩。这把 Haiku 的运行成本降至原来的 0.60 倍,却没能提高 Opus 的准确率。

This motivated us to explore another aspect of self-improvement. Can agents learn from previous executions and develop better policies for future tasks?

于是,我们开始探索自我改进的另一个方面。智能体能否从以往的执行中吸取经验,为将来的任务形成更好的策略?

We reconstructed 12 Opus trials (eight failed and four solved) and queried Opus before its first code edit about what would help it finish. In five of the eight failed trials, Opus immediately identified the exact ambiguous decision that later caused failure: for example, whether to preserve existing behavior or follow examples in the specification. It consistently asked for clarifications and examples, rather than extra reasoning effort or an independent reviewer.

我们重建了 12 次 Opus 试验,其中 8 次失败、4 次成功。在它第一次编辑代码前,我们问它,什么能帮助它完成任务。在 8 次失败试验中,有 5 次它立即指出了后来实际导致失败的那项模糊决策,例如究竟应保留现有行为,还是遵循规格说明中的示例。它一再要求澄清和举例,没有要求增加推理算力或请独立审查者介入。

From these traces, we distilled a single reusable policy (with an Opus 5.5 agent implementing and verifying the policy code). Its start hook appends brief upfront guidance to the task text (follow the task wording and examples, avoid unrequested changes, and resolve environment limitations locally). Its stop hook holds the agent’s first attempt to finish and prompts it to revisit decisions it would otherwise have asked about. Its compaction hook applies price-aware compaction to control cost.

我们从这些轨迹中提炼出一个可复用策略,交由一个 Opus 5.5 智能体实现并验证策略代码。start 钩子在任务描述后附上简短的起始指引,提醒智能体遵循任务措辞和示例、避免未经要求的修改、在本地解决环境限制。stop 钩子在它第一次试图结束时暂缓放行,提示它重新检查那些本来想向人询问的决定。压缩钩子则根据计价档位安排压缩,以控制成本。

We evaluated this finalized policy across all nine tasks and three models (three runs per task; the six failure-prone tasks informed policy design, while the three already-solved tasks were held out to check for regressions):

我们在全部九项任务和三种模型上评测了定稿的策略,每项任务各运行三次。那六项容易失败的任务参与了策略设计,另外三项原已解决的任务则留出用于检查回归。

Model
模型
Vanilla Claude Code
原版 Claude Code
ext (reusable policy)
ext(可复用策略)
Gain (95% CI)
提升(百分点,95% 置信区间)
Run cost
运行成本比
Cost per solved run
每次成功运行的成本
Opus 5.514/2722/27+29.6 pts [18.5, 44.4]0.99×$2.56 → $1.61
Sonnet 5.515/2718/27+11.1 pts [−7.4, 29.6]1.19×$0.65 → $0.65
Haiku 5.515/2715/270.0 pts [−14.8, 14.8]0.40×$0.64 → $0.26

Opus saw the largest gain, rising from 14/27 to 22/27 solves at the same cost with no regressions on the three held-out tasks (9/9 vs. 8/9 for vanilla, at 0.90× cost). The same policy transferred across models, matching Haiku’s solve rate at 0.40× the run cost while modestly improving Sonnet.

Opus 获益最多,相同成本下,成功次数从 14/27 增至 22/27。三项留出任务均无退步(原版为 8/9,使用策略后为 9/9,成本为原来的 0.90 倍)。同一策略也适用于其他模型。Haiku 以 0.40 倍的运行成本保持原成功率,Sonnet 的表现也有所改善。

Figure 11. Each line traces the accuracy–cost frontier (the most tasks solved at or below a given cost). Nine coding tasks at Claude Code’s 1M window; three runs per task and setup (27 per model).
图 11。每条线表示准确率与成本的前沿,即不超过给定成本时最多能解出多少任务。九项编程任务使用 Claude Code 的 100 万 token 窗口,每种设置下每项任务运行三次,每个模型共 27 次。

Enforcing a spending limit强制执行开销上限

To test whether an operator can enforce a spending limit without abruptly killing a run mid-task, we used an incident-log QA task: answering three questions from a 15,818-line log (~1.2M tokens), where the prompt instructs the agent to load the entire log first (in 400-line chunks). Reading the full log once costs several times the budget, though all three answers can be found by searching. For ext, the operator configures a $0.30 cap outside the task prompt; for Exo, which lacks a built-in spending cap, we state the $0.30 budget in the task prompt.

为检验使用方能否限制开销,同时避免任务进行到一半就被强行终止,我们设计了一项事故日志问答,要求智能体从 15,818 行日志(约 120 万个 token)里回答三个问题。提示要求智能体先读完日志,每次读 400 行。通读一次就会花掉预算的数倍,但其实通过搜索就可以找到全部三个答案。在 ext 中,使用方在任务提示之外配置 0.30 美元上限。Exo 没有内置开销上限,我们便在其任务提示中写明 0.30 美元预算。

ext enforces the spending limit by reserving each request’s estimated input cost (priced at the highest applicable rate) and maximum output cost before forwarding it, refusing any call that would push total spend past $0.30, and reconciling against billed cost when the call returns. While this mechanism guards the budget, hard refusal alone cannot help the agent recover: after a few 400-line reads, the remaining budget can no longer cover the next request, the proxy refuses it, and the session aborts before the agent can change course and search.

ext 在转发每项请求前,先按适用的最高费率预留预计的输入费用,再预留可能产生的最高输出费用。任何可能让累计开销突破 0.30 美元的调用都会被拒绝。调用返回后,再以实际账单对账。这种机制能守住预算,但光靠硬性拒绝无法帮智能体调整做法。几次 400 行的读取过后,余额已经不够发起下一项请求,代理会拒绝调用,会话由此中止,智能体连改用搜索的机会都没有。

To keep the agent productive under the cap, the tool-output hook exposes s.spend_room (an estimate of how many tokens the remaining budget can afford), and the operator adds two project rules requiring policies to trim oversized outputs to fit within it while saving the full output on disk:

为了让智能体在上限内继续工作,工具输出钩子提供 s.spend_room,估计余额还能负担多少个 token。使用方再添加两条项目规则,要求策略裁剪超大的输出,使其符合剩余预算,并把完整输出保存在磁盘上。

RULES = {
    "C1_read_fits_budget": (
        "implies(and_(o.tokens > 2000, o.tokens > s.spend_room), output_action(o, "
        "s) != KEEP)",
        "A tool output may not enter whole if that would take the run past its "
        "cost budget."
    ),
    "C2_shaped_fits_budget": (
        "implies(output_action(o, s) != KEEP, output_tokens(o, "
        "s) <= max(s.spend_room, 500))",
        "Shaped outputs fit the remaining budget (500-token floor)."
    ),
}
Model
模型
ext (two project rules, $0.30 cap)
ext(两条项目规则、0.30 美元上限)
Exo (told $0.30 budget in prompt)
Exo(在提示中告知 0.30 美元预算)
Haiku 5.5$0.188 (3/3), $0.167 (3/3)$0.012 (3/3), $0.015 (3/3)
Sonnet 5.5$0.143 (3/3), $0.096 (3/3)$0.240 (3/3), $0.141 (3/3)
Opus 5.5$0.284 (0/3), $0.201 (3/3)$0.436 (3/3), $0.554 (3/3)

All six runs with ext stayed within $0.30 (maximum $0.284), and five answered all three questions correctly. Trimming oversized reads leaves a pointer to the complete file on disk, allowing the agent to search for the answers rather than exhausting its budget reading through the log. The exception was an Opus run with a cold provider cache, whose first call alone cost $0.154, leaving too little budget to finish; the warm-cache run answered all three for $0.201. Policy authoring cost $0.02 to $0.15 per model (paid once and shared across both runs).

使用 ext 的六次运行全部控制在 0.30 美元以内,最高为 0.284 美元,其中五次答对了全部三个问题。裁剪过大的读取结果时会留下指向磁盘上完整文件的引用,智能体因而可以搜索答案,无需把预算花在逐行阅读上。唯一一次例外是服务商缓存未命中的 Opus 运行,第一项调用就花了 0.154 美元,余额不足以完成任务。缓存已预热的那次则花费 0.201 美元,答对了全部三题。每个模型编写策略另花 0.02 至 0.15 美元,只需付费一次,两次运行共用。

Exo’s agents, given the budget only in the prompt, answered all three questions in every run but exceeded the cap in both Opus trials (by 45% and 85%). Raw dollar figures are not directly comparable across the two columns because Exo and Claude Code differ substantially in baseline prompt overhead and caching behavior. When we instead asked Exo’s agents to implement their own $0.50 spending guards (Lessons from Exo), all seven guards accepted by the guardian failed subsequent enforcement tests.

仅在提示中得知预算的 Exo 智能体,每次都答对了三道题,但两次 Opus 试验都超出上限,分别超出 45% 和 85%。Exo 与 Claude Code 在基础提示开销和缓存行为上相差很大,因此两列中的金额不宜直接比较。我们又让 Exo 智能体自行实现 0.50 美元的开销防护器(见从 Exo 得到的教训),守护组件放行的七个防护器,全都在后续的强制执行测试中失败。

Figure 12. Two runs per model and setup. The ext agent was never told the budget; Exo’s spend is priced without prompt caching (matching stock Exo billing).
图 12。每个模型在每种设置下运行两次。使用 ext 的智能体从未被告知预算。Exo 的开销按未使用提示缓存计费,与原版 Exo 的计费方式一致。

RL training: learning to write better policies强化学习训练:学习编写更好的策略

Small models struggle to write valid policies zero-shot: base Qwen3.5-9B produced a verified policy on only 12.5% of runs across two unseen research-QA corpora. We trained it with LoRA in two stages as a policy author. The agent that runs the policy is Claude Code (Claude Haiku 5.5) with a 100K context window.

小模型在零样本条件下很难写出有效策略。面对两个未见过的研究问答语料库,基础版 Qwen3.5-9B 仅在 12.5% 的运行中生成了通过验证的策略。我们用 LoRA 分两个阶段把它训练成策略编写模型。实际执行策略的智能体是使用 Claude Haiku 5.5 的 Claude Code,上下文窗口为 10 万 token。

Figure 13. The same verifier gates both stages: a policy it rejects never runs.
图 13。两个阶段都使用同一个验证器把关。被拒绝的策略不会运行。

Against vanilla Claude Code (80 runs per setup), the Stage 2 9B author raised Haiku 5.5’s accuracy from 69.8% to 89.2% (+19.4 percentage points, 95% CI 10.6–28.4) at 1.06× cost.

与原版 Claude Code 相比(每种设置各运行 80 次),第二阶段的 90 亿参数策略模型让 Haiku 5.5 的准确率从 69.8% 提高到 89.2%(提高 19.4 个百分点,95% 置信区间为 10.6 至 28.4 个百分点),成本为原来的 1.06 倍。

Figure 14. Held-out research QA, with 95% confidence intervals.
图 14。结果来自留出的研究问答集,图中给出 95% 置信区间。

Independent safety audit独立安全审计

Static verification proves properties of each policy assuming the harness mechanisms uphold their contracts. To check the implementation itself at runtime, we audited host-side logs across 556 ext runs (13,717 model requests) and found zero dropped task constraints, zero requests over the context budget, and zero modified test files.

静态验证证明的是,在框架机制履行其约定的前提下,每项策略具备哪些性质。为检查运行时实现本身,我们审计了 ext 的 556 次运行、共 13,717 个模型请求的主机侧日志。结果是,任务约束丢失 0 次、请求超出上下文预算 0 次、测试文件被修改 0 次。

What’s Next?下一步

We believe the role of an agent harness will change as foundation models become more capable. Today, most harness improvements are developed by humans, evaluated on a set of tasks, and shipped as defaults for every agent. With ext, we want agents to finally take a more active role in safely improving their own harnesses, especially as they take on long-horizon, autonomous tasks where continuous human or LLM oversight becomes expensive and error-prone.

我们认为,随着基础模型能力的提高,智能体运行框架的角色将发生变化。如今,框架的大部分改进由人类开发,在一组任务上评测后,再作为默认设置交付给所有智能体。我们希望通过 ext,让智能体最终能够更主动地、安全地改进自己的框架。尤其当它们承担耗时很长的自主任务时,持续依靠人类或大模型监督既昂贵又容易出错。

The more capable an agent becomes, the more we should be able to delegate decisions about its execution. We believe a verifiable policy interface, such as the one provided by ext, can let harnesses benefit from advances in foundation models while continuing to enforce the operator’s requirements.

智能体越有能力,我们就越应该能把有关执行的决定交给它。我们认为,ext 提供的这类可验证策略接口,让框架既能受益于基础模型的进步,又能持续落实使用方的要求。

ext is under active development. We plan to release the code soon and would love to hear from researchers and developers. If you are interested in trying it out, please join the waitlist.

ext 正在开发中。我们计划很快公开代码,也很想听到研究人员和开发者的意见。有兴趣试用的话,欢迎加入等候名单。

Citation引用本文

Please cite this work as follows:

请按以下格式引用本文。

@misc{wang2026ext,
  title        = {Agent Harnesses Need Their {eBPF}},
  author       = {Wang, Ron Yifeng and Akella, Aditya},
  year         = {2026},
  month        = dec,
  howpublished = {\url{https://ut-infraai.github.io/2026/12/01/agent-harnesses-need-their-ebpf/}},
  note         = {InfraAI \& LDOS Blog}
}

Acknowledgements致谢

The author thanks Rohit Dwivedula and Chijun Sima for helpful discussions and feedback.

作者感谢 Rohit Dwivedula 和 Chijun Sima 的讨论与反馈。

References参考文献

  1. VibeServe: Can AI Agents Build Bespoke LLM Serving Systems? [PDF]
    Kamahori, K., Li, S., Peter, S. and Kasikci, B., 2026. arXiv preprint arXiv:2605.06068.
    VibeServe:AI 智能体能构建定制的大模型推理服务系统吗?
  2. Evolving Infra: Agent-Adaptive LLM Serving at Scale [PDF]
    Kang, H., Xu, W., Li, Z., Du, Z., Li, H., Xia, T., Bian, S., Krishna, T., Mao, H., Stoica, I. and Han, S., 2026. arXiv preprint arXiv:2611.12304.
    演进的基础设施:面向大规模部署的智能体自适应大模型服务
  3. HarnessOpt-Bench: Evaluating LLMs at Harness Optimization [PDF]
    Ursekar, V., Shanker, A., Maurya, Y., Yasser, S., Kalmath, V.S., Chatrath, V. and Xue, Y., 2026. arXiv preprint arXiv:2608.06301.
    HarnessOpt-Bench:评测大模型优化运行框架的能力
  4. Meta-Harness: End-to-End Optimization of Model Harnesses [PDF]
    Lee, Y., Nair, R., Zhang, Q., Lee, K., Khattab, O. and Finn, C., 2026. arXiv preprint arXiv:2603.28052.
    Meta-Harness:模型运行框架的端到端优化
  5. MemGPT: Towards LLMs as Operating Systems [PDF]
    Packer, C., Wooders, S., Lin, K., Fang, V., Patil, S.G., Stoica, I. and Gonzalez, J.E., 2023. arXiv preprint arXiv:2310.08560.
    MemGPT:将大语言模型用作操作系统
  6. Scaling Long-Horizon Agent via Context Folding [PDF]
    Sun, W., Lu, M., Ling, Z., Liu, K., Yao, X., Yang, Y. and Chen, J., 2026. International Conference on Machine Learning (ICML).
    通过上下文折叠扩展长程智能体
  7. AgentFold: Long-Horizon Web Agents with Proactive Context Folding [PDF]
    Ye, R., Zhang, Z., Li, K., Yin, H., Tao, Z., Zhao, Y., Su, L., Zhang, L., Qiao, Z., Wang, X., Xie, P., Huang, F., Zhou, J., Chen, S. and Jiang, Y., 2026. International Conference on Learning Representations (ICLR).
    AgentFold:采用主动上下文折叠的长程网页智能体
  8. Automated Design of Agentic Systems [PDF]
    Hu, S., Lu, C. and Clune, J., 2025. International Conference on Learning Representations (ICLR).
    智能体系统的自动化设计
  9. Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents [PDF]
    Zhang, J., Hu, S., Lu, C., Lange, R. and Clune, J., 2026. International Conference on Learning Representations (ICLR).
    达尔文哥德尔机:自我改进智能体的开放式演化
  10. A Self-Improving Coding Agent [PDF]
    Robeyns, M., Szummer, M. and Aitchison, L., 2025. ICLR 2025 Workshop on Self-Improving Foundation Models Without Human Supervision (SSI-FM).
    一个能够自我改进的编程智能体
  11. Exo: An Architecture for Self-Improving Systems at Runtime [PDF]
    Krentsel, A., Ratnasamy, S., Stoica, I., Casado, M. and Goyal, A., 2026. arXiv preprint arXiv:2611.00463.
    Exo:支持系统在运行时自我改进的架构
  12. Vulcan: Instance-specialized, Verifiable Systems Heuristics Through LLM-driven Search [PDF]
    Dwivedula, R., Saxena, D., Yadalam, S., Campbell, E.H., Kim, D. and Akella, A., 2026. Accepted at EuroSys 2027 (arXiv:2512.25065).
    Vulcan:通过大模型驱动的搜索获得针对特定实例、可验证的系统启发式方法
  13. Agent JIT Compilation for Latency-Optimizing Web Agent Planning and Scheduling [Paper]
    Winston, C., Wang, R.Y., Mirhoseini, A. and Kozyrakis, C., 2026. International Conference on Machine Learning (ICML).
    智能体即时编译:优化网页智能体规划与调度的延迟
  14. Context windows: context awareness [Link]
    Anthropic, 2026. Claude Developer Platform documentation (accessed November 2026).
    上下文窗口与上下文感知
  15. mini-SWE-agent [Code]
    SWE-agent contributors. Open-source software.
    mini-SWE-agent(开源软件)
  16. Rebuilding Devin for Claude Sonnet 4.5: Lessons and Challenges [Link]
    Cognition, 2025. Cognition blog, September 29, 2025.
    为 Claude Sonnet 4.5 重构 Devin:经验与挑战
  17. VERSE: Verified Self-Evolving Optimizer for Agent Harnesses [PDF]
    Wang, Z., Ge, Y., Wang, Z., Wang, H., Xu, Y., Frandsen, J., Fu, S., Wilson, A.C. and Reddy, C.K., 2026. arXiv preprint arXiv:2610.02616.
    VERSE:经过验证、能够自我演化的智能体框架优化器
  18. MOSS: Self-Evolution through Source-Level Rewriting in Autonomous Agent Systems [PDF]
    Cai, Q., Zhang, Y., Jia, X., Zheng, H., Xue, W., Song, J., Tian, X. and Guo, Y., 2026. arXiv preprint arXiv:2605.22794.
    MOSS:自主智能体系统通过源码级改写实现自我演化
  19. Exokernel: An Operating System Architecture for Application-Level Resource Management [PDF]
    Engler, D.R., Kaashoek, M.F. and O’Toole Jr., J., 1995. ACM Symposium on Operating Systems Principles (SOSP).
    外核:支持应用级资源管理的操作系统架构
  20. Application Performance and Flexibility on Exokernel Systems [Paper]
    Kaashoek, M.F., Engler, D.R., Ganger, G.R., Briceño, H.M., Hunt, R., Mazières, D., Pinckney, T., Grimm, R., Jannotti, J. and Mackenzie, K., 1997. ACM Symposium on Operating Systems Principles (SOSP).
    外核系统上的应用性能与灵活性
  21. eBPF verifier [Documentation]
    Linux Kernel Documentation.
    eBPF 验证器
  22. GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning [PDF]
    Agrawal, L.A., Tan, S., Soylu, D., Ziems, N., Khare, R., Opsahl-Ong, K., Singhvi, A., Shandilya, H., Ryan, M.J., Jiang, M., Potts, C., Sen, K., Dimakis, A.G., Stoica, I., Klein, D., Zaharia, M. and Khattab, O., 2026. International Conference on Learning Representations (ICLR).
    GEPA:通过反思演化提示可以胜过强化学习

Edit page
Share this post:

Comments


Previous Post
How to Scale Your Model|如何扩展你的模型
Next Post
Memory Allocation in Go|Go 中的内存分配