Reading view

There are new articles available, click to refresh the page.

不开玩笑,Claude Code源码泄露,50万行代码被扒光

世界是个巨大的草台班子。

今天下午,开发者 Chaofan Shou 发了一条推文,直接放出了 Anthropic 最新命令行工具 Claude Code 的完整源码压缩包 src.zip。

这条推文迅速在开发者圈子里炸开,几个小时内浏览量突破 530 万。

评论区瞬间热闹起来,用户 @ai_for_success 只说了一句:「快给 Dario 打电话!」(Dario Amodei 是 Anthropic 的 CEO);

有网友直接爆粗:「见鬼了。」另一位开发者 @realsigridjin动作更快,已经把泄露的源码备份到了 GitHub,仓库名叫 instructkr/claude-code,标注为「Claude Code Snapshot for Research」。

也就是说,即便 Anthropic 紧急删除原文件,代码也已经在开源社区里永久留存了。这次泄露的体量相当惊人:近两千份文件、超过五十万行 TypeScript 代码,全部在网上裸奔。

▲附上地址🔗 https://github.com/instructkr/claude-code

只是,这么大一家 AI 独角兽,核心代码怎么就泄露了?答案说出来都让人哭笑不得:他们往 npm 发包的时候,忘了删 .map 文件。

不过,当全球开发者蜂拥扑向这份源码时,很难不发出惊叹,因为在这份本不该公开的代码里,除了 Claude Code 源代码,Anthropic 藏着一整套极其浪漫又硬核的 AI 蓝图:

有能在终端里陪你写代码的赛博宠物,还有会在半夜自己「做梦」整理记忆的常驻 AI 助手。

一场史诗级的公关灾难,硬生生变成了一场震动业界的「野生发布会」。

一次低级失误,撕开了 Claude Code 的秘密

在聊那些让人兴奋的未来功能之前,得先看看 Anthropic 眼下有多狼狈。

如果你最近用过 Claude 的 API,大概率遇到过一个诡异的问题:你的使用额度像漏水的浴缸一样,以完全不正常的速度疯狂往下掉。目前 Anthropic 官方还在焦头烂额地排查这个让 Token 消耗暴增的 Bug。

屋漏偏逢连夜雨,Token Bug 还没修好,底裤又被扒了。

这次闯祸的 .map 文件(Source Map),前端和 Node.js 开发者都不陌生。

它的作用是把压缩、混淆后的生产代码映射回原始源码,方便开发者本地调试。但正式发布到 npm 这类公共镜像库时,删掉 .map 文件是写在每本新手教程第一页的基本操作。

然而,一向把「安全、谨慎」挂在嘴边的 Anthropic,居然犯了这种实习生级别的错误。

泄露的架构本身也足够震撼:四十多个功能模块组成工具层,涵盖文件读写、Bash 执行到子 Agent 生成;一个近五万行的推理核心 QueryEngine.ts 负责思维链调度;还有多智能体调度器 coordinator 和 IDE 桥接模块。

除此之外,开发者们从源码里扒出的未发布功能,信息量大得惊人。

其中,在所有泄露的隐藏功能中,代号 BUDDY 的项目讨论度最高。用户 @baanditeagle 在 Chaofan Shou 原帖的评论区贴出了 BUDDY 功能的截图,让整个讨论彻底沸腾。

想象一下这个画面:你正对着黑底白字的终端敲代码,突然,输入框旁边弹出一个像素风的对话气泡,里面住着一只专属于你的赛博宠物。它的设定十分细致:

  • 宠物根据你的用户 ID 哈希值生成,每个人孵出来的都是独一无二的。
  • 代码里预设了 18 种生物,有鸭子、龙、六角恐龙(axolotl)、水豚、蘑菇,甚至还有幽灵。
  • 宠物分「普通」到「1% 传奇」的稀有度,还有各种帽子外观和类似宝可梦的「闪光(Shiny)」变体。
  • 赛博宠物有五项动态数值:DEBUGGING(调试力)、PATIENCE(耐心)、CHAOS(混沌)、WISDOM(智慧),以及最亮眼的——SNARK(阴阳怪气值)。
  • 第一次孵化时,Claude 还会根据这些数值实时生成宠物的名字和性格,配上精灵图动画和漂浮的爱心特效。

这多少让人想起当年微软 Office 那个烦人的「大眼夹(Clippy)」。但 BUDDY 可以说是它的终极进化版。

有趣的是,源码显示,这个功能原计划 4 月 1 日到 7 日作为彩蛋预热,5 月份先向 Anthropic 员工内测。但现在,全世界都提前知道了这个惊喜。

一个会做梦的 AI,和睡不着的 Anthropic 团队

如果说 BUDDY 是工程师的浪漫彩蛋,那代号 KAIROS 的功能,就彻底暴露了 Anthropic 在 AGI 路径上的野心。

我们现在和大模型对话,基本都是「阅后即焚」的。关掉网页,新开对话,一切从头来过。KAIROS 想打破这个局面,它被定义为「Always-On Claude(永远在线的克劳德)」。

这不只是一个长文本记忆库。KAIROS 能在不同会话之间保持持续记忆,把你的工作习惯、项目背景存在一个私密目录里。它甚至有权限主动发起任务。

此外,代码里还有一个名为 Nightly Dreaming(夜间做梦)新的机制。

怎么理解呢?在人类生理机制中,睡眠时的「做梦」是大脑整理白天碎片记忆、清除无用突触、巩固重要信息的关键过程。

Anthropic 把这个仿生学概念引入了 AI。为了防止长期记忆日志无限膨胀、导致逻辑混乱,KAIROS 会在夜间自动启动「做梦」进程。代码里甚至详细处理了午夜跨日的时间戳问题,确保做梦进程不会中断。

具体而言,在这个进程中,Claude 会像人脑一样在后台回溯你当天的交互,剔除冗余信息,把核心内容沉淀为长期记忆。

AI 白天帮你写代码,深夜你睡着后,它独自在服务器里「做梦」来更懂你。把一个冷冰冰的工程问题(上下文窗口压缩与检索)变成充满生命隐喻的解决方案,这种产品思路确实让人眼前一亮。

除了 BUDDY 和 KAIROS,源码里还藏着更多东西:

  • ULTRAPLAN:支持在云端进行长达 30 分钟的远程深度规划。也就是说,Claude 不再只是给几行代码建议,而是能接管整个系统架构的构思和推演。
  • Coordinator Mode(协调者模式):这可能是通往终极 Agent 的关键。在这个模式下,一个主 Claude 实例可以同时生成并管理多个「工人 Agent」,让它们并行处理复杂的工程任务。

可以说,当其他大模型还在卷跑分、卷多模态效果的时候,Anthropic 已经尝试在系统底层悄悄搭建一套完整的「数字员工生态」:有记忆(KAIROS),有规划能力(ULTRAPLAN),有团队协作(Coordinator),甚至还有情绪陪伴(BUDDY)。

如无意外,Anthropic 的工作人员大概正在经历一个不眠之夜,。Token 消耗 Bug 还没解决,又来了史诗级源码泄露,对任何科技公司来说都是灾难。

但这场灾难又让人感慨万千。

在 AI 行业越来越充斥着 PPT 画饼、期货发布和同质化竞争的今天,Anthropic 用一种最尴尬、最不体面的方式,向外界展示了他们真正在做的东西有多前卫。

当然,也有人看到了更深的问题。用户 @QiyangYao 在评论区写道:

如果所有东西都像今天的 Claude Code 这样泄露,迟早有一天,某个黑客组织——会利用 AI 加上这些开放框架,搞出史上最具破坏性的事件。

看似滑稽的工程事故背后,是这家顶级 AI 公司在安全管理上的系统性漏洞。Anthropic 花了数十亿美元研究一个终极问题:如何让 AI 变得更像人类。这次泄露事件给出了一个意外的答案:不用急,先让人类变得更像 AI 就行了。

比如,学会在发布前自动执行一遍检查清单。

#欢迎关注爱范儿官方微信公众号:爱范儿(微信号:ifanr),更多精彩内容第一时间为您奉上。

Four Tied to N.Y.C. Shelter Contractor Are Charged in Corruption Inquiry

The arrests were part of an investigation that is also examining the conduct of a city councilwoman, her sister and the Brooklyn Democratic leader’s husband.

© David Dee Delgado for The New York Times

Councilwoman Farah Louis is part of the focus of a federal inquiry but is not expected to be arrested on Tuesday, people familiar with the investigation said.

Pentagon Weighs Using Anti-Drone Lasers Near D.C. Military Base

Sightings of drones around Fort McNair, the Army base where Defense Secretary Pete Hegseth and Secretary of State Marco Rubio live, have prompted consideration of deploying the new technology.

© Paul Ratje for The New York Times

The LOCUST, an anti-drone laser system that has been used recently along the border with Mexico, may be deployed in Washington to help protect the military base where Defense Secretary Pete Hegseth and Secretary of State Marco Rubio reside.

These Two Countries With Social Media Bans Aren’t Happy With Google and Meta

Indonesia says the two companies are violating its law that bars children under 16 from the social media. Australia has similar concerns.

© Bay Ismoyo/Agence France-Presse — Getty Images

Earlier this month, the Indonesian government announced that social media companies must deactivate accounts of users under 16 years of age and put age-verification systems in place.

Woman Spent Five Months in Jail After A.I. Linked Her to Bank Fraud Case

The police chief in Fargo, N.D., acknowledged “missteps” but stopped short of apologizing to Angela Lipps, a Tennessee resident who said she had never been to North Dakota before she was arrested.

© Angela Lipps

Angela Lipps outside her home in Elizabethton, Tenn., before she was arrested in July 2025. She spent five months in jail in Tennessee and North Dakota before she was released on Dec. 24.

Can You Fake Being Rich?

A spate of popular social media accounts offer advice on how to achieve an “old-money” look.

© Getty Images

The appearance of wealth, and how to get it, has become a hot topic on social media.

Can You Fake Being Rich?

A spate of popular social media accounts offer advice on how to achieve an “old-money” look.

© Getty Images

The appearance of wealth, and how to get it, has become a hot topic on social media.

Solutions to Saturday Mac riddles 353

I hope you enjoyed Saturday’s Mac Riddles, episode 353. Here are my solutions to them.

1: The future was here 25 years ago when the fastest land animal arrived.

Click for a solution

Cheetah (Mac OS X 10.0)

The future was here (launched under the tagline of ‘the future is here’) 25 years ago (released on 24 March 2001) when the fastest land animal (a cheetah, despite Mac OS X 10.0 being far from the fastest) arrived.

2: This atelier came with more than a marathon four years ago.

Click for a solution

Mac Studio M1

This atelier (a studio) came with more than a marathon (the first Apple silicon Mac to feature an M1 Ultra chip) four years ago (announced 8 March and released 18 March 2022).

3: Wicked fast at 40 MHz, its special effects impressed 36 years ago.

Click for a solution

Macintosh IIfx

Wicked fast (it was dubbed ‘wicked fast’) at 40 MHz (the clock speed of its 68030 CPU and bus), its special effects (FX) impressed 36 years ago (released 19 March 1990).

The common factor

Click for a solution

They each celebrated their anniversaries this month.

I look forward to your putting alternative cases.

Bernie Sanders, in the Bronx, Presses Kathy Hochul to Tax the Rich

Senator Bernie Sanders, speaking at a rally at Lehman College, lent his support to Mayor Zohran Mamdani’s effort to raise taxes on millionaires. The mayor was not present.

© Charly Triballeau/Agence France-Presse — Getty Images

Senator Bernie Sanders, who has traveled across the United States to argue for higher taxes on the wealthy, spoke to a large crowd at Lehman College in the Bronx on Sunday.

Henry C. Lee Dies at 87; Forensic Scientist Testified in Defense of O.J. Simpson

The Times called him “the world’s most highly regarded forensic criminologist,” but later in his career he faced accusations that he had hidden and fabricated evidence.

© Jessica Hill/Associated Press

Henry C. Lee in 2011 at the University of New Haven in Connecticut, where he was a professor for more than 50 years. He had many high-profile cases, but none drew more attention than the 1995 murder trial of O.J. Simpson.
❌