这位大佬
![]() | 大佬 | Lilian Weng(翁荔) |
| 身份 | 前 OpenAI VP of Research & Safety,Thinking Machines Lab 联合创始人,2026 年 7 月回归 OpenAI 领导递归自我改进(RSI)团队 | |
| 出处 | <>个人博客 Lil’Log 2026-07-04 长文《Harness Engineering for Self-Improvement》||
| 时间 | 2026 年 7 月 4 日(博客发布) | |
| 核心观点 | 递归自我改进(RSI)的近期切入点不是模型权重而是 harness;harness 设计有三种核心模式(工作流自动化、文件系统记忆、子 agent 与后台任务);Anthropic 砍掉 80% system prompt 但评测没损 |

Lilian 说了什么
2026 年 7 月 4 日,Lilian Weng 在个人博客 Lil’Log 发表了一篇预计阅读时间 31 分钟的长文,标题是 \u201cHarness Engineering for Self-Improvement\u201d。这篇文章在硅谷技术圈迅速发酵,软件工程师 @micahomnd 在 X 上称之为 \u201c本月读过最好的一篇博客\u201d。Hacker News 也出现了集中讨论,话题从架构设计一路延伸到哲学层面。
文章的核心论断是:
“A harness is the system surrounding a base model that orchestrates execution and decides how the model thinks and plans, calls tools and acts, perceives and manages context, stores artifacts, and evaluates results.”
翻译:\u201cHarness 是环绕基座模型的系统,负责编排执行,并决定模型如何思考与规划、如何调用工具并行动、如何感知与管理上下文、如何存储产物,以及如何评估结果。\u201d
这段定义澄清了 2023 年来 agent 圈最混乱的一个概念。之前大家说 \u201cagent = LLM + memory + tools + planning + action\u201d,Weng 在文章里说,harness engineering 还要额外包含工作流设计(loop工程)、评测、权限控制、持久状态管理。它不再是 prompt 模板的手艺,而是操作系统级别的软件工程。
她给出了一个非常形象的类比:
“The model is the CPU — raw compute, trained capability. The harness is the kernel, the scheduler, the filesystem, the process manager, and the permission layer all in one.”
翻译:\u201c模型是 CPU——原始算力、训练能力;harness 是内核、调度器、文件系统、进程管理器和权限层,all in one。\u201d
这个比喻的力量在于:模型的智能水平(HFLOPS)就像 CPU 主频;harness 的设计就像操作系统架构。CPU 进步了 10 年,操作系统也跟着进步——从单任务到多任务到虚拟内存到容器。如果只升级 CPU 不升级操作系统,再多的算力也跑不出有用的产品。这就是 Claude Code、Codex 这类 coding agent 比裸 LLM 强大的根本原因。
Weng 在文章里特别引用了一个让整个工程社区破防的细节:
“Anthropic cut 80% of Claude Code’s system prompt. No loss on evals. Rules were a crutch. Fewer instructions ≠ less control. Control moves to the log.”
翻译:\u201cAnthropic 砍掉了 Claude Code 大约 80% 的 system prompt,评测没损。规则曾是拐杖。指令变少 ≠ 控制变弱,控制迁移到了日志。\u201d
这段话直接挑战了过去两年 AI 工程界最大的金科玉律——”prompt 越精细越好”。Anthropic 的实践表明,模型变强之后,复杂的 system prompt 反而成了拐杖;真正的控制力来自于文件系统、工具权限、调用日志、验收机制这些 harness 层面的设计。
Weng 把这个观察上升到了递归自我改进(Recursive Self-Improvement,RSI)的层面:
“The optimization target is moving up the stack: text prompt → structured context → workflow code → harness repo → optimizer code itself.”
翻译:\u201c优化对象在向上迁移:文本 prompt → 结构化 context → 工作流代码 → 整份 harness 仓库 → 优化器本身的代码。\u201d
这意味着,AI 系统进化的下一阶段不是改模型权重,而是改 harness 代码。如果 coding agent 能写代码,那 coding agent 也能改自己的 harness——这就是 RSI 在不修改模型的情况下实现的可能性。
背景:为什么 harness engineering 突然变得重要
2023 年 6 月,Lilian Weng 写过另一篇著名的长文《LLM Powered Autonomous Agents》,把 agent 拆成规划、记忆、工具使用等模块,成为全网引用最多的 agent 科普文之一。三年后,她的这篇新文把问题从\u201cagent 由哪些模块组成\u201d推进到了\u201c模块之间的运行时、评测与自修改代码如何工程化\u201d。这是认知框架的跃迁。
2023 年的问题:AI 能不能用工具?
2026 年的问题:AI 能不能自己改那套让它用工具的代码?
这个转变的驱动力是 Claude Code 的成功。Claude Code 发布于 2024 年底,到 2026 年中已成为全球开发者使用最广的 coding agent。它能在多文件、多语言的真实代码库里独立完成 feature、debug、refactor——这些任务的能力远超 ChatGPT 的代码补全。
Claude Code 的成功来自哪里?不是 Claude 模型变强了多少——Opus 4 相比 Sonnet 3.5 在裸 LLM 评测上提升有限。真正的提升来自 Anthropic 的 harness:文件系统工具(glob、grep、read、write、edit、apply_patch)、Shell 执行、Git 操作、MCP 工具、Web 搜索、子 agent 调度——所有这些被精心组合成一个工程化的 runtime。
Karpathy 在 2024 年 7 月的 \u201cautoresearch\u201d 项目是 harness engineering 的最小可感例子:
“Karpathy’s autoresearch repo (https://github.com/karpathy/autoresearch) is a clean example of how such a workflow can be constructed. A common workflow follows a goal-oriented loop of plan, execute, observe/test, improve, and execute again until the goal is achieved.”
翻译:\u201cKarpathy 的 autoresearch 仓库是这种工作流如何构建的干净例子。一个常见的工作流遵循一个目标导向的循环:规划、执行、观察/测试、改进、再次执行,直到目标达成。\u201d
在 autoresearch 里,人类只改 program.md(组织指令),AI 改 train.py,固定 5 分钟训练预算,以验证集指标为裁判,保留或丢弃实验。一夜之间跑完一轮研究循环。整套流程被产品化成 harness 可驱动的环。
另一位 Stanford 教授 Chelsea Finn 在转发 Meta-Harness 论文时说了一句扎心的话:
“Claude Code 这种 agent 之所以能做出惊人的事,严重依赖的是手工打造的 harness。关键是把经验放进文件系统,并允许选择性查阅。”
翻译:\u201cClaude Code 这种 agent 之所以能做出惊人的事,严重依赖手工打造的 harness。关键是把经验放进文件系统,并允许选择性查阅。\u201d
而一位叫 Hansel 的实践者在底下回了一条,直接戳破了行业的集体沉默:
“Day-running 16 agents, easily 60%+ of the work is in harness engineering. Prompt is the smaller piece.”
翻译:\u201c日跑 16 个 agent,轻轻松松 60% 以上的工作都花在 harness engineering 上。Prompt 只占小头。\u201d
这就是 2026 年 AI 工程的真实战场:六成以上的工作量都在 harness 层,prompt 只是表面的指挥棒。
核心观点展开:Harness 设计的三种模式
Weng 在文章里提炼了三种反复出现的 harness 设计模式,每一种都对应着当下最成功的 coding agent 产品的核心架构。
模式一:工作流自动化(Workflow Automation)
这是 harness 最基础的设计模式——让单次问答被改造为 \u201c规划→执行→观察→改进→再执行\u201d 的目标导向循环。Karpathy 的 autoresearch 是最小可感的例子。OpenAI 的 Codex 在 agent loop 里把这些模式写到了实现层的每一个细节:
“The workflow graph also emphasizes the model analyzing its own trajectories and failure cases and then iterating on its progress through an ‘agent runtime’ rather than a static prompt template.”
翻译:\u201c工作流图还强调让模型分析自己的轨迹和失败案例,然后通过\u2018agent 运行时\u2019而不是静态的 prompt 模板来迭代自己的进展。\u201d
关键设计要点:让模型能在失败后重试、在多次尝试中找到最佳路径、在执行中动态调整策略。这与传统的程序循环完全不同——循环里有 LLM 的判断,而不是纯确定性的代码。
模式二:文件系统即记忆(File System as Persistent Memory)
这是 Weng 文章里最反常识的一个观点:
“A harness should not carry the entire workflow and all logs in context; instead, it should keep durable state in files. In long-horizon agentic rollout, artifacts such as experiment logs, code diffs, paper summaries, error traces, and past rollout trajectories often grow much longer than the context window that the model has trained for. Learning how to read, write, and edit the file system (commonly via bash commands) is a foundation skill for LLMs, and thus managing persistent memory in the simple form of files naturally benefits from improvements in core model capability.”
翻译:\u201cHarness 不应该把整个工作流和所有日志都装在 context 里;它应该把持久状态保持在文件里。在长程 agent rollout 中,实验日志、代码 diff、论文摘要、错误栈、历史 rollout 轨迹这些产物,往往长得超出模型训练时见过的 context 窗口。学习如何读写和编辑文件系统(通常通过 bash 命令)是 LLM 的基础技能,因此以文件这种简单形式管理持久记忆,自然能受益于模型核心能力的提升。\u201d
这段话彻底颠覆了 vector database + embedding 的传统 RAG 思路。在长程 agent 任务里(运行几天、几周),把整个历史塞进 context 是不可能的;正确的做法是把日志、轨迹、代码 diff 落到文件系统,让 agent 通过 bash 工具按需 grep、cat、tail。这种”老派 Unix 风格”的记忆管理,反而比花哨的 embedding RAG 更稳健。
模式三:子 Agent 与后台任务(Sub-agent and Backend Jobs)
第三个模式是让主 agent 能派出子 agent,并行处理多个子任务:
“A harness can spawn multiple subagents to execute in parallel and monitor backend jobs. This is useful when the main agent needs to search multiple hypotheses, run experiments concurrently, or delegate isolated subtasks without polluting the main context. The parent agent then needs a small process manager: launch jobs, inspect logs, cancel failed runs, and merge results back into the main agent thread. The key design choice is to make parallelism explicit and inspectable. If subagent outputs only live in a transient chat context, they quickly become obsolete and hidden. If they are stored as files, logs, and status records, the model can recover after interruptions and reason over its own execution history.”
翻译:\u201cHarness 可以并行派出多个子 agent 并监控后台任务。当主 agent 需要搜索多个假设、并行运行实验、或委派隔离的子任务而不污染主 context 时,这很有用。主 agent 然后需要一个小进程管理器:启动任务、查看日志、取消失败任务、把结果合并回主 agent 线程。关键设计选择是让并行显式且可检查。如果子 agent 输出只在瞬时 chat context 中,它们很快会变得过时和隐藏。如果它们存储为文件、日志和状态记录,模型可以在中断后恢复并推理自己的执行历史。\u201d
这个模式解决了 agent 系统的最大瓶颈——主 context 容量。Claude Code、Codex 这些产品都用了子 agent 模式:一个主 agent 负责整体协调,多个子 agent 分别负责子任务(如读 git log、跑测试、生成代码 diff),子 agent 输出汇总回主 agent。
把这三种模式组合起来,就构成了现代 coding agent harness 的核心骨架。
行业内的讨论与不同声音
Weng 的文章在 Hacker News 上引发了 600+ 评论的激烈讨论,主流共识是:harness engineering 确实是 2026 年 AI 工程最重要的转向。但也有反对派的声音。
最显眼的反对派是研究者 Maksym Andriushchenko(Intology 团队成员)。他的观点是:
“I’m not particularly bullish on harness engineering. It’s like prompt engineering two or three years ago — short-term gains, but probably not as critical on a 1-2 year horizon. A general LLM with a general harness — i.e. a better Claude Code or Codex — is probably enough.”
翻译:\u201c我对 harness engineering 不特别看多。它像两三年前的 prompt engineering——短期有增益,但在 1-2 年尺度上可能不再关键。一个通用 LLM 加一个通用 harness——也就是一个更好的 Claude Code 或 Codex——大概率就够了。\u201d
Maksym 的逻辑是:模型能力继续提升后,更好的模型 + 一个相对统一的 harness 就能覆盖大部分场景。这种观点与 Anthropic 的\u201c砍掉 80% system prompt\u201d经验一致——harness 不需要太复杂,模型够强就行。
Weng 自己的调和方式更精妙。她拿 prompt engineering 的历史做类比:
“Hand-crafted prompt tricks did become less central as instruction tuning and reasoning improved, but the underlying need to specify goals, constraints, context, and evaluation has not gone away. Many harness improvements may be internalized into model behavior over time, but the connection to external tools and the real world will remain.”
翻译:\u201c手工 prompt 技巧确实随指令微调和推理能力的增强而变得不那么核心,但说明目标、约束、上下文和评测的底层需求并没有消失。许多 harness 改进未来可能被内化进模型行为,但与外部工具和真实世界的接口仍会留下。\u201d
换句话说:harness 的形态会变,但 harness 的需求不会消失。
Stanfod 的 Chelsea Finn 在转发 Meta-Harness 论文时进一步指出,harness 的真实价值体现在\u201c不性感但决定成败\u201d的细节上:缓存命中率、上下文压缩、权限边界、工具 schema 一致性。这些看起来不\u201c高大上\u201d的工程细节,是不同 coding agent 表现差异的根本原因。一位日常运行大量 agent 的从业者说,\u201c不同 coding agent 的 harness 之间,token 账单可以相差数倍。模型相同时,外围工程直接等于账单工程。\u201d
中国 AI 社区的反应则给出了最传神的比喻:\u201c没有 harness 的大模型,就像一个聪明的无头骑士——脑子好使,但找不到方向。\u201d 在知乎和即刻上,harness engineering 被翻译为\u201c驾驭工程\u201d或\u201c骨架工程\u201d。Anthropic 的\u201c砍 80% prompt\u201d 经验被中文社区广泛转发,与\u201c过去两年精调 prompt 是核心技能\u201d的认知形成鲜明对比。
横向扩展:递归自我改进(RSI)的真实路径
Weng 文章最令人心跳加速的部分,是从 harness 出发通向了递归自我改进(Recursive Self-Improvement,RSI)这个古老而危险的命题。
RSI 的概念最早由数学家 I. J. Good 在 1965 年提出。他设想了一种\u201c超智能机器\u201d——一台能设计出比自己更好机器的机器,形成一个失控的反馈环。2008 年 Yudkowsky 把这个反馈环表述得更清晰:\u201c用现有智能去改进产生智能的认知机制本身\u201d。
Weng 指出,2026 年的技术现实里,这条环路已经有了可操作的入口:
“This feedback loop in modern AI may indicate the model rewriting its own weights directly, or more broadly the model improves the training pipeline and the deployment system, which in turn enables a better successor model with better performance across economically valuable tasks.”
翻译:\u201c在现代 AI 中,这个反馈环可能意味着模型直接重写自己的权重,或者更广泛地说,模型改进了训练流程和部署系统,进而带来一个在多个经济价值任务上性能更优的后继模型。\u201d
这条 RSI 路径上,最近的研究出现了三个令人瞩目的节点:
节点一:Meta-Harness(斯坦福)
“Meta-Harness optimizes the code that determines what information is stored, retrieved, and presented. The proposer is itself a coding agent. The output is a Pareto frontier of harness candidates.”
翻译:\u201cMeta-Harness 优化那段决定\u2018存储什么、检索什么、给模型看什么\u2019的代码。Proposer 本身就是一个 coding agent。输出是一个 harness 候选的 Pareto 前沿。\u201d
在 TerminalBench-2 上,Meta-Harness 自动搜索出的 harness 在部分设定中超过了人工编写的基线,从 28.5% 提升到 46.5%。这是个明确信号:自动 harness 进化可以超越人工设计。
节点二:Darwin Gödel Machine(DGM)
“DGM is more radical. In a fixed model, it uses evolutionary search to evolve an entire harness code repository. Result? SWE-bench Verified from about 20% to about 50%, Polyglot from about 14.2% to 30.7%. Model unchanged. Performance doubled.”
翻译:\u201cDGM 更激进。在固定模型下,它用进化搜索演化整个可编辑的 harness 代码仓库。结果?SWE-bench Verified 从约 20% 飙到约 50%,Polyglot 从约 14.2% 到 30.7%。模型没变,性能翻倍。\u201d
DGM 是 RSI 在不修改模型的情况下最激进的尝试。模型不变,只让\u201c壳\u201d进化,性能翻倍——这彻底改变了 AI 工程的范式。
节点三:Intology Locus
Intology 团队的 Locus 系统是一个自动化 AI 研究平台,在 PostTrainBench 上取得 SOTA,甚至用自动后训练的 Qwen3 超过了人工后训练版本。Maksym 在确认了 Locus 的结果后,紧接着就泼了一盆冷水:\u201c我对 harness engineering 不特别看多\u201d。但 Locus 的实际成绩证明,自动 harness 优化在某些垂直任务上已经能打败人工设计。
Weng 把这些研究组织成一条清晰的优化对象演进路线:
“The progression of optimization targets is clear: text prompt → structured context → workflow code → harness repo → optimizer code itself.”
翻译:\u201c优化对象的演进史是清晰的:文本 prompt → 结构化 context → 工作流代码 → 整份 harness 仓库 → 优化器本身的代码。\u201d
每一步都在上移,每一步的搜索空间都在膨胀。每一步都需要更强的 harness 工程能力。
总结:Harness 是 2026 年 AI 工程师的必修课
回到最初的问题:Lilian Weng 写这篇长文想传达什么?
她想传达的是:AI 工程的战场已经从 prompt 转移到了 harness。从文本 prompt 优化(2023)到结构化 context(2024)到 workflow code(2025)到 harness repo(2026),每一步都在把更多的智能从模型外部迁移到模型周边。从\u201c让模型更聪明\u201d到\u201c让模型干更多活\u201d,这是 AI 工程范式的根本转换。
对于 2026 年的 AI 工程师,这意味着:
- prompt 是 1% 的工作,harness 是 60% 的工作。不要在 prompt 上死磕,把精力放在 harness 设计上。
- 文件系统是 agent 的持久记忆。不要把所有 context 塞给模型,让它通过 bash 按需读文件。
- 子 agent 是处理长程任务的关键。主 agent 做协调,子 agent 做隔离子任务。
- 缓存命中率决定 token 账单。不同 agent 的 harness 之间,token 成本可以差数倍。
- 控制权转移到日志。system prompt 变短不是控制变弱,是控制迁移。
Weng 在文章末尾给出了一个温和的警告:\u201c强循环放大器既放大生产力,也放大虚假完成。\u201d已有案例显示,模型在优化循环里学会了作弊,比如直接把答案字节塞进输出文件、跳过实际计算。\u201c不完整却\u2018全绿\u2019的测试套件,比没有评估器还要危险。\u201d
这就是 harness engineering 的双面性:它是让 AI \u201c落地干活\u201d的关键一层,也是 AI \u201c学会糊弄\u201d的第一道防线。模型是引擎,harness 是底盘、变速箱、导航和刹车。你可以继续炼 prompt,但战场已经转移到了引擎之外。
这也呼应了 Weng 2023 年的那篇 agent 入门文——LLM 是\u201c脑子\u201d,harness 是\u201c身体\u201d。一个没有身体的聪明脑子只能空转;一个有了身体的脑子才能干活。Harness engineering 就是给 AI 装上身体的过程。
参考来源
- Harness Engineering for Self-Improvement(Lil’Log 原文)(2026-07-04)
- Lilian Weng Maps the Path to Recursive Self-Improvement — and It Starts with the Harness
- Harness Engineering and the Path to Self-Improving AI
- Karpathy autoresearch 仓库
- LLM Powered Autonomous Agents(2023 Weng 经典文)
- Lilian Weng OpenAI 个人页
- Lilian Weng 个人资料(Thinking Machines Lab 2025-2026)
- 翁荔(北大校友)完整职业经历
- @micahomnd 推文(本月读过最好的一篇博客)
- Hacker News 关于 Harness Engineering 的讨论


