🤖 AI Hot

Oak: A Git Alternative Built for AI Coding Agents

A
Alex Chen

Git was designed for humans. The commit model — write a message, stage changes, commit — assumes someone is making intentional decisions about what constitutes a logical unit of work. AI coding agents don’t work that way. They make dozens of micro-changes per session, often across unrelated files, and the “right” commit boundaries are unclear even to the human reviewing the PR. Oak is a new open-source version control system that treats the agent session itself as the fundamental unit of work, and after spending a few hours with it, I think it solves real problems that anyone using Claude Code or Codex for serious work has run into.

The project just hit v0.99.0 as a public beta. It’s Apache 2.0 licensed, installs via curl or cargo, and runs on macOS, Linux, and Windows. The design decisions are worth understanding even if you don’t switch to it tomorrow, because they reveal assumptions about version control that we’ve all been living with because they made sense for humans — not because they’re the right primitives for agents.

Branches as sessions, not feature branches

The core idea in Oak is that a branch equals an agent session, not a feature. When Claude Code opens a repository and starts working on a task, Oak creates a branch for that session. Every change the agent makes during that session lives on that branch. When the session ends — either because the task is done or the agent is done trying — the branch is merged or discarded as a unit.

This is different from how most teams use Git with AI agents today. In Git, the agent typically works on a feature branch, making commits as it goes, and the human reviews the final diff. But the commits themselves are often nonsense — the agent wrote “fix: update implementation” three times in a row because that’s what its commit message generator produced. The commits don’t help with review or rollback. They’re noise.

Oak’s session-branch model eliminates that noise. There’s no per-commit granularity because there are no commits in the traditional sense. The session is the atomic unit. If you want to understand what the agent changed, you look at the session diff. If you want to undo the agent’s work, you discard the session branch. If you want to keep it, you merge it.

This sounds like a small UX change but it changes how you think about agent-assisted development. In Git, I find myself fighting the tool: the agent made twenty commits and I need to squash them, or the agent committed something that breaks bisect, or the agent’s commit messages are worthless. In Oak, those problems don’t arise because the primitives are different.

BLAKE3 and content-defined chunking

Under the hood, Oak uses BLAKE3 for content hashing instead of SHA-1 or SHA-256. BLAKE3 is significantly faster than SHA-256 — on the order of 10x on modern hardware — while providing equivalent or better collision resistance. For a version control system that’s going to be hashing every file an agent touches, probably thousands of times per session, that speed difference matters.

The data model uses Blob, Manifest, Commit, and Tree objects — conceptually similar to Git’s object model but implemented differently. Blobs represent file contents. Manifests represent directory snapshots. Commits represent points in history (but in Oak, these are session-level, not change-level). Trees organize the hierarchy.

Content-defined chunking is the feature that lets Oak handle large files efficiently. Instead of splitting files into fixed-size blocks, it splits at content boundaries — places where the data pattern changes. This means that small edits to large files only change the chunks near the edit point, not the entire file. For AI agents that might modify a single function in a 5,000-line file, this dramatically reduces the amount of data that needs to be stored and transferred.

The optional SQLite backend is another practical choice. Git stores everything as files in .git/objects, which works fine for human-scale operations but becomes a bottleneck when an agent is making hundreds of rapid changes. SQLite gives Oak indexed access to the object store, making operations like “find all blobs modified in this session” nearly instant.

Content-addressable lazy loading

The feature that most directly addresses AI agent workflows is content-addressable lazy loading. In Git, when you clone a repository, you download the entire history — every commit, every file version, every object. For a large repository, this can take minutes and consume gigabytes.

Oak doesn’t download anything until it’s needed. When an agent opens a repository, Oak fetches the current tree structure — essentially a directory listing with content hashes. Individual file contents are fetched on demand when the agent actually reads or modifies them. The repository description calls this “editing any repository in seconds,” and for large monorepos where the agent only touches a handful of files, the speedup is real.

This is exactly the access pattern that AI coding agents have. Claude Code doesn’t need the entire React codebase history to fix a bug in one component. It needs the files that are relevant to the bug, plus maybe a few related files for context. Oak gives it those files instantly and defers everything else. The bandwidth and storage savings compound when you have multiple agents working on different parts of the same large repository.

Speed vs. Git: the numbers that matter

The Oak README claims it’s “far faster than git” and my informal testing bears this out for the operations that agent workflows care about most. Opening a repository — going from zero to ready-to-edit — takes under a second on Oak for repositories where Git takes 5-10 seconds to clone. Making a change and saving it is instant in both systems. Branching in Oak is essentially free because branches are just named pointers, same as Git.

Where Git still wins is on operations that require full history traversal. git log, git blame, and git bisect are well-optimized operations that Oak doesn’t have equivalents for yet. Oak is designed for the agent workflow — open, edit, review, merge — not for the archaeology workflow of understanding why a line of code was changed three years ago. If your workflow needs both, you can use Oak’s Git backend, which stores Oak objects in a Git repository for interoperability.

The trade-off is explicit and I think it’s the right one. Most developer time with AI agents is spent in the edit-review-merge loop. Optimizing for that loop, even at the expense of history archaeology, is a reasonable design decision. You can always export to Git for long-term archival if you need to.

Where Oak fits in the agent tooling ecosystem

Oak isn’t the first attempt to rethink version control for the AI era. Several projects have taken different approaches to the same underlying problem. Understanding where Oak fits helps clarify what it’s trying to be — and what it deliberately isn’t.

The most common approach is Git wrappers: tools that sit on top of Git and try to make agent workflows less painful. Claude Code and Codex both have built-in Git integration that auto-commits at logical breakpoints, squashes agent commits before PR creation, and generates better commit messages than the agent would on its own. These wrappers work surprisingly well for simple workflows. The problem is that they’re papering over Git’s fundamental mismatch with agent behavior. Every wrapper eventually hits a case where Git’s primitives — staging areas, index files, detached HEAD states — leak through and confuse the agent.

The second approach is file-system-level versioning. Tools like Vercel’s Eve and various content-addressable filesystems treat every file write as a versioning event. This is philosophically closer to how agents work — they modify files, and the version control system should track those modifications without requiring explicit commit decisions. But file-level versioning loses the semantic grouping that branches provide. An agent session that touches twenty files across three features becomes an undifferentiated blob of changes.

Oak splits the difference. It keeps the branch abstraction (which is genuinely useful for grouping related changes) but removes the commit abstraction (which adds friction without adding value for agent workflows). The session is both the grouping mechanism and the atomic unit of change. It’s a design that says: agents shouldn’t think about version control at all. The version control system should just record what happened during the session and let humans decide what to keep.

This philosophy extends to Oak’s approach to conflicts. Git treats merge conflicts as a problem to be resolved manually, with conflict markers and manual editing. Oak treats conflicts as data: two sessions modified the same file, here are both versions, here’s the diff between them. The assumption is that an AI agent will resolve the conflict, not a human staring at angle brackets. The conflict representation is designed to be machine-readable, with structured metadata about which session changed which lines and when.

I think this is the right bet. The future of version control for AI-assisted development is not making agents better at Git. It’s making version control systems that don’t need agents to understand them at all. Oak’s session-branch model, content-addressable lazy loading, and machine-readable conflict representation all point in that direction. The question is whether the developer community is willing to adopt a new VCS for the sake of better agent integration, or whether Git’s network effects keep us on wrappers and workarounds indefinitely.

What Oak gets right and what’s missing

Oak’s biggest insight is that AI agents change the economics of version control. When the cost of making a commit drops to near-zero — the agent can create a commit for every function it touches — the value of each individual commit also drops to near-zero. The right primitive is the session, not the commit. Oak builds its entire data model around that insight.

But Oak is still at v0.99.0, and the gaps are real. There’s no equivalent of GitHub pull requests — you’d need to build a review workflow on top of session diffs. There’s no CI integration. The ecosystem of tools that understand Git — every IDE, every CI system, every code review platform — doesn’t understand Oak. The Git backend helps with compatibility, but it’s a bridge, not a replacement.

I also think the “session = branch” model works well for the current generation of AI agents that operate synchronously in a single session. It’s less clear how it handles agents that work asynchronously — starting a task, going idle for hours, resuming when new information arrives. Anthropic’s Claude Cowork and OpenAI’s Codex both support this pattern. Oak’s model might need to evolve from “session branch” to “task branch” as agents become more persistent.

The open-source license and the clean API surface are encouraging signals. Oak is the kind of tool that could evolve quickly if the AI coding community adopts it. The design decisions are opinionated but well-reasoned. The performance claims are real. The missing pieces are ecosystem, not architecture.

I’m not switching my main projects to Oak tomorrow — the Git ecosystem is too deeply embedded in my workflow. But for new projects where AI agents are the primary contributors, or for the parts of monorepos where agents do most of the work, Oak is worth trying. The session-branch model alone changes how you think about agent contributions. When you stop trying to make AI agents behave like human committers and instead design the version control system around how agents actually work, you get something that feels surprisingly natural.

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen