Git was designed around distributed collaboration, where developers work on local branches, commit changes, and exchange updates through a central repository or remote service. This model continues to work well for most software teams.
AI coding agents are changing the volume and frequency of Git operations. Instead of committing a few times during a development session, an agent may create checkpoints after individual tasks, push several branches, run automated tests, and fetch updated commits repeatedly. When hundreds or thousands of agents operate in the same repository, these operations can create sustained pressure on Git infrastructure.
The problem is not simply the number of commits. Every push involves object transfer, reference updates, storage operations, and potentially downstream CI activity. Every fetch may require Git to prepare and transfer packfiles. When many operations happen simultaneously, repository storage, network bandwidth, CPU, and reference coordination can become bottlenecks.
Keeping a repository responsive under this workload requires changes to both the Git workflow and the infrastructure serving it. This article examines the main bottlenecks and practical approaches for handling high-volume concurrent Git operations.
Understand Why Thousands of Agents Change Git Workloads
Traditional development usually produces an uneven workload. Developers edit code, run tests, and push changes when a task is ready.
Agents often follow shorter execution cycles:
Retrieve the latest repository state.
Modify a set of files.
Commit a checkpoint.
Push the branch.
Trigger automated validation.
Fetch updates and continue working.
When thousands of agents follow this pattern, repository activity becomes continuous rather than occasional.
There are four major sources of pressure.
Concurrent writes
Each push transfers Git objects and requests updates to one or more references. A repository receiving many pushes must process these writes while maintaining correct branch state.
Read amplification
One push can trigger several downstream reads. CI pipelines, code scanning, test environments, and other agents may all fetch the same commit.
A single branch update can therefore generate many more fetch operations than push operations.
Reference contention
When agents create independent branches, their writes can often be handled separately. However, when completed changes are merged into a shared branch such as main, those updates compete for the same reference.
Repository maintenance
Git needs to organize stored objects, remove unreachable data when appropriate, and generate efficient packfiles. As the repository grows and receives frequent updates, housekeeping becomes more important.
These workloads need to be considered together. Optimizing push latency while allowing fetch traffic or repository maintenance to overwhelm storage will not solve the overall problem.
Understand the Difference Between Git Objects and References
A Git repository contains two important categories of data: objects and references.
Objects store the repository's content and history. They include:
Blob objects containing file content.
Tree objects describing directories.
Commit objects recording snapshots and parent relationships.
Tag objects identifying tagged objects.
References, commonly called refs, point to commits. Branches and tags are examples.
When an agent pushes a change, it transfers the required Git objects and requests an update to a reference.
This distinction matters when designing scalable storage.
Git objects are immutable. When a file changes, Git creates a new object rather than modifying the existing object. Multiple commits can therefore share unchanged objects.
References are mutable. A branch such as refs/heads/main moves from one commit to another when a new update is accepted.
This creates different scaling requirements:
Object storage needs efficient parallel writes and reads.
Reference updates need concurrency control to prevent conflicting changes.
Fetch operations need an efficient way to identify and transfer the objects required by a client.
A scalable Git service should avoid coordinating unrelated operations unnecessarily while preserving correctness when multiple clients update the same branch.
Reduce Contention on Shared Branches
A common bottleneck appears when thousands of agents work independently but eventually push their changes into the same main branch.
Even if the agents use separate feature branches, the final merge operations still converge on one reference.
For example:
main
|
+----------+----------+
| | |
Agent 1 Agent 2 Agent 3
| | |
Branch A Branch B Branch C
| | |
+----------+----------+
|
Merge Queue
|
mainThe merge queue becomes the coordination point.
A merge queue can ensure that changes are tested against the latest target branch before being merged. It also helps serialize updates when necessary.
However, a merge queue should not become an uncontrolled backlog.
For large agent fleets, consider:
Limiting the number of simultaneous merge candidates.
Grouping compatible changes into batches where the workflow supports it.
Prioritizing changes based on dependency and delivery requirements.
Revalidating changes when the target branch moves.
Avoiding unnecessary commits directly to the shared branch.
Not every update requires global coordination. Independent branch updates should remain independent wherever the Git hosting architecture permits it.
Improve Push Throughput With Parallel Write Processing
A Git service must accept incoming packfiles, validate the requested reference updates, store objects durably, and make accepted changes visible to readers.
A conventional architecture can create unnecessary coordination between unrelated branch updates.
For example, a service that serializes all repository writes through one shared transaction or manifest may cause pushes to different branches to wait for one another.
A more scalable design separates the storage of immutable objects from the publication of reference updates.
A simplified architecture looks like this:
Agent Push Requests
|
v
Git Service
|
+---------+---------+
| |
v v
Object Storage Ref Metadata
Immutable Packs Branch Versions
| |
+---------+---------+
|
v
Fetch Services
|
v
CI and AgentsThe object storage layer can accept independent packfile writes. Reference metadata records which commit is associated with each branch version and which objects are required to reconstruct its history.
The important requirement is that a reference must never become visible before the objects reachable from its new commit are available.
This ordering preserves repository correctness while allowing more work to happen concurrently.
A recent example of this architectural direction is Pando, the Git backend developed by OpenAI for its monorepo. Its design coordinates updates to individual branches independently and reuses packfiles across fetches. OpenAI reported that the system reduced median push latency by nearly five times in its production environment.
This is a specific infrastructure implementation, not a configuration that can simply be enabled in an ordinary Git repository. The broader lesson is to minimize unnecessary coordination between independent branch writes.
Make Fetch Operations Cheaper
Scaling writes is only half the problem. A large number of agents and CI workers may fetch the same repository history repeatedly.
Git normally generates a packfile containing objects that the client needs but does not already have. This process can consume substantial CPU and disk I/O for large repositories.
Join the conversation! Your thoughts help the community grow.