Everything Is a Commit: git-harness, a Git-Native Coding Agent Harness

Hejian Sang

TL;DR

git-harness is an open-source coding agent harness that stores every turn, workspace snapshot, offloaded tool output and subagent branch as Git objects, so conversation and code can be rewound together.

Read this as a

Why builders care

Editor's note

Session trees, snapshots, compaction, subagent worktrees and memory folders are usually built as separate systems that drift apart. On Terminal-Bench v2.1 this single Git store matched the Pi harness on tasks solved and cut mean API cost by 16%, with 0.55% median Git overhead.

How to apply it

Editor's note
  1. 1If your harness rewinds files and chat history separately, consider one store for both so a rewind cannot leave them out of sync.
  2. 2Keep prompt prefixes append-only and store compacted history in full so it can be recalled exactly, instead of rewriting prefixes that invalidate KV caches.
  3. 3Export each run as a single reproducible bundle to debug failures and compare harnesses on cost, latency and failure modes.

Code

Not found

No verified code link yet. We checked the abstract, arXiv comments and Hugging Face; if the authors release code later it will show up here.

Key results

From the abstract
  1. 1
    0.55% median Git overhead

    It adds only 0.55% median Git overhead and exports valid forensic bundles on all 89 runs.

  2. 2

    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.

  • 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.

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\,s vs.\ 72.9\,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.

Everything on this page is written from this abstract. For methods and full results, read the paper PDF.

Ask the paper

Answers come from the paper summary and abstract.

Ask anything about “Everything Is a Commit: git-harness, a Git-Native Coding Agent Harness”, or start with one of these:

Closest matches across the feed and every collection, by shared words in titles, topics and abstracts.