Anthropic's Scion - in-house source control built for agent scale
- YT :: https://www.youtube.com/watch?v=hiI0Vk4NgeY
- Original title :: Anthropic Rebuilt Git (yes really)
Theo reads and reacts to Anthropic's engineering post "Redesigning source control at Anthropic". Merges went from ~2,500/day in May 2026 to over 30,000/day in September, and Git, built for human-scale offline work, became the main bottleneck. A team of seven built Scion (a server-centric VCS), Antique (code review), code search and more, and migrated the monorepo off Git in five months. Theo walks through the design (always-online clients, server-side commits, immutable content-addressed change sets, tiered caches), the performance numbers, the lessons about engineers' changing role, and why Anthropic isn't open-sourcing it. His recurring takeaway: switching costs have collapsed, so bespoke replacements for painful infrastructure are now practical.
Why Git stopped fitting
- Git's design assumes code is expensive, humans review everything, and every clone is a full offline repository. That's right for most repos and is why Git won.
- Anthropic's monorepo: main-branch history ~100 GB, uncompressed working copy over 25 GB, ~25 million checkouts/day for CI alone. Fetched natively, that would be ~600 PB of Git traffic per day.
- They tried every workaround (shallow clones, sparse checkouts, promisor remotes, seed snapshots in blob storage) and at peak ran several hundred internal Git mirrors. That got harder as merge rates rose: mirrors fell behind main, and history-dependent operations (diff, blame) on partial clones got fragile.
- Key insight: they were already using Git centrally, and almost every client is an agent or job that is online by definition (Claude doesn't work offline anyway).
- Precedent: Meta built Sapling (on Mercurial) because Git maintainers wouldn't optimize for giant monorepos; Google has Piper; Graphite brought Meta-style stacked diffs to GitHub. Many Anthropic engineers are ex-Meta/Google.
- Theo's side notes: GitHub reliability is awful (external estimates around 7% downtime). Both OpenAI and Anthropic work in monorepos, which he says explains why the ChatGPT/Codex sidebar handles multiple projects badly.
Scion design principles
- Clients are always online: the protocol assumes a reachable server, and data is fetched on demand.
- Client/server asymmetry: the server answers history and blame queries and performs commits, merges and rebases. The client keeps a bounded object cache, lays out files and watches the filesystem.
- Everything the client can ask is also an API, so CI jobs and tools (automated bisect, auto-revert) need no local repo.
- Horizontally scalable: no materialized copy of the repo anywhere, not even on the server. No pack files, so no repo maintenance.
- Commits are cheap, incremental and lock-free. They happen server-side, so there's nothing to push. Cost scales with the size of the change, not the repo.
- Refs (branches, tags) are discouraged except main and release branches, because global state every server must agree on doesn't scale.
- The working copy is optional and sparse by design, with virtualized checkouts that materialize files on read.
Data model
- The unit is a change set, an entry in a write-ahead log. It lists the files changed relative to the first parent, with content-addressed pointers to full compressed file contents in blob storage (not diffs). Metadata lives in Spanner, with separate author and committer fields (person vs. agent).
- Writes are append-only: no locking, no cross-server coordination, no refs to move.
- Derived data (blame, path history, commit-graph skip lists, copy detection, path search) is defined recursively from a change set's parents. Each type can be computed eagerly or lazily, and new types can be added without client changes.
- Theo's point: a hard API boundary stops agents from inventing slow, clever hacks against the internals.
- Diffs are computed on demand by comparing blobs between two change sets.
- Immutability means any server can cache anything without coordinating, so servers are essentially large caches that also compute derived data and write it back to Spanner.
Fetch protocol and caching tiers
- Unlike Git negotiation, the client says what it wants, not what it has: it walks from a root tree, requests missing trees, then blobs. Every request is for an immutable object, so any cache can answer it. Responses are resumable, with no multi-GB pack. Sparse checkouts need no special support.
- Tiers: authoritative Scion servers (Spanner + cloud storage) → regional Scion caches (developer machines) → a per-node Scion daemon over a socket for CI/agents, periodically reset to the latest snapshot and serving from memory in on-disk format.
- All tiers speak identical RPCs, but tiering is strictly enforced to isolate failures. Each tier has a >99% hit rate and no long-lived state.
Results
- 200x smaller CPU/memory footprint than the old Git-mirror infrastructure.
- CI/research checkouts are two orders of magnitude faster (seconds, not minutes). CI recovered ~25% CPU capacity.
- Developer environment vs. Git: pull 25x, checkout 14x, rebase 5x, status 207x, diff 6x, new worktree 84x faster, commit only 30% faster. In agent environments: pull-latest 20x, commit 24x, status 20x.
- Theo's own numbers: T3 Code CI spent almost 1,000 hours (42 days) waiting on Git checkouts, roughly $350-600 of compute, for a ~5-person startup.
- Per-directory access controls inside the monorepo; Theo calls this vindication of his "commit your env vars" take.
- Review rules can treat comment-only changes differently from sensitive logic. Theo questions doing this in code rather than just asking Claude, and wonders if Anthropic is compute-constrained.
Lessons from Anthropic
- Small teams move fast: seven people built Scion and Antique and migrated half a dozen systems in five months while merge volume grew 10x.
- Claude accelerated the work: Mythos Preview rewrote the hand-written Git→Scion ingestion pipeline with 20x less memory and 4x more speed, preserving implicit invariants. Theo notes Scion itself has had only ~12,250 changes, fewer than half a day of Anthropic's current merge volume.
- Engineers aren't less valuable, but their work changes. Everyone on the team rates Claude a better coder than themselves. Humans supply system-level design and trade-offs and often have to tell Claude "no" (e.g. agents brute-forcing merge times from the commit log instead of asking the review tool).
- Adversarial review can be myopic and push over-engineering (e.g. excessive validation against trusted internal services). Humans review the intent of every change, not every line.
- Quality went up: hermetic simulations of every non-trivial interaction, fuzzing, and rate limiting. Claude also found algorithmic fixes for ancestry queries that missed an index. Theo contrasts this with Gemini 4 hallucinating SQLite columns.
- "Claude super fans": Claude Tag Slack bots each obsessively watching one component's telemetry. They catch subtle issues that traditional alerts miss.
- Rethink priors: merge queues with a global lock don't work at agent scale, so they invested in post-merge, pre-deploy automated testing. Claude resolves concurrent conflicts faster than humans can spot them. Theo has long argued that cheap rollback beats piling friction in front of merges, and imagines a merge queue where Claude batches approved chunks into main.
Not open source, and what Git can borrow
- Anthropic says Scion is no general Git replacement: it only makes sense for huge monorepos or agent swarms, needs its own review, search and CI, and is highly bespoke. Theo reads this as the outcome of an internal "can we sell it?" debate.
- Ideas Git forges could adopt: Git servers needn't mirror the client design, forges could offer rich (even standardized) server-side RPCs, the negotiation protocol could change, and sparse/shallow features could compose better.
- Theo's broader theme: switching costs have dropped more than almost anything. He cites his own bespoke projects: a TypeScript compiler in Rust (~$20-25k of Opus 5.5 tokens, 40k weekly downloads), "Lust", a Rust subset for faster compiles, and an analytics mirror on ClickHouse + R2 that's 10x cheaper. With falling token prices, he expects a company-specific Git alternative to cost a few thousand dollars in tokens within a year.