Redesigning source control at Anthropic
Key Points
- 1Anthropic developed Scion, an in-house version control system, to overcome the scalability bottlenecks of git caused by a massive, AI-driven surge in daily code merges.
- 2By embracing an online-only, client-server asymmetric architecture, Scion optimizes for high-throughput, horizontally scalable operations that rely on server-side computation rather than local repository clones.
- 3The migration, executed by a small team in five months, demonstrates how leveraging AI agents to write, optimize, and monitor infrastructure allows for rapid, high-quality development at unprecedented scales.
Summary: Engineering at Anthropic - Redesigning Source Control
As Anthropic’s code merge rate surged from 2,500 to over 30,000 changes per day between May and September 2026—driven largely by autonomous agents—git became a major development bottleneck. To overcome the limitations of git, which is optimized for decentralized, offline work, Anthropic developed "Scion," a centralized, agent-native version control system.
#### Core Principles
Scion is built on several key architectural shifts designed for an environment where agents are always online and require high-throughput, low-latency access to a massive monorepo:
- Client-Server Asymmetry: Unlike git, where every client is a potential server, Scion moves compute-heavy tasks (blame, diffs, merges, rebases) to the server. The client maintains only a bounded local object cache and handles disk I/O.
- Horizontal Scalability: The system utilizes a distributed, content-addressed storage model. By eliminating "packfiles" and global repository locks, Scion ensures no repository maintenance is required.
- Sparse and Virtualized Checkouts: Given the massive scale of the monorepo, Scion allows clients to fetch only necessary file trees and materialize data on demand, significantly reducing network and disk overhead.
- API-First Access: All source control metadata and file history are accessible via RPC, allowing CI and research jobs to query the repository state without needing a local clone.
#### Data Structures and Implementation
The fundamental unit of work in Scion is a "changeset," stored in a write-ahead log. Rather than git’s tree-based commit pointers, a changeset records the delta of files relative to its first parent and utilizes content-addressed pointers to blob storage.
To answer complex queries like file history and blame, Scion employs "derived data" structures. These are computed recursively using a generic mechanism where the value for a changeset is derived from its parents :
This approach allows the team to add indices for specific operations (e.g., path-based search, copy detection) without modifying the client, and permits lazy evaluation of expensive metadata.
The infrastructure consists of three tiers:
- scion-server: The authoritative source reading from Spanner and cloud storage.
- scion-cache: A regional caching layer that streams objects directly from memory in the client-ready format.
- scion-daemon: A local node process that manages the client’s working copy and object cache.
#### Impact and Lessons
The migration to Scion resulted in a 200x reduction in CPU and memory overhead compared to the previous git mirror infrastructure, and CI/CD operations were accelerated by two orders of magnitude.
A significant takeaway is the role of AI in the development lifecycle. A small team of seven engineers used Claude to design and build the system, enabling rapid iteration. The engineers transitioned from writing code to defining system constraints and intent, while Claude handled implementation, identified non-obvious algorithmic optimizations, and functioned as "superfans"—dedicated agents that monitor system health via telemetry. By rethinking traditional workflows—such as replacing global repo locks with post-merge testing—Anthropic successfully transitioned to an agent-scale development environment.