← Back to Reading
ByteByteGo 2026-11-04

How Anthropic Redesigned Source Control

A source control system tracks code modifications over time, allowing multiple developers to collaborate and recover earlier versions of a codebase. Fundamental concepts include repositories for storing versioned information, commits representing specific version snapshots, and branches for managing parallel lines of development. Changes developed on isolated branches are unified via a merge process, typically leading into a main branch. Furthermore, automated systems like continuous integration (CI) and coding agents depend on source control workspaces to run compilation, testing, and other automated checks. Anthropic manages a significant portion of its codebase within a monorepo, which has created severe scaling challenges for its source control infrastructure. Merged changes surged from roughly 2,500 per day in May 2026 to over 30,000 daily by September, while the repository history reached nearly 100 GB. With approximately 25 million CI checkouts occurring each day, simple operations like downloading compressed working copies could demand upwards of 600 PB of daily network traffic. Consequently, Anthropic must balance two critical infrastructure requirements: rapidly ingesting changes and efficiently distributing code to downstream consumers. Git's architecture prioritizes local independence through self-contained clones, which creates excessive transfer, storage, and maintenance overhead for Anthropic's automated agent workloads. While Anthropic initially mitigated these issues using Git features like shallow clones, sparse checkouts, repository seeds, and hundreds of internal mirrors, keeping mirrors synchronized and managing outdated seeds became unmanageable as merge rates grew. Because their automated jobs already depended on network infrastructure, Anthropic realized client-side independence was unnecessary. Consequently, they adopted Scion to overhaul their architecture around an authoritative shared repository.

Read the original ↗
Contents 8 sections
  1. 01How Source Control Works
  2. 02Anthropic’s Problem with Source Control
  3. 03Why Git Couldn’t Solve the Problem
  4. 04How Scion Works
  5. 05How Changes are Handled by Scion
  6. 06How Scion Caches Data
  7. 07How Anthropic Scales Scion
  8. 08Conclusion

How Source Control Works

A source control system tracks code modifications over time, allowing multiple developers to collaborate and recover earlier versions of a codebase. Fundamental concepts include repositories for storing versioned information, commits representing specific version snapshots, and branches for managing parallel lines of development. Changes developed on isolated branches are unified via a merge process, typically leading into a main branch. Furthermore, automated systems like continuous integration (CI) and coding agents depend on source control workspaces to run compilation, testing, and other automated checks.

  • A source control system records codebase changes, enabling collaboration and version recovery.
  • Repositories store versioned project data, while commits represent specific versions containing metadata such as author, description, and history.
  • Branches facilitate independent lines of development, which are integrated into the main branch via merge processes.
  • A checkout process configures a developer's local working copy to a specific version.
  • Continuous integration (CI) systems, coding agents, and research workflows rely on source control to provide workspaces for automated testing and builds.

Anthropic’s Problem with Source Control

Anthropic manages a significant portion of its codebase within a monorepo, which has created severe scaling challenges for its source control infrastructure. Merged changes surged from roughly 2,500 per day in May 2026 to over 30,000 daily by September, while the repository history reached nearly 100 GB. With approximately 25 million CI checkouts occurring each day, simple operations like downloading compressed working copies could demand upwards of 600 PB of daily network traffic. Consequently, Anthropic must balance two critical infrastructure requirements: rapidly ingesting changes and efficiently distributing code to downstream consumers.

  • Anthropic's monorepo experienced a surge from around 2,500 daily merged changes in May 2026 to more than 30,000 per day by September.
  • The repository's main branch history is nearly 100 GB, and a compressed working copy alone exceeds 25 GB.
  • The CI system runs roughly 25 million checkouts per day, excluding developer environments, agent sandboxes, and research jobs.
  • A naive distribution approach transferring compressed working copies for each checkout would result in over 600 PB of network traffic daily.
  • Anthropic's core infrastructure challenge is twofold: quickly accepting new changes while reliably distributing code to a massive number of consumers.

Why Git Couldn’t Solve the Problem

Git's architecture prioritizes local independence through self-contained clones, which creates excessive transfer, storage, and maintenance overhead for Anthropic's automated agent workloads. While Anthropic initially mitigated these issues using Git features like shallow clones, sparse checkouts, repository seeds, and hundreds of internal mirrors, keeping mirrors synchronized and managing outdated seeds became unmanageable as merge rates grew. Because their automated jobs already depended on network infrastructure, Anthropic realized client-side independence was unnecessary. Consequently, they adopted Scion to overhaul their architecture around an authoritative shared repository.

  • Git's design for local repository independence incurs high transfer and storage costs for automated, network-dependent workloads.
  • Anthropic initially utilized optimizations including shallow clones, sparse checkouts, partial clones, repository seeds, and layered mirrors.
  • At its peak, Anthropic managed several hundred internal Git mirrors to distribute traffic, leading to difficult synchronization challenges.
  • Accelerating merge rates caused repository seeds to quickly become outdated and complicated operations requiring historical data.
  • Anthropic transitioned to Scion to shift away from client-level repository independence toward a model that matches their authoritative shared repository workflow.

How Scion Works

Scion is a source control system that shifts most repository operations, such as diff calculation, merge, rebase, and commit creation, to the server rather than the client. Its client, scn, maintains a minimal cache, watches local filesystem updates, and delegates history-heavy queries like blame to the central service. Developed by Anthropic, the backend distributes data across multiple machines rather than keeping a full repository on any single server. This architectural design trades off offline capability for server-driven processing and eliminates separate push operations.

  • Scion centralizes core repository tasks on the server, including calculating diffs, answering historical queries, merging, rebasing, and creating commits.
  • The client tool, known as scn, keeps a limited local cache, monitors filesystem changes, and serves as an interface for developers and automated jobs.
  • Unlike Git, where commits are created locally and pushed later, Scion creates commits directly through a server operation without a separate push step.
  • Anthropic scales Scion by distributing data across machines, ensuring no single server holds a fully materialized repository.
  • The main tradeoff of Scion's client-server asymmetry is a strict dependence on continuous network connectivity and service availability.

How Changes are Handled by Scion

Scion manages repository changes using changesets as its basic durable unit. Unlike Git commits that directly store a pointer to a root tree representing the entire repository, a Scion changeset records only the changed files and content references relative to its first parent. Changeset metadata is persisted in Spanner, while compressed file contents reside in cloud object storage. This architecture enables efficient updates by avoiding the need to process the full repository state when recording changes.

  • Scion uses changesets as the fundamental durable record of modifications rather than full snapshots.
  • A Scion changeset tracks file modifications relative to its first parent along with content references, parent information, and author metadata.
  • Unlike Git, where a commit points directly to a root tree, Scion derives the root tree on the server side rather than storing it directly in the changeset.
  • Changeset metadata is stored in Spanner, a distributed database.
  • Compressed file contents in Scion are stored in cloud object storage.

How Scion Caches Data

Scion utilizes content-addressing to facilitate shared caching across its architecture. By using cryptographic hashes of content as identifiers, stored objects become inherently immutable, guaranteeing that an identifier always points to identical data. Consequently, historical cached objects do not require freshness checks during active development. While Git also employs content-addressing, Scion is distinguished by how deeply its service architecture is optimized around requesting and caching immutable objects alongside mutable branch references.

  • Scion identifies source control objects using content-addressing derived from hash functions.
  • Content-addressing guarantees that stored objects are immutable, eliminating the need for freshness checks on cached historical items.
  • Changes to file contents generate a distinct ID, preventing cache collision or stale data retrieval across different jobs.
  • While Git also uses content-addressing, Scion differs by deeply structuring its service architecture around object caching.
  • Scion distinguishes between immutable data objects and mutable references such as branch names.

How Anthropic Scales Scion

Anthropic scales its Scion system by decoupling metadata queries from working directory file delivery and moving repository operations into a shared service. Scion relies on content-addressed, immutable objects represented as trees and blobs so clients only request missing data. A multi-tier caching hierarchy—consisting of local scion-daemon instances, regional scion-cache layers, and authoritative servers backed by Spanner and cloud storage—minimizes redundant downloads while enforcing strict cache boundaries to prevent failure cascades.

  • Scion separates answering repository queries from file delivery by exposing repository operations through shared APIs, avoiding the need for local repositories.
  • Derived query data and repository metadata are computed on servers and persisted in Spanner.
  • Objects in Scion are content-addressed and immutable, with directory structures modeled as trees and file contents as blobs.
  • On compute nodes, the 'scion-daemon' background process shares cached objects across multiple jobs.
  • A regional caching tier called 'scion-cache' serves multiple nodes before requests fall back to authoritative Scion servers reading from Spanner or cloud storage.
  • All three caching layers implement a uniform object-request interface with strict boundaries to keep cache failures from overwhelming backend servers.

Conclusion

Anthropic's engineering team extracted key operational lessons while developing Scion with a small group of seven people. While engineers found Claude superior and faster at raw code generation, human developers remained critical for high-level system architecture, trade-off analysis, and guardrailing model behavior. As a result of Claude's high output, Scion became one of their most robustly tested codebases, supported by tools like Antique and Claude Tag for review and monitoring.

  • A team of seven engineers developed both the Scion codebase and the Antique code review tool.
  • Anthropic engineers recognized Claude as better at writing code than themselves, shifting the human developer role toward system architecture, trade-offs, and steering model behavior.
  • Claude's speed enabled the creation of an exceptionally well-tested and well-defended codebase for Scion.
  • The engineering team heavily utilizes Claude Tag to monitor each system component.