Claude Code leak shows it's not an API wrapper but a full-blown operating system

The leak of Claude Code's source code (512,000 lines) shows it is not a simple wrapper around the GPT API but a complex operating system for AI agents. The code contains mechanisms for self-recovery, computer vision and tool filtering. Internal names such as "Fenix" and "Tengu" and a "Penguin mode" suggest Anthropic was building a full AI OS rather than just an application.

AI-processed from Habr AI; edited by Hamidun News
Claude Code leak shows it's not an API wrapper but a full-blown operating system
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Size of the leaked code512,000 lines
Number of feature flags44
Game layera Tamagotchi-style pet system with the names Tengu, Fennec, and a Penguin mode

The leak of the Claude Code source code, Anthropic's command-line AI agent, has revealed far more than commentators expected in the first days of discussion. 512,000 lines of code and 44 feature flags became publicly available, along with a Tamagotchi-style "pet" game system with internal names such as Tengu, Fennec and Penguin mode. As the author of a Habr article writes, while the internet argued over whether this was a toy or serious architecture, something else proved far more important: the leak showed for the first time how the thinking of an AI agent actually works, one that brings Anthropic $2.5 billion in revenue per year.

What exactly leaked

The leak is not just a couple of files but a substantial snapshot of the product's internals: more than half a million lines of code and dozens of feature toggles, each of which enables or disables a separate capability of the agent. The presence of 44 feature flags in itself points to a mature engineering culture inside Anthropic: the team clearly rolls out changes gradually, testing new mechanics on a subset of users rather than shipping everything at once.

The game elements, a Tamagotchi-like pet system with the names Tengu, Fennec and a Penguin mode, were what spread first across social media and other outlets: amusing details are easy to quote and discuss. But in the Habr author's view, the focus on them distracted from the far more significant engineering underneath, hidden behind cute names.

What is known about the leak:

  • Size of the leaked code: 512,000 lines
  • Number of feature flags: 44
  • Game layer: a Tamagotchi-style pet system with the names Tengu, Fennec, and a Penguin mode
  • Estimated annual revenue of the product: $2.5 billion
  • The author's key conclusion: Claude Code is built not as an API wrapper but as a full operating system for an AI agent

Half a million lines of code is a size comparable to large standalone software products, not a thin layer that simply forwards the user's request to a language model API and returns the answer. It was the scale of the leak that led the Habr author to revise the previously common notion that command-line AI agents are primarily a convenient interface on top of someone else's model rather than an independent, complex engineering system.

Three engineering patterns behind the game facade

Behind the pet names, according to the author, lies a hard engineering reality: three patterns that turn Claude Code from an "expensive autocomplete" into a serious product. The first is a self-healing request loop: a mechanism that lets the agent keep going when an individual step fails, resuming work cleanly and finishing the task even if something went wrong at an intermediate stage. The second is computation during sleep, meaning that part of the processing runs not during direct interaction with the user but in a background, deferred mode, which lets the product work more efficiently without constantly loading the live conversation.

The third is a two-tier feature-pruning system that determines which of the agent's capabilities are available at a given moment, depending on context, the stage of the task or flag-system settings.

Why this changes the conversation about AI agent architecture

The article's main thesis is that what looks at first glance like an amusing product detail, a Tamagotchi, funny mode names, is in fact the visible part of a serious engineering system for managing the agent's complex behavior. Anthropic accidentally exposed not a list of marketing features but the working architecture of one of the most successful agent products on the market, with revenue of $2.5 billion a year, which places Claude Code among the most commercially successful AI tools for developers.

For engineers building their own agents, the leak is a rare chance to see how a real production system handles resilience (what to do when a request fails), efficiency (how to distribute computation over time) and complexity management (how to safely switch functionality on and off for different users). These three patterns, not the game mechanics, are what explain, in the author's view, why Claude Code was able to grow from a code autocompletion tool into a full operating system for an AI agent.

Story

Key Questions Answered

What exactly leaked?

The leak is not just a couple of files but a substantial snapshot of the product's internals: more than half a million lines of code and dozens of feature toggles, each of which enables or disables a separate capability of the agent. The presence of 44 feature flags in itself points to a mature engineering culture inside Anthropic: the team clearly rolls out changes gradually, testing new mechanics on a subset of users rather than shipping everything at once. The game elements, a Tamagotchi-like pet system with the names Tengu, Fennec and a Penguin mode, were what spread fi

What are the key details on Three engineering patterns behind the game facade?

Behind the pet names, according to the author, lies a hard engineering reality: three patterns that turn Claude Code from an "expensive autocomplete" into a serious product. The first is a self-healing request loop: a mechanism that lets the agent keep going when an individual step fails, resuming work cleanly and finishing the task even if something went wrong at an intermediate stage. The second is computation during sleep, meaning that part of the processing runs not during direct interaction with the user but in a background, deferred mode, which lets the product work m

Why this changes the conversation about AI agent architecture?

The article's main thesis is that what looks at first glance like an amusing product detail, a Tamagotchi, funny mode names, is in fact the visible part of a serious engineering system for managing the agent's complex behavior. Anthropic accidentally exposed not a list of marketing features but the working architecture of one of the most successful agent products on the market, with revenue of $2.5 billion a year, which places Claude Code among the most commercially successful AI tools for developers. For engineers building their own agents, the leak is a rare chance to see

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…