Claude Code Source Code Leaked, Over 500,000 Lines of Code Obtained by Developers

marsbitPublished on 2026-04-01Last updated on 2026-04-01

Abstract

Anthropic faces a major security incident as the complete source code for its AI tool Claude Code, exceeding 500,000 lines of TypeScript, was leaked. The breach originated when a developer shared a compressed file on Twitter, which quickly gained over 5.3 million views. The exposure was due to Anthropic accidentally including .map files when publishing to npm, revealing core code. The leaked code unveils several advanced features, including a project codenamed BUDDY, which offers a personalized cyber pet system with traits like debugging power and even a "sarcasm value." Another feature, KAIROS, aims to create an "always-on" AI assistant capable of maintaining memory across sessions and initiating tasks. The code also includes a "Nightly Dreaming" mechanism, allowing Claude to organize information and consolidate core content while the user sleeps. Despite the breach, the incident has inadvertently showcased Anthropic's innovative capabilities, turning a PR crisis into an unexpected demonstration of their cutting-edge AI developments.

Recently, artificial intelligence company Anthropic encountered an unprecedented crisis when the complete source code of its latest tool, Claude Code, was accidentally leaked within the developer community. The incident began when a developer, Chaofan Shou, posted a compressed package containing over 500,000 lines of TypeScript code on Twitter, sparking widespread attention and discussion among developers globally. This leak quickly exploded online, with page views surpassing 5.3 million within hours, becoming a hot topic in the tech circle.

So, what was the cause of this leak? According to reports, when Anthropic published the code to npm, it actually forgot to remove the .map files, leading to the exposure of the core code. This mistake not only embarrassed the company but also raised external doubts about its security management. However, this accidental leak has given the outside world an early glimpse into some of Anthropic's cutting-edge functionalities in the AI field.

From the source code, it can be seen that Claude Code includes several astonishing features, with the project codenamed BUDDY being particularly notable. It can not only accompany developers in writing code but also has a unique personalized pet system, allowing users to incubate their own cyber pets based on personal information. This pet not only has a cute appearance but also has dynamic stats like debugging power and patience, and even a "sarcasm value," undoubtedly adding a lot of fun to the work atmosphere.

Even more forward-looking is the feature codenamed KAIROS, which aims to achieve an "always-on" AI assistant. Unlike traditional conversation methods, KAIROS can maintain memory across multiple sessions and proactively initiate tasks. Additionally, the source code includes a Nightly Dreaming mechanism, where Claude organizes information and consolidates core content while the user sleeps. This innovative concept not only makes the AI smarter but also brings new possibilities for future work methods.

Although Anthropic is currently busy dealing with this leak, the unexpected exposure might also provide a platform to showcase their cutting-edge technology. This accidental PR crisis has instead highlighted the company's innovative capabilities. The future of the AI field will become even more exciting because of such attempts.

Related Questions

QWhat was the cause of the Claude Code source code leak at Anthropic?

AAnthropic forgot to remove .map files when publishing the code to npm, which exposed the core source code.

QHow many lines of TypeScript code were leaked in the Claude Code incident?

AOver five hundred thousand lines of TypeScript code were leaked.

QWhat is the name of the project that features a personalized cyber pet system for developers?

AThe project is called BUDDY, which includes a personalized cyber pet system with traits like debugging power and patience.

QWhat is the KAIROS feature designed to do according to the leaked source code?

AKAIROS is designed to be an 'always-on' AI assistant that maintains memory across multiple sessions and can proactively initiate tasks.

QWhat mechanism does Claude have for processing information during user inactivity?

AClaude has a 'Nightly Dreaming' mechanism where it organizes information and consolidates core content while the user is sleeping.

Related Reads

DeepSeek Funding: Liang Wenfeng's 'Realist' Pivot

DeepSeek, a leading Chinese AI company, has initiated its first external funding round, aiming to raise at least $300 million at a valuation of no less than $10 billion. This move marks a significant shift from its founder Liang Wenfeng’s previous idealistic stance of rejecting external capital to maintain independence. Despite strong financial backing from its parent company, quantitative trading firm幻方量化 (Huanfang Quant), which provided an estimated $700 million in revenue in 2025 alone, DeepSeek faces mounting challenges. Key issues include a 15-month gap in major model updates, delays in its flagship V4 release, and the loss of several core researchers to competitors offering significantly higher compensation. The company is also undergoing a strategic pivot by migrating its infrastructure from NVIDIA’s CUDA to Huawei’s Ascend platform, a move aligned with China’s push for technological self-reliance amid U.S. export controls. However, DeepSeek lags behind rivals like智谱AI and MiniMax—both now publicly listed—in areas such as product ecosystem, multimodal capabilities, and commercialization. The funding round, though relatively small in scale, is seen as a way to establish a market-validated valuation anchor, making employee stock options more competitive and facilitating talent retention. It also signals DeepSeek’s transition from a pure research-oriented organization to a commercially-driven player in the global AI ecosystem.

marsbit24m ago

DeepSeek Funding: Liang Wenfeng's 'Realist' Pivot

marsbit24m ago

Solana Q1 Report: Revenue Plunges 68% Year-on-Year, Developers Decrease by 30%

Solana Q1 2026 Report: Key Metrics Show Significant Decline Amid Market Reset Solana experienced a substantial downturn in Q1 2026, with key performance indicators reflecting a broader market cooling. Total network revenue (REV) fell to $89.9 million, down 68% year-over-year (YoY) and 1.4% quarter-over-quarter (QoQ). This decline was driven by reduced speculative activity, which had previously fueled the network during the 2024/2025 bull market. Key revenue components saw mixed results: base fees dropped 8.7% QoQ, Jito tips (MEV) fell 19.7%, priority fees rose 23%, and vote fees declined 44.5%. The annualized real yield for stakers was just 0.17%, down 67% YoY. Network GDP, generated by top applications, fell 7% QoQ to $451 million. Pump Fun emerged as a standout, generating $103 million (up 3% QoQ), surpassing Solana's L1 revenue. However, daily active addresses averaged 2.4 million, down 4.8% YoY. Stablecoin supply on Solana reached $15.9 billion, down 2.7% QoQ but up 18% YoY. USDC and USDT remained dominant. DEX volumes averaged $3.2 billion daily, with private DEXs now accounting for 60% of all volume. The network's net dilution rate was 4.38%, while the cost to produce $1 of REV was $8.10, up 93% YoY. The number of new tokens created on launchpads grew 42% QoQ to 3 million, with Pump Fun dominating 85% of this market. Despite the downturn, Solana's core strengths remain: its position as a hub for retail trading apps, potential in perpetual markets, and growing use in stablecoin-based fintech applications, particularly in Latin America. However, developer activity declined 32% YoY, slightly worse than Ethereum's 29% drop. The network must now focus on attracting traditional finance, competing in perpetual markets, and sustaining developer ecosystem growth to drive the next expansion cycle.

marsbit1h ago

Solana Q1 Report: Revenue Plunges 68% Year-on-Year, Developers Decrease by 30%

marsbit1h ago

Trading

Spot
Futures
活动图片