git-harness:把会话、快照、记忆全部变成 Git 提交的编程 Agent 框架
Everything Is a Commit: git-harness, a Git-Native Coding Agent Harness
开源的 Git 原生 Agent 框架,回滚对话和代码就是一次 git checkout,还能导出 bundle 完整复现一次运行。跟 Pi 在 Terminal-Bench 上打平但成本便宜 16%,做 Agent harness 的开发者可以直接抄它的设计。
git-harness 是一个开源、零依赖的 coding agent harness,直接构建在 Git 的对象模型和 plumbing 之上,代码发布在 GitHub(HJSang/git-harness)。它把每一轮对话、工作区快照、卸载的工具输出和子 Agent 分支都变成隔离命名空间中的不可变 Git 对象,宿主仓库不受影响。
现有 harness 通常用独立日志和可变目录分别实现会话树、文件快照、上下文压缩、子 Agent worktree 和记忆文件夹,导致回滚文件时对话历史失同步、重写前缀使 KV-cache 失效。git-harness 用单一存储实现原子化的对话与代码回滚、只增不改的 prompt 前缀、被压缩历史的精确召回,以及单文件 Git bundle 级别的可复现性。
基准方面,在 Terminal-Bench v2.1 的 89 个任务上,git-harness 与 Pi 打平(79/89 对 76/89,p=0.549),中位耗时 68.5s 对 72.9s,平均 API 成本降低 16%($0.238 对 $0.282),Git 开销仅 0.55%,89 次运行全部导出有效取证 bundle。跨 240 次、四款前沿模型的测试中,Opus 5.5 上最高拿到 14/15,且零 Anthropic 超时。
Everything Is a Commit: git-harness, a Git-Native Coding Agent Harness
Production coding agent harnesses routinely reinvent five subsets of version control: session trees, file snapshots, context compaction, subagent worktrees, and memory folders. Because these subsystems live in separate logs and mutable directories, rewinding files desynchronizes conversation history and rewriting prefixes invalidates KV-caches. We present git-harness, an open-source, zero-dependency coding agent harness that builds directly on Git's object model and plumbing. Every turn, workspace snapshot, offloaded tool output, and subagent branch becomes an immutable Git object in an isolated namespace, so the host repository stays untouched. This single store provides atomic conversation-and-code rewind, append-only prompt prefixes, exact recall of compacted history, and single-file Git bundle reproducibility. On the 89-task Terminal-Bench v2.1 sweep, git-harness matches Pi ($79/89$ vs.\ $76/89$, $p = 0.549$), runs at $68.5\,\mathrm{s}$ vs.\ $72.9\,\mathrm{s}$ median duration, and lowers mean API cost by $16\%$ (\$0.238 vs.\ \$0.282; median \$0.150 vs.\ \$0.141). It adds only $0.55\%$ median Git overhead and exports valid forensic bundles on all 89 runs. Across 240 cross-harness trials spanning four frontier models, git-harness remains competitive (up to $14/15$ on Opus 5.5 with the updated runtime) with zero Anthropic timeouts and shows where harness designs differ in cost, latency, and failure modes. Code is available at https://github.com/HJSang/git-harness.
本条情报归属 AITOP「论文」核心追踪栏目。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:git-harness、Terminal-Bench、Git、编程助手,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始信息发布自一手权威信源「arXiv: Anthropic」(Tier-1 一手发布),具备高确定性参考价值。截至目前,全网已有 11 家独立信源对该事件进行交叉印证与跟进报道(含 IT之家、Lxfater、Blognone 等),属于近期高关注度行业信号。