YouTube2Text

Anthropic Rebuilt Git (yes really) — Transcript

by Theo - t3․gg · 9,843 words · 1,463 segments · language en · Watch on YouTube

Full transcript

  1. 0:00For as long as I've been writing code,
  2. 0:01I've been using Git and GitHub. Funny
  3. 0:03enough, I actually started using Git
  4. 0:04before I wrote code cuz I used it to
  5. 0:06manage plugins for my Minecraft servers
  6. 0:08way, way back when I was in like early
  7. 0:09high school. Git is core to the way that
  8. 0:12I build and work with software, but I
  9. 0:14have been starting to notice rough
  10. 0:15edges. A lot of the way that Git was
  11. 0:17built was around code being expensive
  12. 0:20and humans needing to review the code,
  13. 0:21approve the code, and control where this
  14. 0:23code goes because losing code or merging
  15. 0:25the wrong code was a very expensive and
  16. 0:27painful thing. The reality of how Git
  17. 0:29works has influenced the whole industry
  18. 0:31from how we work with our team to how
  19. 0:33products like GitHub are built to the
  20. 0:35way that we think about things that
  21. 0:36should be basic like secrets management.
  22. 0:38Shoutout to my viral clip saying that we
  23. 0:39should be able to commit our environment
  24. 0:41variables. Seriously though, Git is not
  25. 0:43the right primitive for the way that
  26. 0:45things are moving right now. I'll be
  27. 0:47real with y'all. A lot of my problems
  28. 0:48with Git are coming from GitHub because
  29. 0:51it's just a slow and miserable platform.
  30. 0:54External estimates are measuring as much
  31. 0:56as 7% downtime across different things
  32. 0:59within GitHub. I can't tell you how many
  33. 1:01times I've had releases blocked because
  34. 1:02actions were failing or I haven't been
  35. 1:04able to merge an important change
  36. 1:06because the page wasn't loading. The
  37. 1:07fact that GitHub's uptime looks more
  38. 1:08like a Christmas tree than a green bar
  39. 1:11like it's supposed to should say
  40. 1:13everything you need to know. But what if
  41. 1:15I told you GitHub wasn't the only
  42. 1:17problem here? That Git itself is not the
  43. 1:20right solution for working heavily in
  44. 1:23parallel across a lot of people and even
  45. 1:26more agents. I've been thinking about
  46. 1:27this a lot because back in December I
  47. 1:29explored JJ and I loved it. And ever
  48. 1:33since then I've been thinking about what
  49. 1:35would it look like to build something
  50. 1:37new for shipping really, really fast
  51. 1:40with agents. It turns out I'm not the
  52. 1:42only one who's been thinking about this.
  53. 1:44Anthropic just put up an article about
  54. 1:46their new in-house source control
  55. 1:49system. Back in May they were merging
  56. 1:512,500 changes per day, but now in
  57. 1:53September they're doing more than 30,000
  58. 1:56changes merged today. They are now
  59. 1:58bottlenecked by developer infrastructure
  60. 1:59that was built for humans and not for
  61. 2:02agents. And they've decided to build
  62. 2:04something of their own. It seems kind of
  63. 2:06crazy that agents are now smart enough
  64. 2:07to do things like this, but they really
  65. 2:09are. And I love this idea of challenging
  66. 2:12the fundamentals of how you're building
  67. 2:14to make the right solution for yourself.
  68. 2:16I have a feeling this one's going to be
  69. 2:17a really fun deep dive, especially now
  70. 2:20that I'm ripping things out like
  71. 2:21TypeScript for my own vibe coded
  72. 2:23alternatives. That said, I don't think
  73. 2:25everything should be ripped out for your
  74. 2:27own vibe coded alternatives. There's a
  75. 2:29lot of places where it makes sense to
  76. 2:30use a vendor product, like for example,
  77. 2:32today's sponsor. It kind of feels like
  78. 2:34AI has solved most of modern web dev,
  79. 2:36but there are some things it hasn't
  80. 2:37solved. In particular, mobile. As good
  81. 2:39as it is at starting up an app and
  82. 2:41making small changes here and there, I
  83. 2:42find myself just fighting the model
  84. 2:44constantly when I'm trying to actually
  85. 2:46get my apps ready to ship, fix real
  86. 2:48bugs, deal with Apple reviews, and all
  87. 2:49these other pieces. As I ran into more
  88. 2:51and more walls as we tried shipping the
  89. 2:53apps we were building, I hit up my
  90. 2:54friend James at Infinite Red, and he has
  91. 2:55made life so much easier. If you're not
  92. 2:57familiar with these guys, they're
  93. 2:58industry-leading experts in all things
  94. 3:00mobile, especially React Native and
  95. 3:02Expo, but also Swift and Kotlin as well.
  96. 3:04There's a reason that everyone from
  97. 3:05Domino's to Microsoft has called these
  98. 3:07guys in. They really know how to ship.
  99. 3:10I'm going to be real with you guys. The
  100. 3:11role of a consultancy has fundamentally
  101. 3:13changed as a result of AI. You're not
  102. 3:15just hiring these guys to come in and do
  103. 3:16grunt code work anymore. You have agents
  104. 3:18for that. What you bring them in for is
  105. 3:20the expertise, making sure you're not
  106. 3:22making simple mistakes, getting your
  107. 3:23pipeline set up so you can actually
  108. 3:25build and ship the apps, making it
  109. 3:26possible for your agents to actually
  110. 3:28verify their changes and know things are
  111. 3:30working, and just making sure everything
  112. 3:32start-to-finish is ready to go in a
  113. 3:33world where we're all shipping faster.
  114. 3:35These guys can come in and fix anything
  115. 3:36from your team to your app. They can
  116. 3:38build a whole new app from scratch. They
  117. 3:39can take over development, or they can
  118. 3:41just give you the pipelines you need to
  119. 3:42do it yourselves. If you want to ship
  120. 3:44better apps sooner with less bugs, look
  121. 3:46no further than swrve.link/infinitered.
  122. 3:48Man, I'm actually really excited to dive
  123. 3:50into this article. As soon as I saw it
  124. 3:51drop, I wanted to read it, but I decided
  125. 3:53to put it off for this filming. So,
  126. 3:55you're getting my organic take on this.
  127. 3:57If you're wondering why the site looks
  128. 3:58gross, it's because when I leave it on
  129. 4:00the default light mode that the blog is
  130. 4:02in, everyone yells at me. So, using the
  131. 4:04dark reader extension to make it not
  132. 4:06just bright white, and this is the poop
  133. 4:08green brown color it chose. Redesigning
  134. 4:11source control at Anthropic. As our
  135. 4:13merge rate per day grew more than
  136. 4:15tenfold, source control became our
  137. 4:16biggest development bottleneck. Here, we
  138. 4:18share how we migrated to an in-house
  139. 4:20version control system in 5 months. I
  140. 4:23won't lie, the 5 months feels like one
  141. 4:25of those Claude timeline hallucinations
  142. 4:27when you ask it how long will this take,
  143. 4:29and it's like, "Oh, 2 to 3 days." And
  144. 4:30then it finishes the work in an hour.
  145. 4:32Regardless, this is impressive.
  146. 4:34Replacing Git at a company as big as
  147. 4:36Anthropic sounds insane. Last I checked,
  148. 4:39they had around 2,000 employees, so
  149. 4:42yeah. At Anthropic, coding is no longer
  150. 4:44the bottleneck to building systems or
  151. 4:46doing research. Claude is able to
  152. 4:47autonomously iterate on research loops,
  153. 4:49micro-optimize complex programs, and
  154. 4:51build a new services from the ground up
  155. 4:53at a speed and scale we've never seen
  156. 4:54before. The bottlenecks now all of the
  157. 4:56developer infra that was built for human
  158. 4:58scale. Source control, builds, CI,
  159. 5:00things like that. In May of 2026,
  160. 5:03Anthropic averaged around 2,500 code
  161. 5:05changes merged a day. As of September,
  162. 5:07it's over 30,000 a day. We don't expect
  163. 5:10this rate of growth to slow anytime
  164. 5:12soon. The latent demand for merging code
  165. 5:13is practically infinite, and every
  166. 5:15bottleneck we remove immediately leads
  167. 5:17to further increasing the amount of code
  168. 5:19that we produce. The way I framed this
  169. 5:21in the past is de-risking the merge
  170. 5:23button. Making it so by the time a
  171. 5:24person's looking at merge, it's pretty
  172. 5:26likely the code is safe to merge. But
  173. 5:28also the other side, where if you merge
  174. 5:30something you shouldn't have, the blast
  175. 5:32radius and the damage that it can do is
  176. 5:34reduced massively by systems to make it
  177. 5:36easy to test the code once it goes out
  178. 5:38with a limited set of users, and revert
  179. 5:40the things if they do actually end up
  180. 5:42breaking. And I've seen the difference
  181. 5:43when we introduce these types of things.
  182. 5:45We just ship faster. For example, I
  183. 5:48stayed up a bit too late last night
  184. 5:49because I was annoyed with some niche
  185. 5:51performance issues when you had a really
  186. 5:53big database in T3 code. So, I decided
  187. 5:55to fix as much of it as I possibly could
  188. 5:58in one sitting, as well as clearing out
  189. 6:00some old issues and PRs that were
  190. 6:02annoying me, as well as taking over the
  191. 6:03PRs that weren't quite up to date how I
  192. 6:04wanted. And between the hours of like
  193. 6:07midnight and I think around 3:00 or 4:00
  194. 6:11a.m., I merged from here
  195. 6:14through to the top of this page
  196. 6:19to here.
  197. 6:21Another full page of just Theo merges.
  198. 6:23You'll see t3.gg on the left for I think
  199. 6:26every single one of these. Some of them
  200. 6:27are multiple people, but they are me.
  201. 6:31We're still going.
  202. 6:34All the way up. Okay, these were two I
  203. 6:37merged from others
  204. 6:39to here.
  205. 6:41That is three full pages of GitHub merge
  206. 6:44history that I did in 4 hours. I know it
  207. 6:47was 4 hours because I did it between
  208. 6:50nightly releases we do every 6 hours
  209. 6:51because I wanted to have as much in as
  210. 6:53possible for the nightly, so before I
  211. 6:55went to bed, I could download it, test
  212. 6:56it, make sure all was good, fix anything
  213. 6:58that was broken, and revoke the build if
  214. 6:59it was bad, and then go to bed smiling
  215. 7:02knowing that performance would be way
  216. 7:04better for everybody on the nightly when
  217. 7:05I woke up. The fact that I can
  218. 7:06confidently merge 50 plus PRs in a
  219. 7:09sitting, it just feels insane. Like
  220. 7:12imagine going even a year back and
  221. 7:14telling yourself that you were merging
  222. 7:1550 plus PRs a day, hard to fathom. If I
  223. 7:18had only heard people saying these
  224. 7:19things and I hadn't experienced it
  225. 7:20myself, I'd be calling [ __ ] right
  226. 7:22now. But this is reality. If you're not
  227. 7:24moving this fast yet, you are either in
  228. 7:26like a place where you absolutely can't
  229. 7:28because people will die, or you just
  230. 7:29don't realize how powerful these things
  231. 7:31are and you haven't taken the time to
  232. 7:32set up the tooling to make the stuff
  233. 7:34less risky. So, let's dive in a bit
  234. 7:35here. This is interesting. They have
  235. 7:38blue and orange. Blue is pull requests,
  236. 7:40orange is antique change requests. That
  237. 7:44must be their new thing. It lines up
  238. 7:46with the way they name [ __ ] Antique
  239. 7:48seems like their system for all of this.
  240. 7:51And if you think this is Anthropic being
  241. 7:52uniquely weird and silly here, there's a
  242. 7:54long history of companies reinventing
  243. 7:56source control for their specific needs.
  244. 7:59For example, Meta built a crazy system
  245. 8:02around Mercurial that I think is
  246. 8:04actually a hard fork of Mercurial. They
  247. 8:06built all of that to make their stacked
  248. 8:07diff system as strong as possible for
  249. 8:10when people were working on large arcs
  250. 8:12and approving pieces of it to merge it
  251. 8:14all in at once. Graphite is a whole
  252. 8:15company that was built on top of GitHub
  253. 8:17to bring the way Meta worked with source
  254. 8:20control to people who were on GitHub
  255. 8:22because it was so far ahead of how we
  256. 8:24were building if we we were shipping
  257. 8:25fast. At my company Ping Labs, we were
  258. 8:27heavy users of Graphite. Now they're
  259. 8:30part of Cursor and they're building an
  260. 8:31alternative to GitHub into Cursor with
  261. 8:33Origin. The point I'm trying to make
  262. 8:34here is that this isn't as unprecedented
  263. 8:36as it might seem. And many companies
  264. 8:38have found meaningfully better ways to
  265. 8:40work with and manage their source
  266. 8:41outside of Git. And Jay Gold here, who
  267. 8:44used to work at Meta and also works at
  268. 8:46Graphite and now Cursor, pointed out
  269. 8:47that a lot of the reason Meta built
  270. 8:49their systems in themselves instead of
  271. 8:51using off-the-shelf things is because
  272. 8:53their massive checkouts just didn't work
  273. 8:55well with Git. I vaguely remember the
  274. 8:57history here of Meta trying to convince
  275. 9:00the team working on Git to make it work
  276. 9:02better for giant mono repos instead of
  277. 9:04doing separate repos for everything. The
  278. 9:06Git maintainers didn't want to budge, so
  279. 9:08they ended up going their own way. And
  280. 9:09that's fine. You shouldn't have to force
  281. 9:11the industry standard into your workflow
  282. 9:13if it doesn't fit. And it is nice seeing
  283. 9:15more companies challenge this cuz Git is
  284. 9:17not perfect and it certainly is not
  285. 9:19perfect for agents. So let's learn more
  286. 9:21about what Anthropic has built. In order
  287. 9:22to support their insane growth, they
  288. 9:24built Scion, an in-house version control
  289. 9:26system, and they fully migrated their
  290. 9:28mono repo from Git in 5 months. Ready
  291. 9:30for a really silly fun fact? Both
  292. 9:32Anthropic and OpenAI are built in mono
  293. 9:35repos. So everything they're working on
  294. 9:36is different projects and folders inside
  295. 9:38of this one giant repo. If you've ever
  296. 9:40been curious why the sidebar in the
  297. 9:42ChatGPT and Codex app is so bad, it's
  298. 9:44cuz of this. The vast majority of
  299. 9:46employees at OpenAI have one project,
  300. 9:48OpenAI. And they're still using
  301. 9:50github.com, by the way. Pretty much all
  302. 9:52of OpenAI's code lives in openai/openai,
  303. 9:55which 404s if you're not an employee.
  304. 9:56So, for those saying I'm secretly
  305. 9:58employed, here's your proof.
  306. 10:00That makes a lot of the way they think
  307. 10:02and work and build strange to people who
  308. 10:04have more than one project. So, yeah,
  309. 10:06just a silly fun fact I wanted to
  310. 10:07include. Back to what Anthropic was
  311. 10:09saying here, not only did they build
  312. 10:11Scion, which is their in-house version
  313. 10:12control system, they also built and
  314. 10:14shipped a code review service called
  315. 10:15Antique, alongside code search, a rich
  316. 10:18source control IAM system, novel ways of
  317. 10:20managing and landing large amounts of
  318. 10:22reviewed code, and more, all in that
  319. 10:24same 5-month period. In this post,
  320. 10:27they're going to focus on how they built
  321. 10:28Scion specifically. It makes for an
  322. 10:30interesting case study. Claude's ability
  323. 10:32to write code was both what put them in
  324. 10:33the situation in the first place, and
  325. 10:35how they're able to build a high-quality
  326. 10:37scalable system to deal with it. Growing
  327. 10:39our monorepo.
  328. 10:41Before we explore what we built, we
  329. 10:43should acknowledge how unusual our
  330. 10:44workload is. Unsurprisingly, Anthropic
  331. 10:47uses Claude to write software far more
  332. 10:49than almost any other company. You might
  333. 10:51be surprised, guys. Okay, seriously
  334. 10:53though, they're
  335. 10:54they're definitely doing it more than we
  336. 10:56are, although we are doing quite a lot.
  337. 10:58But since they're using it so heavily,
  338. 10:59they're often the first to see where
  339. 11:01tools built for human scale start to
  340. 11:02strain. Source control is just one
  341. 11:04example of this. While we don't expect
  342. 11:06many organizations to have these
  343. 11:07problems in the very near term, we
  344. 11:08suspect it won't be too long before
  345. 11:10others who use AI code tools experience
  346. 11:12these same pressure points, which is why
  347. 11:14we want to share what we've built and
  348. 11:16what we learned. Git is a decentralized
  349. 11:18system. Every clone is a complete
  350. 11:20self-contained repository that can
  351. 11:21compute diffs, read history, and blame,
  352. 11:23and check out any revision while fully
  353. 11:25offline. For the vast majority of repos,
  354. 11:27that is the right design, and it is a
  355. 11:29large part part why Git became the
  356. 11:30standard. But as their monorepo's grown,
  357. 11:32it increasingly doesn't fit that design
  358. 11:34space. The history of their main branch
  359. 11:36alone is almost 100 gigs, and a
  360. 11:38compressed working copy is over 25 gigs.
  361. 11:41They perform on the order of 25 million
  362. 11:43code checkouts per day for CI, before
  363. 11:46counting developer environments, agent
  364. 11:48sandboxes, and research jobs. Fetched
  365. 11:50natively, that would be 600 petabytes of
  366. 11:54Git traffic a day. Git offers tools for
  367. 11:56working with a slice of our repository,
  368. 11:58like shallow clones, sparse checkouts,
  369. 12:00and promiser remotes. Beyond these,
  370. 12:02there are standard workarounds for large
  371. 12:04monorepos, like internal Git mirrors and
  372. 12:05repository snapshots, like seeds, that
  373. 12:07are kept in blob storage. They've tried
  374. 12:09and used all of them. At their peak,
  375. 12:11they operated several hundred internal
  376. 12:13Git mirrors to deal with the load. This
  377. 12:15bought them time, but it became harder
  378. 12:17to operate as merge rates were
  379. 12:18increasing. Seeds were falling further
  380. 12:20from the tip of main between refreshes,
  381. 12:22and it took more and more care to keep
  382. 12:23operations that depend on history, like
  383. 12:26diffs and blame, working on these
  384. 12:28partial clones. Taking a step back, we
  385. 12:30noticed that, like most companies, we
  386. 12:32were using Git as a centralized system
  387. 12:34with one authoritative copy. But, nearly
  388. 12:36all of our clients were agents in jobs
  389. 12:38that are online by definition. This is a
  390. 12:40very interesting and worthwhile callout.
  391. 12:43You can't use Cloud if you're offline,
  392. 12:45because Cloud is being served from a
  393. 12:47giant data center that has GPUs you
  394. 12:50don't. And unless you are plugged into
  395. 12:52those directly, and somehow the internet
  396. 12:54for that data center is offline, you're
  397. 12:56online. Building everything around this
  398. 12:58idea that everyone needs everything
  399. 13:00synced just doesn't make that much
  400. 13:02sense. The properties that make Git
  401. 13:04excellent for distributed offline work
  402. 13:06were actively undermining their ability
  403. 13:08to scale as the repo grew. So, they
  404. 13:10asked themselves, if they designed
  405. 13:11source control with the fact that agents
  406. 13:13are always online in mind from the
  407. 13:15start, what would it look like? How
  408. 13:17would it be different? With agentic
  409. 13:18coding, many common assumptions about
  410. 13:20how software is developed are evolving.
  411. 13:23They embraced these changes when they
  412. 13:24built Scion, which which them to take a
  413. 13:26fundamentally different approach than
  414. 13:28Git on several core principles. Source
  415. 13:30control for huge mono repos does have
  416. 13:32prior art, like Google's Piper and
  417. 13:33Meta's Sapling. I'm touching on Meta's
  418. 13:35stuff before. So, they were able to
  419. 13:36build Scion with their hard-won lessons
  420. 13:38in mind. It is worth noting just how
  421. 13:40many people at Anthropic are ex-Meta and
  422. 13:43ex-Google, and they were often working
  423. 13:45on these types of things at those
  424. 13:47companies. Like, I know Boris was deep
  425. 13:48in developer tooling at Meta, and now he
  426. 13:51is making Claude good.
  427. 13:53The first core change they made is
  428. 13:55again, this idea that clients are always
  429. 13:56online. Since nearly all of the clients
  430. 13:58are agents in jobs, they designed Scion
  431. 14:00client and protocols around a server
  432. 14:02that's always reachable, and they have
  433. 14:03clients fetch data when they need it.
  434. 14:05Also, clearly not using GitHub, because
  435. 14:08even when you're online, you can't
  436. 14:09assume GitHub's online. The next point
  437. 14:11is this idea of client-server asymmetry.
  438. 14:13In Git, every client is capable of being
  439. 14:15a full-fledged server. This is one of
  440. 14:17those things that makes Git Git. It is
  441. 14:19truly decentralized. Anything can be a
  442. 14:22Git server.
  443. 14:23>> [snorts]
  444. 14:23>> But, in Scion, the server answers
  445. 14:25questions about file history and blame,
  446. 14:26creates commits, performs merges and
  447. 14:28rebases, and so on. The client maintains
  448. 14:30a bounded local object cache. It lays
  449. 14:33out the working copy files on disk. It
  450. 14:35monitors for file system changes, and it
  451. 14:37gives users ergonomic ways to work with
  452. 14:39that server. It can compute very little
  453. 14:41on its own, but in exchange, it requires
  454. 14:44way less data locally. Next, they talk
  455. 14:46about how the source control service can
  456. 14:47power many novel application types. With
  457. 14:50Git, a CI job or tool that needs to ask
  458. 14:52a question about the repo, like who last
  459. 14:54changed the line, or how two commits are
  460. 14:57related, it would have to maintain the
  461. 14:59whole local copy of that repo, or hope
  462. 15:01that some vendor-specific API is able to
  463. 15:03provide the answer. With Scion, all the
  464. 15:05source control queries that the client
  465. 15:07uses are also exposed via API. So, in
  466. 15:09many cases, those jobs don't need the
  467. 15:11local repository at all. Many internal
  468. 15:13tools, like their automated bisection
  469. 15:15revert pipelines, wouldn't be practical
  470. 15:17at the scale they're operating at
  471. 15:19without this cheap programmatic access
  472. 15:21to the source. They also call out that
  473. 15:23everything must be horizontally
  474. 15:24scalable. At their peak, they ran
  475. 15:26several hundred Git mirrors, which
  476. 15:27significantly strained capacity and no
  477. 15:29longer scaled once the repo outgrew the
  478. 15:31mirrors' disks or memory limits. You
  479. 15:33know it's bad when your Git mirrors are
  480. 15:36running out of disk space. And to be
  481. 15:38fair, disks did get a lot more
  482. 15:40expensive. I still can't believe that
  483. 15:41hard drives increase in price as much as
  484. 15:43they did. Thanks, Anthropic. In Scion,
  485. 15:45the repo's data is distributed and every
  486. 15:47component is independently scalable.
  487. 15:49There is no material copy of the repo
  488. 15:51anywhere, even on the server. There is
  489. 15:53no equivalent of pack files, just Git's
  490. 15:55compressed bundles of objects, so
  491. 15:57there's no repo maintenance needed,
  492. 15:58either. And then, a very important
  493. 16:00piece, commits must be cheap,
  494. 16:01incremental, and lock-free. Lock-free is
  495. 16:04particularly important. One person
  496. 16:06committing shouldn't block somebody
  497. 16:07else, or more realistically, 500 agents
  498. 16:10committing shouldn't block another 500
  499. 16:12agents. In Git, you commit locally and
  500. 16:14then you push in order to share your
  501. 16:15work. In Scion, every commit, rebase, or
  502. 16:17merge happens on the server, so there's
  503. 16:19nothing to push. But, each of these
  504. 16:21needs to be fast. The cost of creating a
  505. 16:23commit and updating its downstream data
  506. 16:25structures has to scale with the size of
  507. 16:27the change, not the overall size of the
  508. 16:29repo, or the server won't be able to
  509. 16:30keep up. The development life cycle in
  510. 16:32Scion discourages refs, pointers to
  511. 16:34commits such as branches and tags,
  512. 16:35except for the main ref or release
  513. 16:37branches. The reason for that is because
  514. 16:39global state that every server has to
  515. 16:41agree on is always going to cause scale
  516. 16:43issues. Globals are bad when you're
  517. 16:45operating this fast, always. And then,
  518. 16:47the most important piece, the working
  519. 16:48copy is optional and it is sparse by
  520. 16:51design. Because the repo is so large and
  521. 16:53they're checking out code tens of
  522. 16:55millions of times a day for CI, they
  523. 16:56want to avoid checkouts wherever they
  524. 16:58can. With Scion, a CI job that needs the
  525. 17:01diff between a commit and its merge
  526. 17:03base, for example, can ask the server
  527. 17:05just for that. The same goes for writes.
  528. 17:07Many write workloads can skip the
  529. 17:09checkout and function entirely over API.
  530. 17:11Scion's protocol is centered around
  531. 17:13sparse checkouts, which only contain the
  532. 17:15directories the client asked for. Then
  533. 17:17there's also virtualized checkouts,
  534. 17:18which materialize files on demand. So
  535. 17:20when the job needs the file on the disk,
  536. 17:22the client only pays for what it's
  537. 17:23actually reading. I was playing with
  538. 17:25some of these ideas really late last
  539. 17:27year and early this year trying to make
  540. 17:28it easier to manage state of like a code
  541. 17:32base in a way where you don't have to
  542. 17:33have it all on your computer, but your
  543. 17:34agents can still access it. It's dope to
  544. 17:36see them doing the real version of this
  545. 17:38cuz mine was a chaotic experiment. So
  546. 17:40how does it actually work? Now that
  547. 17:41we've seen the principles, we can
  548. 17:43hopefully understand how it all comes
  549. 17:45together. These insights can apply to
  550. 17:47other source control systems or more
  551. 17:49broadly to other stages of the software
  552. 17:51development life cycle. Oh boy, we're
  553. 17:52now in the data structure section. This
  554. 17:54is where we're going to get into the fun
  555. 17:55details. The unit of work is a change
  556. 17:57set. I I see the meta inspiration here.
  557. 17:59>> [snorts]
  558. 17:59>> And change sets are entries in
  559. 18:00write-ahead logs. A change set stores
  560. 18:03most of what you'd expect from a commit
  561. 18:04in Git. Where a Git commit stores a
  562. 18:06pointer to the tree, a change set stores
  563. 18:08a list of the files that changed
  564. 18:10relative to its first parent. Where a
  565. 18:12Git commit stores a pointer to the tree,
  566. 18:14a change set stores a list of the files
  567. 18:16that changed relative to the first
  568. 18:17parent along with content address
  569. 18:19pointers to the compressed file contents
  570. 18:21in blob storage. Change sets are created
  571. 18:24server-side and are available everywhere
  572. 18:25instantly. Fascinating. I knew they were
  573. 18:27doing blob storage for a lot of this,
  574. 18:28but kind of crazy to see the like the
  575. 18:31direct callout that the source code does
  576. 18:33not exist in the system and when you
  577. 18:35request the source, it has to go fetch
  578. 18:37that from blob store and it's
  579. 18:38effectively just a database pointing at
  580. 18:40those blobs. Seems like all the metadata
  581. 18:41is in Spanner. Makes sense. Again, very
  582. 18:43Google inspired. Very interesting they
  583. 18:45have separate author and committer
  584. 18:47fields. Makes sense cuz the author is
  585. 18:49the person who could who triggered it
  586. 18:51and the committer is whatever agent did
  587. 18:54it or where it happened. If you have
  588. 18:55like different systems that are doing
  589. 18:56these things, very interesting. And
  590. 18:58other usual fields like author date,
  591. 19:00committer date, message, the parent
  592. 19:02which we talked about before. That is
  593. 19:03the thing that this is in reference to.
  594. 19:06And then the file changes which
  595. 19:07specifies the file that changed and then
  596. 19:10has pointers to the blobs in their blob
  597. 19:13storage. The structure lets them accept
  598. 19:15change sets with very high throughput
  599. 19:17cuz there's no pack files they have to
  600. 19:18deal with, no locking or crossover
  601. 19:20coordination, and no refs to move
  602. 19:21around. What this is trying to say is
  603. 19:23you just have to append. You only are
  604. 19:26adding to the data set. You don't have
  605. 19:28to go through the whole history before
  606. 19:30appending it. You don't have to move
  607. 19:32pointers from here to there. You don't
  608. 19:33have to restructure the tree. You don't
  609. 19:35have to sync all of the data back and
  610. 19:37forth to make sure it's all in the right
  611. 19:38place. You just put up the change set
  612. 19:41and store the blobs in blob storage, and
  613. 19:43you're done. Oh, is it not even storing
  614. 19:45the diffs for the file change? It's just
  615. 19:47storing the new state of the file? That
  616. 19:49would make sense. So, it's saying like
  617. 19:50these files changed. Here is where they
  618. 19:53point. But this thing in the storage is
  619. 19:56the full content of that file, not a
  620. 19:58diff. Because if it was a diff,
  621. 19:59recalculating would be hell. Change sets
  622. 20:02are recording only what changed. So, on
  623. 20:03their own, they can't quickly answer
  624. 20:05questions like who edited a line or what
  625. 20:07commit affected a file. To answer those,
  626. 20:09Scien builds additional data structures
  627. 20:11from the change sets, including
  628. 20:13dedicated structures for file blame and
  629. 20:15path history, as well as skip lists for
  630. 20:17the commit graph. They call everything
  631. 20:19that isn't directly part of the change
  632. 20:20set derived data, and they compute it
  633. 20:23all through one generic mechanism. Every
  634. 20:25type of derived data is defined
  635. 20:26recursively, so its value for a change
  636. 20:29set is computed from its values for the
  637. 20:31change sets' parents. The mechanism has
  638. 20:33three benefits. First, they can easily
  639. 20:35add new types of derived data when new
  640. 20:36data structures would make some
  641. 20:38operations faster. Second, for each
  642. 20:40type, they can choose whether to compute
  643. 20:42it eagerly or defer the work, so they
  644. 20:43can avoid materializing data they don't
  645. 20:45need. And third, because the client
  646. 20:47never sees the internals of the
  647. 20:49structures, they can optimize them
  648. 20:50without changing the client. They've
  649. 20:52added new types of derived data many
  650. 20:54times as the system has grown, such as
  651. 20:56new indices for performing copy
  652. 20:58detection or path-based file search.
  653. 21:00Makes a ton of sense. To try and dumb
  654. 21:03this down, cuz we're deep in the weeds,
  655. 21:04which I I love. A big part of what makes
  656. 21:07Git so powerful is that you have whole
  657. 21:10of the data when you clone the repo. So,
  658. 21:12if you want to find something like when
  659. 21:14this file changed, all of the things
  660. 21:16this person did, stuff like that, you
  661. 21:18can go through all the data yourself.
  662. 21:20The problem with this is if you want to
  663. 21:22add something new to get or make some
  664. 21:24type of action faster, you're kind of
  665. 21:27screwed because you'd have to upend
  666. 21:29everybody's Git. But, if people don't
  667. 21:31have to clone the whole thing and
  668. 21:32they're just hitting an API for this,
  669. 21:34you can choose what you do and don't
  670. 21:35expose. And since the server here is
  671. 21:38full of cache layers, over-provisioned
  672. 21:40CPU, and so many other things, they look
  673. 21:43for the things clients want to request
  674. 21:45to get more information. They built some
  675. 21:47way to compute that that's efficient
  676. 21:49without having to change the data
  677. 21:50structure. And now the clients can do
  678. 21:52the thing. And the clients aren't going
  679. 21:53to cheat and do something weird, which
  680. 21:54I've seen a lot. When you give client
  681. 21:57access to the internals of something, it
  682. 21:59will invent some crazy novel and also
  683. 22:02crazy slow and CPU-intensive solutions
  684. 22:04to get what it's looking for. This hard
  685. 22:06API boundary prevents that, which is
  686. 22:08almost certainly a huge benefit. So, how
  687. 22:11did they scale this? Starts with a small
  688. 22:13fleet of Scion servers providing source
  689. 22:15control APIs for any operation a client
  690. 22:17needs, like getting change sets,
  691. 22:18computing diffs, finding merge bases,
  692. 22:21and fetching blobs. Computing diffs is a
  693. 22:23fun thing to realize here because again,
  694. 22:25it's storing the file content at the end
  695. 22:28of a change. So, when you are asking
  696. 22:30what changed between these two like
  697. 22:33change sets, you don't just look at the
  698. 22:35diff because you don't have a diff. The
  699. 22:37diff is computed when you say, "Here are
  700. 22:40two change sets, what changed between
  701. 22:41them?" And it does that by grabbing the
  702. 22:43blobs for all the files that are
  703. 22:45affected and seeing how they differ
  704. 22:47between those states. All source control
  705. 22:49data is content-addressed, so a piece of
  706. 22:51data never changes once it's stored.
  707. 22:53This is also important. The ability to
  708. 22:55override history in Git isn't too bad
  709. 22:58because whenever you force push, you're
  710. 23:00changing all the commit hashes. But, if
  711. 23:01you had the ability to edit the contents
  712. 23:04of a given hash, that would
  713. 23:05fundamentally break Git at its core.
  714. 23:08Immutability is always more scalable
  715. 23:10than mutable stuff pretty much 100% of
  716. 23:12the time. So, building the whole system
  717. 23:14around these change sets being fixed and
  718. 23:16permanent, and all of the flexible stuff
  719. 23:19being calculations done on top, this is
  720. 23:21touching my functional programming heart
  721. 23:24deep at its core. And since they have
  722. 23:25these immutable content addressed change
  723. 23:28sets, all servers can cache them without
  724. 23:30checking with the others. As soon as
  725. 23:32it's sent up to one server, it knows
  726. 23:34that change set's unique, it can just
  727. 23:36blindly trust that. As a result of this,
  728. 23:38the servers are horizontally scalable
  729. 23:40and they require very little
  730. 23:41coordination. They're essentially large
  731. 23:43caches that can also compute derived
  732. 23:45data on the fly and write the results
  733. 23:47back to Spanner. Scion's many consumers
  734. 23:49no longer need to maintain local repos
  735. 23:51of their own. Fetching and maintaining
  736. 23:53the repo used to be a significant
  737. 23:54maintenance burden for the CI jobs and
  738. 23:55tools that needed to ask source control
  739. 23:57questions, especially around commit
  740. 23:59ancestry and blame. Early in the
  741. 24:00migration, before they even had their
  742. 24:02own client repo format and protocols,
  743. 24:04Scion was only used to answer these
  744. 24:06types of metadata queries. Fetching file
  745. 24:07contents and materializing working
  746. 24:09copies was far more data intensive
  747. 24:11operations, so they needed to design
  748. 24:13something of their own there. Scion's
  749. 24:14SCN client deviates from the Git fetch
  750. 24:17protocols in several important ways, and
  751. 24:20as a result, it lends itself to highly
  752. 24:21scalable architectures that require
  753. 24:23significantly less CPU than Git servers
  754. 24:25do. Scion's negotiation doesn't tell the
  755. 24:27server what the client already has,
  756. 24:29instead, it operates exclusively on
  757. 24:31trees and blobs that the client wants.
  758. 24:33Starting from a root tree, the client
  759. 24:35checks its local store for missing trees
  760. 24:38and requests them recursively. Then it
  761. 24:40repeats the process for the blobs. So,
  762. 24:42it starts by finding the change sets
  763. 24:44that it needs to do the thing it wants
  764. 24:46to do, and once it has those, it goes
  765. 24:48and collects all of the blobs to have
  766. 24:50the files it needs, and then it can
  767. 24:52actually start working. Every request is
  768. 24:54for a specific object that never
  769. 24:55changes, so any cache can answer it. And
  770. 24:58the architecture closely resembles
  771. 24:59traditional tiered caches. The process
  772. 25:01is also efficient and resumable because
  773. 25:04there's no single multi-gigabyte pack
  774. 25:06file response. Sparse and even
  775. 25:08virtualized checkouts don't need special
  776. 25:10support because the client simply
  777. 25:11doesn't ask for trees it doesn't want.
  778. 25:13This paragraph is using a bunch of terms
  779. 25:15that they did not define and they are
  780. 25:17using in unique ways, so I will do my
  781. 25:19best to translate from Claude-isms to
  782. 25:22English here. The clients don't connect
  783. 25:24directly to the Scion servers cuz those
  784. 25:27are managing all of the change sets.
  785. 25:29They're talking to a daemon over a
  786. 25:31socket, and that daemon stores objects
  787. 25:34for the whole node. So, it's effectively
  788. 25:35keeping a cache of like what was the
  789. 25:37most recent version of a given file at a
  790. 25:40given file path. This allows it to
  791. 25:42respond to requests for files without
  792. 25:44having to go down the whole tree to
  793. 25:46compute the current state of things. I
  794. 25:49really hate how they use node here. Each
  795. 25:51of these daemons that does this caching
  796. 25:53gets periodically reset on the latest
  797. 25:55snapshot so that it isn't like
  798. 25:58recalculating all the things that have
  799. 25:59changed in the last 3 days. They update
  800. 26:01it constantly, and let's be real, with
  801. 26:04the way people are spinning up these
  802. 26:05agents, spinning up CI, all of these
  803. 26:06things, they're probably starting that
  804. 26:08work from latest. So, it makes a lot of
  805. 26:10sense to get the cache up to date that
  806. 26:13way and then just resolve things that
  807. 26:15have changed since. The cache servers
  808. 26:17stream objects directly from memory
  809. 26:18instead of like storing it in the hard
  810. 26:20drive, which makes it way faster to get
  811. 26:22that data when you're on a client on the
  812. 26:24other side. And it stores this in the
  813. 26:25same format that it would have been on
  814. 26:27disk so that it doesn't have to change
  815. 26:30the shape or format of the data when it
  816. 26:31comes out of memory and gets onto a
  817. 26:33drive after going over the network. When
  818. 26:35caches are missing objects, they ask the
  819. 26:37authoritative Scion servers, which is
  820. 26:38the layer we're talking about before,
  821. 26:40which will read from Spanner or cloud
  822. 26:41storage as needed in order to get the
  823. 26:44updated data and the updated files in
  824. 26:45that cache layer. The Scion daemon,
  825. 26:47Scion cache, and Scion server all
  826. 26:49respond to identical RPCs for this
  827. 26:51protocol. So, the client doesn't need to
  828. 26:53know the cache topology. Any tier could
  829. 26:56theoretically talk to any other, but
  830. 26:57they strictly enforce the tearing to
  831. 26:59isolate failure domains. They want to
  832. 27:00avoid a situation where a failure in a
  833. 27:02regional Scion cache overwhelms the
  834. 27:04upstream servers and brings down the
  835. 27:06entire system.
  836. 27:07So, again, they have that cluster of
  837. 27:08Scion servers that are the like proper
  838. 27:11management of the real-world
  839. 27:14state of things, the authoritative
  840. 27:15layer. That is the layer that stores in
  841. 27:17Spanner for the change sets in the cloud
  842. 27:19storage for the actual contents There is
  843. 27:22then a cache layer that is what gets hit
  844. 27:25often for your actual work that is
  845. 27:27regional, so you don't have to like
  846. 27:29fetch across the world to hit the
  847. 27:30server. This is what will hit the Scion
  848. 27:34server to get a reasonable state in the
  849. 27:36cache. Developer machines directly hit
  850. 27:38the Scion cache when you're like pulling
  851. 27:40down the code to do work. And if the
  852. 27:42Scion cache is missing things that you
  853. 27:44need, it will go pull it from the
  854. 27:45server. But, if you're working on CI,
  855. 27:47even this isn't the right abstraction,
  856. 27:48and that's where this daemon comes in
  857. 27:50that we were just talking about that
  858. 27:51gets periodic snapshots so that it's
  859. 27:53ready to spin up CI jobs as quickly as
  860. 27:55possible. Each tier of this system
  861. 27:57maintains a cache hit rate of over 99%
  862. 28:00and it doesn't require long-lived state.
  863. 28:02So, it's easily scaled up if needed.
  864. 28:05Their infrastructure footprint is 200x
  865. 28:07smaller than their previous Git
  866. 28:08mirroring infra in terms of CPU and
  867. 28:10memory requirements. That's insane.
  868. 28:13Again, like this is like the crazy idea
  869. 28:16that has been like hurting me a bit. The
  870. 28:19realization that that like all software
  871. 28:21was built to be somewhat generalizable.
  872. 28:24Now, we can build software for our
  873. 28:26specific needs. And like it's a silly
  874. 28:28thing to pivot to, but hear me out. One
  875. 28:31of my weird YOLO projects right now is
  876. 28:33called Lust. Lust lang to be specific.
  877. 28:36I'm trying to take a subset of Rust that
  878. 28:39gets you most of the benefits of Rust,
  879. 28:42but make it so that it could be compiled
  880. 28:43and built 100 times faster because the
  881. 28:46build times for TS Rust, which is my
  882. 28:48rewrite of the TypeScript compiler in
  883. 28:49Rust, are too slow. This is an insane
  884. 28:51project that I didn't think would make
  885. 28:53any progress, but it's already able to
  886. 28:55compile over 40% of the files from TS
  887. 28:57Rust, and I am expecting by the end of
  888. 29:00the week it might actually work. Would
  889. 29:02this work for most Rust projects?
  890. 29:05[ __ ] no, absolutely not. That is not
  891. 29:07what this is for. This is a bespoke
  892. 29:09experiment to see if I take a given code
  893. 29:11base that I'm not happy with compile
  894. 29:13times on, can I invent a new language to
  895. 29:15make it compile faster?
  896. 29:17It's like
  897. 29:18insane that this is even
  898. 29:20a thing you can think, much less do. But
  899. 29:23I'm using a model that's a lot dumber
  900. 29:25than what they have access to. I'm using
  901. 29:26the distilled version of two model
  902. 29:29generations away from what they have
  903. 29:30internally. They're rocking Fable Ultra
  904. 29:33Max 7 internally, and I'm here with Opus
  905. 29:365.5, more than happy to do these types
  906. 29:37of things. The fact that we can build
  907. 29:39this way now is just crazy. And while
  908. 29:42this system might not be 200 times
  909. 29:44smaller and faster for some cases, it is
  910. 29:47for theirs. And I would expect more and
  911. 29:49more companies that have these types of
  912. 29:51big, painful scaling things to go
  913. 29:53reinvent the painful pieces that are
  914. 29:55slowing them down. And a fun fact, as
  915. 29:57John, the borrow checker is not why
  916. 30:00build times suck in Rust. It's a bunch
  917. 30:02of weird LLVM [ __ ] Anyways,
  918. 30:05CI and research jobs are able to check
  919. 30:07out code two orders of magnitude faster,
  920. 30:09seconds rather than minutes, which frees
  921. 30:11up a sizable amount of capacity across
  922. 30:13the fleet. CI alone had a 25% CPU
  923. 30:17capacity win. Neither clients nor caches
  924. 30:19need to perform repo maintenance, which
  925. 30:21simplifies the life cycle management of
  926. 30:22our jobs. Out of curiosity, I'm trying
  927. 30:25to get the hard numbers for how much
  928. 30:26time T3 code builds in CI have spent
  929. 30:30dealing with GitHub and get like clones.
  930. 30:33It's going to be a number that hurts me
  931. 30:35a lot. We'll come back and check on that
  932. 30:36in a bit, but I have a feeling I'm going
  933. 30:39to feel a lot of pain as soon as I see
  934. 30:41that. So, what did they learn building
  935. 30:43Scion? They started building it around
  936. 30:45the same time as Mythos preview and
  937. 30:47Claude tag becoming available
  938. 30:48internally. Both of these releases
  939. 30:50simultaneously amplified the need for
  940. 30:52Scion and meaningfully accelerated how
  941. 30:53quickly they'd be able to build it.
  942. 30:55Here's a particularly striking example.
  943. 30:56Earlier in the year, they had largely
  944. 30:58handwritten the first version of the Git
  945. 31:00to Scion ingestion pipeline as a
  946. 31:02prototype. They thought it was good
  947. 31:03until they got their hands on early
  948. 31:04internal snapshots of Mythos preview.
  949. 31:06They asked it to rewrite the whole thing
  950. 31:08and with no further instructions, it
  951. 31:09produced a version that consumed 20x
  952. 31:11less memory and was four times faster
  953. 31:13while preserving all of the implicit
  954. 31:15invariations around ingestion, ordering,
  955. 31:17and data structures. This is the history
  956. 31:20of changes to Scion and Antique. I will
  957. 31:22say, worth noting here, they are
  958. 31:24bragging about 30k changes a day, but
  959. 31:26they've only made 12,250
  960. 31:29changes to this architecture total. So,
  961. 31:31their daily velocity is more than double
  962. 31:35the amount of like requests, commits,
  963. 31:39changesets, whatever you want to call
  964. 31:40them, that have landed for the whole of
  965. 31:43their source control. Kind of crazy.
  966. 31:45What they learned building and operating
  967. 31:47Scion offers some interesting lessons
  968. 31:49for what building agent-scale software
  969. 31:51will look like. Rapid development with
  970. 31:52small teams is going to become more
  971. 31:54common. Can confirm. A team of seven
  972. 31:57people built both Scion and Antique,
  973. 31:59their code review tool, which they could
  974. 32:01have easily written a whole separate
  975. 32:03blog post about. Considering how awful
  976. 32:05code review is, I feel it. I'm thankful
  977. 32:07that we have so many wonderful sponsors
  978. 32:09working on that now. They also follow up
  979. 32:10with Not to mention, half a dozen
  980. 32:12related systems that they fully migrated
  981. 32:14all of in 5 months. They did this all
  982. 32:16while the volume of code merged per day
  983. 32:18was increasing 10x. In the past,
  984. 32:20developing and deploying source control
  985. 32:21systems like this would have taken years
  986. 32:23of iterative migrations with many more
  987. 32:25engineers. We think this sort of fast,
  988. 32:27nimble migration will become more common
  989. 32:29in the future.
  990. 32:31Yeah.
  991. 32:32It just will. Switching costs has gone
  992. 32:34down more than almost anything.
  993. 32:36Historically, people adopt a technology,
  994. 32:38a solution, a vendor, and then they kind
  995. 32:40of are stuck there cuz switching off is
  996. 32:41more expensive than whatever cost
  997. 32:43they're incurring staying. Now, it's
  998. 32:45easier to write your own alternative and
  999. 32:46move to it.
  1000. 32:48It's insane. I personally threw together
  1001. 32:50a solution to clone and mirror and
  1002. 32:53backfill all of our analytics data that
  1003. 32:56I have on one particular analytics
  1004. 32:58provider so that I have it directly on
  1005. 33:00my own managed ClickHouse on top of R2.
  1006. 33:02Ended up being more than 10x cheaper and
  1007. 33:04way easier for my agents with. And I did
  1008. 33:07this part-time with a handful of threads
  1009. 33:09on the side while I was working on my
  1010. 33:11real day-to-day work. And these types of
  1011. 33:12things are miserable to do without AI.
  1012. 33:15Like this sucked long ago. And now it's
  1013. 33:18relatively trivial to set the stuff up
  1014. 33:20yourself. Like truly crazy. As Chad is
  1015. 33:22pointing out, I literally wrote my own
  1016. 33:24TypeScript compiler and it's now running
  1017. 33:26thousands of times a day in T3 code.
  1018. 33:28It's over 40,000 weekly downloads and I
  1019. 33:30threw this together kind of as like a
  1020. 33:32joke just to see if it was possible.
  1021. 33:34Truly unbelievable. Oh, I got my
  1022. 33:36numbers. Of all of my CI, almost 1,000
  1023. 33:40hours of the CI on T3 code was spent
  1024. 33:43waiting for Git checkouts. That's 42
  1025. 33:46days of waiting for your Git pull. And
  1026. 33:48that's just CI. That's not counting
  1027. 33:50people doing it locally. Yeah, the
  1028. 33:52estimates just for T3 code time spent
  1029. 33:55waiting for Git pull is between $350 and
  1030. 33:59$600 just for the renting of a CPU
  1031. 34:02pulling down the changes. Insane. And
  1032. 34:05that's for a small project by a startup
  1033. 34:07with five-ish employees depending on how
  1034. 34:09you cut.
  1035. 34:10Imagine how much crazier that could get
  1036. 34:13at this level of scale. I do like this
  1037. 34:15section. This is a thing I've never
  1038. 34:16heard from Anthropic. Engineers are no
  1039. 34:18less valuable, but their work is
  1040. 34:19changing. Thank you, Anthropic, for not
  1041. 34:21saying engineers don't matter anymore.
  1042. 34:23Nice change. All the engineers who
  1043. 34:24worked on the system would now rate
  1044. 34:26Claude as better at writing code than
  1045. 34:28them. But the engineer still supply the
  1046. 34:30invaluable understanding of the
  1047. 34:31high-level inter-system components in
  1048. 34:33the design level trade-offs, making
  1049. 34:35informed choices around the problems
  1050. 34:37they wanted to solve and the scale they
  1051. 34:39knew they needed to achieve. Very often,
  1052. 34:41they found that the role of engineers
  1053. 34:43was to tell Claude no. Agents will
  1054. 34:45sometimes violate core system
  1055. 34:46constraints to satisfy a pattern that
  1056. 34:48should never have been allowed in the
  1057. 34:49first place. Okay, maybe they are using
  1058. 34:51the same Claude that we are.
  1059. 34:53This was particularly common in their
  1060. 34:54migrations. For example, there were
  1061. 34:56multiple systems that tried to brute
  1062. 34:57force looking up when a change merged to
  1063. 34:59main by linearly reading the commit log
  1064. 35:02instead of asking the code review tool.
  1065. 35:03Anthropic also makes extensive use of
  1066. 35:05adversarial review, and while this is
  1067. 35:08incredibly effective in many ways, can
  1068. 35:10also be myopic. So, skilled engineers
  1069. 35:12need to steer Claude away from
  1070. 35:14over-engineering parts of the system in
  1071. 35:16response to hypothetical concerns.
  1072. 35:18Yep, this is even worse when you have
  1073. 35:20feedback from other model families cuz
  1074. 35:22they're worse at convincing each other.
  1075. 35:23Making sure that your AI review systems
  1076. 35:26don't accidentally cause huge
  1077. 35:28over-engineering and scope creep is a
  1078. 35:29genuine real challenge. For example, one
  1079. 35:31such review was overly defensive about
  1080. 35:33trusting other internal services,
  1081. 35:35resulted in Claude adding excessive
  1082. 35:37validation and complexity. Our team
  1083. 35:39members still review every change
  1084. 35:40request for the system, but they now
  1085. 35:42examine the intent of the change as
  1086. 35:44opposed to reading every line of code.
  1087. 35:47Oh, how the world has changed. We were
  1088. 35:49able to substantially improve
  1089. 35:51optimization and quality by virtue of
  1090. 35:53Claude's ability to write immense
  1091. 35:54amounts of code much faster than they
  1092. 35:56could themselves. Scion is among the
  1093. 35:58most well-tested and well-defended code
  1094. 36:00bases they've ever worked on. Even on
  1095. 36:02their tight timelines, they were able to
  1096. 36:03do hermetic simulations of every
  1097. 36:05non-trivial infrastructure and source
  1098. 36:07control interaction that they've ever
  1099. 36:08encountered, as well as fuzzing and
  1100. 36:10sophisticated rate limiting. It still
  1101. 36:12blows me away that I can be like, "Hey
  1102. 36:14Claude, build a fuzzer for this system,
  1103. 36:15find bugs." And it just does.
  1104. 36:18Surreal. Claude also found significant
  1105. 36:21optimizations. For example, algorithmic
  1106. 36:23optimizations to ancestry queries that
  1107. 36:25missed one of their indexes, which would
  1108. 36:27have taken an expert days or weeks of
  1109. 36:29analyzing and tuning, and then did it
  1110. 36:31all again the next day. This one's
  1111. 36:33particularly funny cuz I just filmed my
  1112. 36:35video about Gemini 4 Argon. Gemini 4 was
  1113. 36:39hallucinating columns in my SQLite
  1114. 36:42tables. After reading the file that is
  1115. 36:46my whole schema, it would then fire a
  1116. 36:48query for columns that don't exist.
  1117. 36:51Meanwhile, Claude is doing algorithmic
  1118. 36:55optimizations to get around missing
  1119. 36:58indexes.
  1120. 36:59Anybody who says Gemini is in a good
  1121. 37:01state right now is not trustable as an
  1122. 37:03engineer.
  1123. 37:04It's pretty rough.
  1124. 37:06Yeah, Gemini's imagination is
  1125. 37:07incredible. It hallucinates so well.
  1126. 37:09It's truly a creative model. You can see
  1127. 37:12here the difference in everyday source
  1128. 37:14control commands when they run their SCN
  1129. 37:16system instead of Git. Pulls are 25x
  1130. 37:19faster, checkouts are 14x faster, rebase
  1131. 37:21is 5x faster, status is 207x faster,
  1132. 37:25commits are only 30% faster,
  1133. 37:27disappointing, but diffs are 6x faster.
  1134. 37:30New work trees, oh god. This is one of
  1135. 37:32the biggest issues and like we used to
  1136. 37:34deal with this at T3 Code. Making work
  1137. 37:36trees when you have to clone everything
  1138. 37:38is really expensive. 84x faster is a
  1139. 37:42huge win there.
  1140. 37:43Pull latest is 20x faster, commits are
  1141. 37:4624x faster, and status for agent
  1142. 37:48environments is 20x faster. Huge. Oh,
  1143. 37:51this first section was developer
  1144. 37:52environments versus agent environments,
  1145. 37:53that makes sense.
  1146. 37:54Yeah, all of these wins are massive.
  1147. 37:56Alongside all the performance wins, they
  1148. 37:58also laid the groundwork for new forms
  1149. 37:59of mono repo security. Managing safety,
  1150. 38:01security, and compliance in massive mono
  1151. 38:03repos is as important as managing the
  1152. 38:05size and scale. They built Scien with
  1153. 38:07these in mind from the start. It
  1154. 38:08supports rich access controls on
  1155. 38:11repositories, as well as the ability to
  1156. 38:13apply permissions to individual
  1157. 38:15directories in order to protect the most
  1158. 38:17sensitive code without losing the
  1159. 38:18benefits of the mono repo. Look who was
  1160. 38:21right about committing your environment
  1161. 38:22variables, [ __ ] The the Theo
  1162. 38:24wins never end.
  1163. 38:27Can't wait for another anime profile
  1164. 38:29picture on Twitter to say I'm wrong cuz
  1165. 38:31they don't have a job. Furthermore, the
  1166. 38:32code review tools that they built can
  1167. 38:34express complex semantic constraints on
  1168. 38:35approvals, which allows them to
  1169. 38:37differentiate simple things like comment
  1170. 38:38only changes from sensitive logical
  1171. 38:40changes, so that human reviewers can
  1172. 38:41focus on the most consequential parts.
  1173. 38:43You [ __ ] you don't need to do
  1174. 38:45this. You don't have to do this
  1175. 38:46programmatically. You don't have to
  1176. 38:48build code to change the categorization
  1177. 38:53of the change sets. I don't know if you
  1178. 38:55guys have heard about this. There's this
  1179. 38:56thing called Claude. You can give it
  1180. 38:58code and ask it a question and you get
  1181. 39:01an answer. This actually might be the
  1182. 39:03thing I'm most bearish on in this whole
  1183. 39:04thing. If they are compute constrained
  1184. 39:06enough that they're not running Claude
  1185. 39:08to summarize and filter their diffs, and
  1186. 39:11they feel like they need to make
  1187. 39:12programmatic solutions for this instead,
  1188. 39:14maybe they are out of compute. Maybe we
  1189. 39:15are screwed. With all of this, they
  1190. 39:17claim that a new level of operational
  1191. 39:19excellence is possible. And you know
  1192. 39:20what? To their [ __ ] credit, it is.
  1193. 39:22Their uptime is significantly better
  1194. 39:26than it was in the past. It was bad bad
  1195. 39:29before. I can't remember the last time
  1196. 39:31Claude was down. The website goes down
  1197. 39:33decently often, but like Claude code and
  1198. 39:35the Claude APIs, those are pretty
  1199. 39:37reliable lately. Funny enough, I think
  1200. 39:39I've had more problems with OpenAI and
  1201. 39:40Codex outages than I have with Claude
  1202. 39:42recently, which is unbelievable
  1203. 39:44considering how big the gap was before.
  1204. 39:46So, yeah, if they're saying that this is
  1205. 39:47helping make operational excellence more
  1206. 39:50possible, I'll believe them because they
  1207. 39:52are they are fixing their downtime
  1208. 39:53problems. Their team uses Claude tag,
  1209. 39:55which if you don't know, that's their
  1210. 39:56Slackbot that they're all obsessed with.
  1211. 39:58They use it heavily and it helps them
  1212. 40:00monitor each component of the system.
  1213. 40:01For example, they have Slack channels
  1214. 40:03where they tasked Claude with being
  1215. 40:04obsessively focused on the health of
  1216. 40:05single components. They call these super
  1217. 40:07fans. Also, they they refer to them as
  1218. 40:09Clauds, plural. That hurts me a bit.
  1219. 40:11Guys, why why do you have to do this,
  1220. 40:13Anthropic? I I was defending you and it
  1221. 40:15felt good. Now you're doing cringe [ __ ]
  1222. 40:17like this. We call these clouds super
  1223. 40:19fans. I'm like imagining the person
  1224. 40:22saying this to me and somehow their face
  1225. 40:24is more punchable than mine. They have a
  1226. 40:26Scion Damon super fan, a Scion cash
  1227. 40:29super fan, an antique merge queue super
  1228. 40:32fan, and so on. They have access to the
  1229. 40:34telemetry and logs and they act like
  1230. 40:36experienced engineers who have nothing
  1231. 40:37better to do than refresh charts and
  1232. 40:40look for anything strange. Are you
  1233. 40:41talking [ __ ] That's my job. They do
  1234. 40:44call out that they have traditional
  1235. 40:45alerts as well, but the super fans
  1236. 40:47detect subtle and novel issues that make
  1237. 40:48those alerts seem one-dimensional by
  1238. 40:50comparison. That does actually seem kind
  1239. 40:51of cool. Everything earlier I said where
  1240. 40:53they were reducing compute with the
  1241. 40:54programmatic thing, this is the
  1242. 40:56opposite. This is them burning compute
  1243. 40:57for fun.
  1244. 40:58And here is what's probably the most
  1245. 40:59important lesson in all of this. We're
  1246. 41:01completely rethinking our priors.
  1247. 41:04Engineers, for good reasons, get pretty
  1248. 41:08fixed in their way of doing things
  1249. 41:10because in order to be a world-class
  1250. 41:13engineer, you need to have a
  1251. 41:16the thing. And generally speaking, the
  1252. 41:18hot, hyped-up, cool new thing is not the
  1253. 41:21best long-term solution. So a lot of the
  1254. 41:24best engineers in the world have gotten
  1255. 41:26used to this and are inherently
  1256. 41:29skeptical by default. They trust what
  1257. 41:31they know and what they know works and
  1258. 41:33they're hesitant to try new things
  1259. 41:34because they've been burned so many
  1260. 41:35times. You got to get over that. Things
  1261. 41:38are changing too fast. You have to flip
  1262. 41:40the way you think about this almost like
  1263. 41:42upside down where you have this
  1264. 41:43knowledge of what does and doesn't work,
  1265. 41:45which leads you to picking certain
  1266. 41:46tools. Now you need to do the opposite.
  1267. 41:48You need to know what does and doesn't
  1268. 41:50work and where it breaks and where it
  1269. 41:52functions and use that to reinvent the
  1270. 41:55things you've trusted your whole life to
  1271. 41:56be perfect for your needs. I have been
  1272. 41:58writing TypeScript for almost a decade
  1273. 42:00at this point and I rewrote TypeScript
  1274. 42:02itself for fun. Let's see how Anthropic
  1275. 42:04explained this phenomena. This project
  1276. 42:06prompted them to take a very hard look
  1277. 42:08at other workflows that were designed
  1278. 42:10for human scale. For our merge queue for
  1279. 42:12example, just doesn't make sense at
  1280. 42:13agent scale. What does CI even mean when
  1281. 42:15hundreds or even thousands of changes
  1282. 42:17can merge while tests are running? We
  1283. 42:19haven't been able to effectively
  1284. 42:20replicate the industry standard of a
  1285. 42:22global repo lock on the merge queue. So,
  1286. 42:24instead, they've invested in post-merge
  1287. 42:26and pre-deploy automated testing. Look
  1288. 42:28at that. Theo was right again. I I'm
  1289. 42:31sorry to
  1290. 42:33freak out about these things again, but
  1291. 42:34you guys have no idea how long I've been
  1292. 42:38harassed for thinking it's more
  1293. 42:40important to be able to undo a bad
  1294. 42:41change than to add thousands of layers
  1295. 42:44in front of the changes to make it
  1296. 42:46slightly harder to make a bad change. So
  1297. 42:48much of engineering has been focused on
  1298. 42:50increasing friction more and more and
  1299. 42:52more to lower the likelihood something
  1300. 42:54breaks. I have been focused on make the
  1301. 42:56friction as low as possible both to get
  1302. 42:59code out, but more importantly, to fix
  1303. 43:01something when it breaks. Because no
  1304. 43:03matter how strict your processes are,
  1305. 43:05you will ship something broken. I don't
  1306. 43:07care who the [ __ ] you are. If you
  1307. 43:09actually think you will never ship
  1308. 43:10broken code or that you have built your
  1309. 43:12system in a way where will never ever
  1310. 43:15have bugs, I hope that your mom's
  1311. 43:17basement doesn't smell too bad. Because
  1312. 43:18in the real world things break. And when
  1313. 43:20things break, you need to fix them. And
  1314. 43:22focusing on ways to fix things and
  1315. 43:24reduce the damage that broken things can
  1316. 43:26do is incredibly important. They do call
  1317. 43:28out that by working this way, sometimes
  1318. 43:30concurrent changes conflict, but Claude
  1319. 43:32can typically fix these conflicts faster
  1320. 43:34than humans can even identify them. I've
  1321. 43:36been thinking a lot about this. The idea
  1322. 43:37I've had is what if the merge queue
  1323. 43:40wasn't PRs that need to be merged one
  1324. 43:42after another? What if the merge queue
  1325. 43:44was a super general here are things that
  1326. 43:47we're happy to have go in. Hey Claude,
  1327. 43:50land all of this. And it would try to
  1328. 43:53combine like once something has the the
  1329. 43:55merge thumbs up, Claude tries to squash
  1330. 43:58as many of those chunks into individual
  1331. 44:00things as possible like in groups, and
  1332. 44:02then pull them into main as effectively
  1333. 44:05as it can dealing with the conflicts as
  1334. 44:07it goes. Because Claude is now better at
  1335. 44:09dealing with merge conflicts than I am.
  1336. 44:10And now we got an interesting end here,
  1337. 44:13contributing to the wider ecosystem. We
  1338. 44:15see Scion is just one part of the answer
  1339. 44:18to the scaling concerns that
  1340. 44:19increasingly capable AI agents have
  1341. 44:21raised. We're sharing these details as
  1342. 44:22an example of how teams can tackle
  1343. 44:24similar challenges. But they don't
  1344. 44:25expect their solution or their
  1345. 44:27considerations to suit every case. They
  1346. 44:29specify this is in no means a suitable
  1347. 44:30replacement for Git in general use. The
  1348. 44:32concepts of outlined here really only
  1349. 44:34make sense for truly enormous mono repos
  1350. 44:36with either tens of thousands of
  1351. 44:38engineers or swarms of agents
  1352. 44:40prolifically writing code. Plus,
  1353. 44:42Anthropic's unique in that their ability
  1354. 44:44to spend tokens for internal use far
  1355. 44:45exceeds what any other business would
  1356. 44:47realistically want to spend. Never
  1357. 44:49thought I'd see the day. To be fair, as
  1358. 44:51I've talked about many times, tokens are
  1359. 44:53getting cheaper, way cheaper. A given
  1360. 44:56level of intelligence is achievable at
  1361. 44:58lower and lower prices constantly. The
  1362. 45:00Fable rewrite of Bun into Rust was like
  1363. 45:04300K plus of Fable tokens. I was able to
  1364. 45:07do a bolder rewrite, which was
  1365. 45:09TypeScript in Rust, myself, in around 20
  1366. 45:11to 25,000 dollars of Opus 5.5 tokens.
  1367. 45:14The speed that these prices are going
  1368. 45:15down is insane. So, it is absolutely
  1369. 45:17possible by this time next year you'd be
  1370. 45:19able to write your own similar thing to
  1371. 45:21Scion, your own alternative to Git for
  1372. 45:23your company, for just a few thousand
  1373. 45:24dollars in tokens. They also call out a
  1374. 45:26thing that is important to understand.
  1375. 45:27They're doing this both to address their
  1376. 45:29own software development needs, but also
  1377. 45:30to test Claude's capabilities, to see
  1378. 45:32what it can do. Practically speaking,
  1379. 45:34it's difficult to offer Scion in a form
  1380. 45:36that would be broadly useful to other
  1381. 45:37organizations. It diverges significantly
  1382. 45:39from Git, meaning companies would need
  1383. 45:40to migrate every piece of the
  1384. 45:42development life cycle, and it requires
  1385. 45:43its own code review, code search, and
  1386. 45:46CI. Their internal version of these
  1387. 45:47components are highly bespoke, and they
  1388. 45:49would be difficult for other
  1389. 45:50organizations to adopt. And they worry
  1390. 45:52that attending to build a public version
  1391. 45:53that tries to please everybody wouldn't
  1392. 45:55actually be very useful. Okay, I know
  1393. 45:57what this paragraph is here for. There
  1394. 45:59was a conversation internally about
  1395. 46:01whether or not they could sell what they
  1396. 46:02built. The people who built it said,
  1397. 46:04"No, [ __ ] you. We're not going to do
  1398. 46:06that. Here's all the reasons why it
  1399. 46:07doesn't make sense." Enterprise sales
  1400. 46:09finally probably gave us like, "Okay,
  1401. 46:11whatever. We don't have to sell this."
  1402. 46:13And then they wanted to talk about it.
  1403. 46:14And coms is like, wait, wait, wait,
  1404. 46:15people are going to ask for this. So,
  1405. 46:17they had to take all the arguments they
  1406. 46:19had internally and do this so that I can
  1407. 46:21justify now as I read this to you why
  1408. 46:24they are not open sourcing this for
  1409. 46:25others to use. Okay, more justification.
  1410. 46:27Let's see this part. However, they
  1411. 46:29anticipate that this class of problems
  1412. 46:30will become more commonplace over the
  1413. 46:32next 6 to 12 months. And it would be an
  1414. 46:34inefficient use of engineering resources
  1415. 46:35and tokens. Every company using Git to
  1416. 46:37face similar challenges alone. Given
  1417. 46:39that, we think the most impactful thing
  1418. 46:41we can do is share our thinking so that
  1419. 46:43other devs can apply some of the most
  1420. 46:45successful parts of Syon to get without
  1421. 46:47departing from the overall model. A Git
  1422. 46:49server doesn't have to work the same way
  1423. 46:51as a Git client does. Novel server
  1424. 46:52architectures exist that provide
  1425. 46:54significant scaling improvements. Git
  1426. 46:56platforms can provide comprehensive
  1427. 46:58server-side RPCs like Syon, perhaps even
  1428. 47:01in a standardized way across forges that
  1429. 47:03the Git clients can learn to talk to.
  1430. 47:05Negotiation protocol doesn't have to
  1431. 47:07look exactly like it does today, either.
  1432. 47:09And the various sparse and shallow
  1433. 47:10features in Git can be made to compose
  1434. 47:12well. Lastly, they'd like to acknowledge
  1435. 47:14that the Git community has spent nearly
  1436. 47:16two decades scaling the platform for
  1437. 47:18millions of devs. Their contribution is
  1438. 47:20far narrower. They're sharing their
  1439. 47:21early views into how a genetic software
  1440. 47:23development interacts with these
  1441. 47:24systems. They can partner with GitHub,
  1442. 47:25GitLab, and the open source community to
  1443. 47:28support the changing needs of devs.
  1444. 47:30We're all in it together as the software
  1445. 47:31development life cycle intersects with
  1446. 47:33the AI exponential. It's crazy how
  1447. 47:35something like this would have felt
  1448. 47:37comical a year ago. And now it's almost
  1449. 47:40like, yeah, of course. Makes a lot of
  1450. 47:42sense. I'm going to go fight the urge to
  1451. 47:44make my own Git clone.
  1452. 47:46It's going to be hard, but I'll do my
  1453. 47:48best. I hope you enjoyed this deep dive.
  1454. 47:50I know I did. I love these types of
  1455. 47:51nerdy rants, and this was a very fun one
  1456. 47:53for me getting to go deep on how source
  1457. 47:55control works and how to make it scale
  1458. 47:57the way that agents need. Do you still
  1459. 47:58enjoy these deep dives or do you just
  1460. 48:00want to see me vibe code more? Let me
  1461. 48:01know in the comments and until next
  1462. 48:02time,
  1463. 48:03peace nerds.

About this transcript

This page contains the full transcript of Anthropic Rebuilt Git (yes really) by Theo - t3․gg, generated from the public captions YouTube serves with the video. The transcript has 9,843 words across 1,463 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.