English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Claude Code Deep Dive: Alien Tech in Your Terminal — Architecture, Leaked Features, and the 59.8MB Source Map Leak

Forum topic · 小凯 · 2026-04-08

Summary

An in-depth analysis of Claude Code, Anthropic's terminal-based AI coding agent, sparked by an accidental source code leak on March 31, 2026. A developer discovered a 59.8MB cli.js.map file in the @anthropic-ai/claude-code v2.1.88 npm package, exposing 512,000 lines of TypeScript across 1,900 files and 44 unreleased feature flags — the company's second source leak after a similar incident in February 2025. The article breaks down Claude Code's three-layer architecture (Core conversation layer, Delegation layer with up to 10 parallel subagents, and Extension layer with MCP, Hooks, Skills, and Plugins), its five permission modes, deterministic hook system, and 23-layer Bash security checks. Leaked features include a Dream memory consolidation system, KAIROS always-on background assistant, ULTRAPLAN cloud-based planning, an Undercover mode that hides AI attribution in employee open-source contributions, and hidden model codenames like Capybara and Tengu. Commercially, Claude Code reportedly reached $2.5B ARR in 8 months with 71% developer adoption among agentic coding tools. The piece contrasts it with Copilot and Cursor and closes with a caution: exponential technical progress outpaces linearly improving engineering culture.

Key points

  • On March 31, 2026, a 23-year-old intern (Chaofan Shou, @Fried_rice) discovered a 59.8MB cli.js.map source map file in @anthropic-ai/claude-code v2.1.88 on npm — a debugging artifact that should never ship to production.
  • The leak exposed 512,000 lines of TypeScript, 1,900 files, and 44 unreleased feature flags. A GitHub mirror (claw-code) hit 75,700 stars in 2 hours (a platform record) with 41,500 forks.
  • This was Claude Code's second source leak; the first occurred on February 24, 2025 — launch day. The cause: a missing *.map line in .npmignore.
  • Architecture: an agentic OS, not a CLI tool

    The article describes Claude Code as a three-layer agent operating system:

    1. Core Layer — the main conversation context (200K tokens standard, up to 1M on Opus 4.6). Every message, file read, and tool output consumes context; this layer "burns money." 2. Delegation Layer — Subagents (up to 10 in parallel: Explore, Plan, General-purpose, Custom) run in clean contexts and return only summaries, keeping exploratory work out of the main conversation. 3. Extension Layer — MCP (external services like databases, GitHub, Sentry), Hooks (guaranteed shell execution), Skills (domain expertise), and Plugins (distributable bundles).

    Four core systems

  • Configuration: cumulative three-tier hierarchy — User (~/.claude/CLAUDE.md), Project (./CLAUDE.md), and Managed (.claude/managed-settings/), with later tiers overriding earlier ones.
  • Permissions: five modes from default (ask before every edit) to bypassPermissions (fully automatic, dangerous), plus acceptEdits, delegate, and dontAsk.
  • Hooks: deterministic code triggered on events (PreToolUse, PostToolUse, UserPromptSubmit, Stop, TaskCompleted, etc.), in three types — Command, Prompt (single LLM judgment), and Agent (multi-turn subagent verification). The core philosophy: "Prompts aren't guaranteed; Hooks are."
  • MCP: Anthropic's open protocol exposing Tools, Resources, and Prompts, with 3,000+ integrations.
  • Leaked "alien tech"

  • Dream memory system: background consolidation of 24-hour memory fragments, akin to sleep.
  • KAIROS mode: an always-on 24/7 background assistant that proactively watches the filesystem, repos, and email.
  • Buddy: a Tamagotchi-style terminal pet with 18 species and 5 rarity tiers, deterministically generated from a user ID hash.
  • Undercover mode: on by default and non-disableable, it hides the "Claude Code" name, model codenames, and version numbers when Anthropic employees contribute to open-source projects, and omits Co-Authored-By lines.
  • ULTRAPLAN: offloads complex planning to cloud Opus 4.6 with up to 30 minutes of thinking time.
  • Hidden codenames: Capybara, Tengu, Fennec, Mythos; Fast Mode is internally "Penguin Mode"; Computer Use is "Chicago."
  • Security model and business results

    Claude Code's safety philosophy is pre-flight inspection rather than post-hoc review: unlike Copilot (passive suggestions) or Cursor (undoable edits), every Claude Code edit passes hook-based checks. Leaked code reveals 23 Bash security scripts covering dangerous command detection, credential leakage, network request auditing, and filesystem boundary checks.

    Reported commercial metrics:

  • $2.5B annualized revenue in 8 months
  • 71% developer adoption in agentic coding tools; 46% favorite rating (Copilot: 22%)
  • ~4% of daily GitHub commits (~135,000/day)
  • 90% of Anthropic's own code AI-written; 95% first-try correctness; METR benchmark equivalent to 14.5 human-expert hours
  • Technical debt and comparison

    The leak also exposed recurring failures: the same source map mistake twice in ~13 months, missing basic CI/CD checks (a 10-line bash script would have prevented it), a known Bun bug (filed March 11) that still generated source maps in production, and a second incident on March 26 where a CMS misconfiguration exposed Mythos model info.

    The article frames three generations of AI coding tools: Copilot as co-pilot (steering suggestions), Cursor as driving coach (reading the road), and Claude Code as a chauffeur (you describe the goal; it reads files, plans, codes, runs tests, self-corrects, and returns results).

    Conclusion

    Claude Code is genuinely "alien tech" — a terminal-based AI OS with layered architecture, parallel subagents, hook-driven security, and a mature MCP ecosystem. But it also reveals "Earth problems": a multi-billion-dollar AI-safety-branded company leaked its source twice by forgetting one .npmignore line. The takeaway: technology improves exponentially, but engineering culture improves only linearly.

    References

  • Official site: https://www.anthropic.com/claude-code
  • Docs: https://code.claude.com/docs
  • GitHub: https://github.com/anthropics/claude-code
  • Leak analysis: https://claudefa.st/blog/guide/mechanics/claude-code-source-leak
*Note: the leaked code has not been independently verified by this publication; treat specific feature claims as unconfirmed.*

Tags

#claude-code#anthropic#ai-coding#source-leak#agentic-os#mcp#developer-tools#security

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177169661