Pando: How OpenAI Scaled Git for Parallel Agents
A source control service can become slow even when Git itself remains a good interface. At OpenAI, more agents and engineers working concurrently meant more branches, more pushes, and more CI jobs fetching the same commits. The old service sometimes fell below 90% reliability. The answer was Pando, a new server architecture that kept the Git workflow and protocol while changing how the service coordinates writes and delivers history.
Pando now serves OpenAI’s monorepo. The team reports a nearly fivefold improvement in median push latency and almost a petabyte of Git data delivered per day. Those numbers are production observations, not a promise that another repository will see the same result. The interesting lesson lies in two design decisions: coordinate each branch separately, and reuse packs instead of building a custom response for every reader.
Why the ordinary Git server path gets expensive
Git has two kinds of state. Objects hold immutable file contents, directory trees, commits, and tags. Refs are movable names such as refs/heads/main that point to commits. A server must make a new ref visible only after every object reachable from its new tip can be served. It must also reject conflicting updates to the same ref.
In a traditional fetch, a client says which commits it wants and which it already has. The server walks the object graph, computes the missing set, and often assembles a new packfile for that particular client. That is efficient on the wire, but expensive when thousands of clients ask for nearly the same history. The server repeats graph traversal, compression, and disk work for responses that may differ only slightly.
Writes have a different scaling problem. One model keeps full repository replicas and coordinates each ref update across a quorum. Another uploads packs to object storage, then appends updates to a shared repository manifest using compare and swap. The first pays for replica coordination and disk performance on every push. The second still makes unrelated branches compete for one manifest. Neither bottleneck disappears simply by adding more front-end servers.
A branch update carries its own dependencies
Pando streams an incoming push pack into blob storage while validating it. It then records a ref version: the new tip, the pack that supplied it, and the earlier versions on which that pack depends. A transaction publishes the version and moves the branch’s pointer together. The push path needs a constant number of metadata reads and writes, according to OpenAI’s design account. Work such as compaction can be scheduled asynchronously in that same transaction.
Only the pointer for the branch being updated needs to be contested. Two agents pushing different branches can finish independently. Two agents trying to move the same branch still need ordered, conflict checked updates. A client fetching a published ref sees the objects required for that version, so the design preserves read-your-own-write behavior for the branch.
The tradeoff is deliberate. Pando does not promise a single point-in-time snapshot of all branch tips. If foo and bar change while a clone negotiates, two clients can observe different combinations of their versions. Each individual ref remains ordered, and a fetched version includes the history its writer depended on. This is causal consistency across the repository rather than a repository-wide transaction. Workflows that truly require an atomic view of multiple refs would need an additional coordination layer.
Make incoming packs reusable
Git push negotiation shapes the pack a client sends. If a server advertises many existing refs, the client can omit more objects, making its upload smaller. But the resulting pack may depend on history that another reader lacks. Pando normally advertises only a designated trunk branch when a client creates a feature branch. The pack then contains the branch history beyond that common base and can be given to any reader that already has the advertised trunk version.
This shifts some work to the writer. Repeated pushes to a long-lived branch, or stacked branches, may resend objects outside trunk. OpenAI reports that the median resulting pack was below 20 KiB and the 99th percentile below 3 MiB in its monorepo. It also avoids advertising millions of branch refs, which the team says could exceed 100 MiB. The chosen balance favors cheap, repeatable fetches over the smallest possible push.
On fetch, Pando maps the client’s Git have and want commits to ref versions, selects stored packs covering the missing history, and returns packfile URLs. The Git protocol’s packfile-uri extension allows this: the regular response carries an empty inline pack while the client downloads the selected immutable packs separately. Git’s protocol documentation explains how clients receive and verify those additional packs.
OpenAI calls its pack delivery service Express. Regional Express caches serve immutable packs, with consistent hashing placing requests on cache servers. The team reports cache hit rates above 99%, tests saturating 10 Gbps links for clone and fetch, and more than 57 TB of packs served in one hour. These are measurements from its deployment. The key architectural point is that the same pack can satisfy many readers without recompression.
Compaction prevents a death by tiny packs
Reusing each push pack creates another issue: an active trunk can accumulate tens of thousands of packs in a day. Asking a lagging client to download one URL for every push would make negotiation and time to first byte painful.
Pando therefore groups small L0 packs into progressively larger covers, currently up to L4 in OpenAI’s monorepo. Background workers can repack a full cover into one pack, improving compression and reducing the number of downloads. The levels also act like a skip structure over ref versions: the planner can choose large covers for long stretches and small packs near the edges. OpenAI describes fetch planning as logarithmic in the shortest distance between the client’s and target’s ref versions.
Packs at every level remain available. This matters because a recent object lookup may be cheaper from a small pack even when a compacted cover exists. Compaction improves common catch-up fetches without forcing every read through the largest archive.
Migration and the wider Git ecosystem
Pando was introduced as a read and write through proxy in front of the previous system. That kept the two in sync while traffic moved gradually. Engineers then migrated developer machines, CI, integrations, and API consumers in phases. The team says it reached production in ten weeks and now powers all monorepo development. It also built Git conformance tests and deterministic simulations to check negotiation, pack selection, and race conditions.
Git compatibility was an engineering constraint, not just a convenience. Pando relies on existing client behavior and the packfile-uri extension. The team found and repaired edge cases in parallel pack downloads, interrupted transfer cleanup, and validation of packs already on disk. It added tracing for URI downloads and pack byte counts. Its public Git build can download and index independent packs concurrently.
One subtle client change is explicit haves. The server can expose the current feature branch tip for a --force-with-lease safety check while telling the client to build its upload pack against trunk alone. This preserves the branch movement check without making the pack depend on that branch’s previous tip. Some of these improvements have reached upstream Git; others remain in OpenAI’s public build. The team is exploring wider uses for Pando and ways to share the technology.
The general pattern is useful beyond source control: identify the smallest state that truly needs serialization, store large payloads immutably, and make read results cacheable. Pando applies that pattern to refs and packfiles. Its weaker cross-branch snapshot guarantee is a real cost, but one the team judged acceptable for highly parallel development.