字号·· | 护眼
theregister

Anthropic重塑源代码管理,Claude向世界倾泻代码Anthropic reinvents source control as Claude floods the world with code

点「原文对照」整页切到原文,或双击某段只看那段的原文。

Anthropic 的 Claude 模型生成的代码量巨大,以至于该公司的编码基础设施已无法跟上。这是 AI 编码趋势和“无限次推理”模式的典型表现。今年 4 月,微软的 GitHub 发布了一篇博客文章,将近期的可用性问题的原因归咎于拉取请求和提交数量的指数级增长。包括学术界研究人员在内的多方都注意到了这场代码洪流。

Anthropic's Claude models have been emitting so much code that the company's coding infrastructure hasn't been able to keep up. It's a symptom of the AI coding imperative and all-you-can-eat inference. Microsoft's GitHub in April published a blog post attributing recent availability problems to the exponential growth in pull requests and commits. The code flood has been noted by academic researchers, among others.

对 Anthropic 而言,编写代码已不再是生产力的瓶颈。相反,问题在于代码生成后如何通过版本控制、构建系统和持续集成进行管理。“2026 年 5 月,Anthropic 平均每天合并约 2500 项代码变更;到 9 月时,我们每天合并的代码已超过 30000 项,”该公司周二在博客中写道。“我们不认为这种增长速度会在短期内放缓;合并代码的潜在需求几乎是无限的,而每消除一个瓶颈,都会立即导致我们生成的代码量进一步增加。”

For Anthropic, writing code is no longer a productivity bottleneck. Instead, the problem is managing the code after it's written, via source control, the build system, and continuous integration. "In May 2026, Anthropic averaged around 2,500 code changes merged per day; as of September, we merged over 30,000 per day," the biz said in a blog post on Tuesday. "We don’t expect this rate of growth to slow down anytime soon; the latent demand for merging code is practically infinite, and every bottleneck we remove immediately leads to a further increase in the amount of code we produce."

经过数月的模型提示优化和五个月的迁移,最终诞生了一个名为 Scion 的自制版本控制系统。这是一个单仓库方案,听起来与 Apache 的集中式版本控制系统 Subversion 有些相似。Anthropic 并非首个将目光从 Git 的分布式架构转向集中式版本控制的组织。Google 使用 Piper 这一单仓库系统(同时结合 Gerrit 进行基于 Git 的代码审查)。

After several months of model prompting and five months of migration, the result is a homemade version control system called Scion, a monorepo scheme that sounds a bit like Subversion, Apache's centralized version control system. Anthropic is not the first organization to look beyond Git's distributed architecture toward centralized source control. Google uses Piper, a monorepo system (along with Gerrit for Git-based code reviews).

微软则拥有用于 Git 的虚拟文件系统(Virtual File System,前身为 GVFS),以帮助克服 Git 在扩展性方面的一些问题。Meta 也有 Sapling。但正如 AI 行业所指出,Claude 的代码编写能力既造成了这一局面,也通过构建可扩展的代码基础设施工具提供了出路——除了 Scion,Claude 还帮助催生了 Antique(一个代码审查界面)、一款代码搜索工具以及一个版本控制 IAM 系统。Anthropic 认为,Git 所体现的去中心化方法对于大多数代码仓库而言是正确的选择。

Microsoft has Virtual File System for Git, formerly GVFS, to help overcome some of the scaling issues with Git. Meta has Sapling. But as the AI biz notes, Claude's code writing ability both created the situation and offered a way out through the creation of scalable code infrastructure tools – in addition to Scion, Claude helped conjure Antique (a code review interface), a code search tool, and a source control IAM system. The decentralized approach embodied by Git is the right one for most code repos, according to Anthropic.

但该公司主分支的规模约为 100 GB,压缩后的工作副本也占到了这一数字的四分之一以上。“在计算开发环境、代理沙盒和研究任务之前,我们每天为持续集成(CI)执行约 2500 万次代码检出,”Anthropic 表示。“如果直接获取,这每天将产生超过 600 PB 的 Git 流量。”尽管 Git 提供了用于处理代码库部分内容的工具,Anthropic 仍表示实际操作颇具挑战。

But the company's main branch weighs in at about 100 GB, with a compressed working copy at more than a quarter of that. "We perform on the order of 25 million code checkouts per day for CI, before counting developer environments, agent sandboxes, and research jobs," Anthropic said. "Fetched naively, that would be over 600 PB of git traffic per day." Even with the tools Git provides for working with portions of a codebase, Anthropic says operations proved challenging.

Scion 的设计旨在满足 AI 代理的需求,因此客户端将大量工作交给了服务器;版本控制查询通过 API 暴露,使内部工具无需本地仓库即可响应,同步需求减少,但对服务器速度的要求更高。“在 Scion 中,工作单元是‘变更集’,即预写日志中的一条记录,”Anthropic 解释道。“一个变更集存储了 Git 提交中大多数预期的内容。但 Git 提交存储的是对树结构的指针,而变更集则存储了相对于其第一个父节点发生变化的文件列表,以及对压缩文件内容在 Blob 存储中基于内容地址的指针。”

Scion has been designed to meet the needs of AI agents, so the client leaves much of the work to the server; the source control queries are exposed via API so internal tools can respond without needing a local repo, and there's less synchronization but more need for server speed. "In Scion, the unit of work is a 'changeset,' an entry in a write-ahead log," Anthropic explains. "A changeset stores most of what you’d expect from a commit in git. But where a git commit stores a pointer to the tree, a changeset stores a list of the files that changed relative to its first parent, along with content-addressed pointers to the compressed file contents in blob storage."

Scion 的开发始于今年 1 月,当 Claude Mythos Preview 在内部开放使用时,Anthropic 的“代码驯养者”便让该模型重写了早期的 Git 到 Scion 数据导入流程。这个备受关注的模型最终生成了一个内存使用量减少 20 倍、运行速度提升 4 倍的版本。在充足的风险投资支持下,成本不再是问题,这种“token 消耗”显然合情合理。

Work on Scion started in January, and when Claude Mythos Preview became available internally, Anthropic's code coaxers told the model to rewrite an early Git-to-Scion ingestion pipeline. The much-hyped model produced a version that used 20 times less memory and ran four times as fast. When cost is no object thanks to ample venture funding, that sort of token spending just makes sense.

Anthropic 的 Claude 专家们似乎对自身的过时并不感到沮丧。据 AI 行业消息,参与 Scion 开发的该公司开发者一致认为,Claude 编写的代码比他们更好。但他们仍然具备更高层次的理解能力,因此仍扮演着“唱反调者”的角色。“我们发现,工程师的角色往往就是告诉 Claude‘不行’,”Anthropic 表示。

Anthropic's Claude jockeys appear to be taking their obsolescence in stride. According to the AI biz, company developers who worked on Scion agree that Claude writes better code than they do. But they still possess a higher-level understanding that gives them a role as naysayers. "Very often, we found that the role of the engineers was to tell Claude 'no,'" Anthropic said.

“代理人有时会违反核心系统约束,以满足一种本不应被允许的模式。” “直接说不。” 作为一句口号,它永不过时。而且它从未像现在这样重要。Anthropic 表示,其定制系统不适合通用使用。不会有开源发布。然而,该公司认为,其自身的代码扩展问题将在未来几个月内成为其他组织的常见问题,因此它希望分享其方法——即拥有充足的资金来支付编写定制基础设施工具的费用。®

"Agents will sometimes violate core system constraints to satisfy a pattern that should never have been allowed in the first place." "Just say no." As a slogan, it's timeless. And it's never been more relevant. Anthropic says its bespoke system isn't right for general use. There will be no open source release. Nonetheless, the company contends that its own code scaling problems will become commonplace in other organizations over the next few months, so it wanted to share its approach – having ample funding to pay for writing custom infrastructure tools. ®