研究显示更换 harness 可大幅降低 coding agent 成本
一篇挺反直觉的研究:同一个模型跑在 Claude Code 里比跑在只有 4 个工具的 Pi 里贵 2.1 倍,成功率却没差别。Codex 开 subagents 成本直接翻三倍。如果你天天跑 coding agent,这篇文章能帮你省不少账单。
一篇 arXiv 论文(arxiv.org/abs/2612.05657)比较了 8 个模型在 Claude Code、Codex 和 Pi 三个 harness 上的表现,测试覆盖 SWE-bench Lite 和 Terminal-Bench。结果发现对固定模型而言,跨 harness 的成功率几乎不变,但成本差异显著:在 Terminal-Bench 4.0 上跑 Claude Fable 5 时,Claude Code 的成本是 Pi 的 2.1 倍,成功率却没有统计上的差异。
成本差距主要来自每次调用都重复发送的 system prompt、工具定义和上下文,其中还包括模型从未使用的工具定义。Pi 只有 4 个工具,却在所有基准测试上都位于成本-成功率 Pareto 前沿。另一个数据点是:在 Codex 中开启 subagents 后,Terminal-Bench 2.0 的成本变为 3 倍,成功率没有提升。
对开发者的直接含义是:想降低 coding agent 账单,可以先考虑换更轻量的 harness 而不是换模型。工具越少、上下文越精简的 harness,在同等成功率下花费明显更低。
Keep your harnesses simple, folks. They suggest that to lower coding-agent bills, it may be worth switching harnesses while keeping the model. The team ran eight models in Claude Code, Codex, and Pi on SWE-bench Lite and Terminal-Bench. For a fixed model, success rates barely moved across harnesses. However, cost moved a lot. With Claude Fable 5 on Terminal-Bench 4.0, Claude Code cost 2.1x as much as Pi, with no statistically detectable difference in success. The bulk of that extra cost comes from the system prompt, tool definitions, and context that get re-sent on every call. That includes definitions of tools the model never uses. Pi has four tools and sat on the cost-success Pareto frontier on every benchmark. Turning on subagents in Codex tripled cost on Terminal-Bench 2.0 with no gain in success. arxiv.org/abs/2612.05657 Chat with Paper: academy.dair.ai/papers/harness…📊 44 ⚡
本条情报归属 AITOP「技巧」核心追踪栏目。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:Claude Code、Codex、SWE-bench、Terminal-Bench,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始线索采编自「elvis」(@omarsar0),经 AITOP 多维评分管线结构化提炼。