Home / Blog / Claude Code's Source Got Leaked. Here's What's Worth…
Tech News

Claude Code's Source Got Leaked. Here's What's Worth Learning

On March 31, 2026, Claude Code npm 2.1.88 shipped a 59.8MB source map, exposing about 1,900 TypeScript files and 512,000 lines of the agent harness.

By Dillip Chowdary • Oct 27, 2026 • Source: thoughts.jock.pl

Claude Code's Source Got Leaked. Here's What's Worth Learning

The leak write-up has architecture numbers and no model-launch flags, so the article will use only those facts, including a before/after table and the install warning the source actually names.On March 31, 2026, Claude Code npm package version 2.1.88 shipped with a 59.8MB source map, according to thoughts.jock.pl's report. Source maps are debug artifacts that Bun, the runtime Claude Code uses, generates by default, and this package was missing a *.map line in .npmignore. The map referenced unobfuscated TypeScript on Anthropic's Cloudflare R2 bucket: about 1,900 files and 512,000 lines, plus 44 feature flags. A GitHub mirror reached 84,000+ stars in under two hours, the fastest-growing repository in GitHub history.

Pawel Jozefiak, writing in Digital Thoughts on April 1, 2026, spent a night reading that code and building from it. The account is for people who make AI agents and want the harness: how Claude Code manages tools, memory, context, permissions, and multi-agent coordination. Anthropic confirmed a packaging error. Customer data, credentials, user conversations, API keys, and model weights were absent, so the files cannot run a separate Claude.

What shipped in Claude Code's Source Got Leaked. Here's

A security researcher spotted the odd file in version 2.1.88. Someone forgot to add *.map to .npmignore, a missing line in a config file, and Bun's default source map shipped at 59.8MB. The tree also includes Undercover Mode, built so Anthropic employees would not accidentally leak internal details into public repositories, and it left with the CLI source. Jozefiak says this is not a traditional security breach. It is a build artifact that should have been excluded, the kind of mistake a team shipping fast can make.

He writes that the drop was not intentional. April 1 timing and a cease-and-desist against the OpenCode project are why people debate it. Anthropic pulled the npm package, took the Cloudflare R2 bucket down, and has been mass-sending DMCA takedowns. Roadmap exposure during IPO preparation would be too costly, he says. Theo from t3.gg put it this way: "if you think this was intentional, I have a couple bridges for sale." Staff chasing higher rate-limit hits may have shipped source maps for error logs and forgotten to remove them.

What improved in Claude Code's Source Got Leaked. Here's

Jozefiak calls the three-layer memory the main architectural discovery. MEMORY.md is an always-loaded index of pointers, each entry under 150 characters. Topic files hold the detail and load when the index marks them relevant. Raw transcripts are never re-read in full. The agent greps them for identifiers. Skeptical memory treats a note as a hint, not a fact. The agent confirms that a function exists, and verifies a path, before it acts. That is his check on context entropy, when stale notes fill a long session.

ComparisonWithout this patternIn the leaked Claude Code source
Input tokens for five workers5× the input token costPay once for the shared prefix, then only the task-specific branch
MEMORY.md entryStale notes fill the live contextPointer under 150 characters, always loaded
Memory after consolidationUnbounded across sessionsUnder 200 lines and 25KB
Unchanged file, second readRead the file againSkip the read and use the cached version
Large tool resultFull payload returned to the modelFull result on disk; preview plus a file reference
Claude Code's Source Got Leaked. Here's What's Worth Learning
Illustration · Pexels

What you gain from Claude Code's Source Got Leaked. Here's

The leak shows 40+ discrete tools, each behind a permission gate, and every operation goes through a PermissionGate. Tool.ts, the largest file, is roughly 29,000 lines of tool types and permission schemas. If a file has not changed since the last read, the read is skipped and the cached copy is used. Most agent setups skip that check, he says, so the token savings compound. A large codebase search is written to disk in full. Context gets a preview plus a file reference.

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

On every turn change, when the model finishes and the user sends a new message, CLAUDE.md is reinserted beside that message, not at the top of the history. The instructions stay after the system prompt scrolls away. Jozefiak described his own file after 1,000+ sessions. Coordinator Mode is in the source and is not released. Five separate worker contexts would cost five times the input tokens. A shared prompt-cache prefix is paid once, and only the task-specific branch is extra. He says that leftover cost is still brutal.

How to get Claude Code's Source Got Leaked. Here's

Anthropic pulled the npm package for version 2.1.88, took down the Cloudflare R2 bucket behind the 59.8MB map, and is mass-sending DMCA takedowns to GitHub mirrors that reached 84,000+ stars in under two hours. Jozefiak warns against cloning them. The source imports internal workspace packages that are not on npm, and someone registered those names with a disposable email. A blind npm install in the clone can pull malicious code. Bun writes source maps by default, and .npmignore on this publish did not list *.map.

Command
# warned against inside a cloned mirror
npm install
Command
# .npmignore line missing from the 2.1.88 publish
*.map

Jozefiak has run his own agent for months on a dedicated Mac Mini, 24/7, with working memory that rolls over on a schedule and a permanent index across sessions. The leak matched that split. He is adding its check: confirm a remembered function or path in the codebase before acting. autoDream waits 24 hours, needs at least five sessions and a lock, then prunes memory under 200 lines and 25KB. Each MEMORY.md entry stays under 150 characters, and transcripts are only grep'd for identifiers.

Command
# MEMORY.md — core index, always loaded
# each entry under 150 characters
# topic files fetched on demand
# raw transcripts: grep for identifiers only
Command
# services/autoDream/ — forked subagent, read-only on the project
# gates: 24 hours since last run; at least 5 sessions; consolidation lock
# phases: orient, gather, consolidate, prune
# prune cap: under 200 lines and 25KB

What to watch after Claude Code's Source Got Leaked. Here's

Coordinator Mode stays unreleased. One Claude agent leads, workers run in parallel, and each worker has an isolated context plus restricted tool permissions. They send XML-structured task notifications and share a scratchpad directory. The coordinator prompt says "parallelism is your superpower." They share a prompt cache so five workers do not each pay a full input context, and Jozefiak still calls the cost math brutal. The 512,000 lines include no model weights. Undercover Mode shipped in that same public package.

Multiple employees had posted about higher Claude Code rate-limit hits than they expected. Jozefiak's theory is that source maps may have been left in for clearer production logs, a debug change nobody reverted, which is how he accounts for the 59.8MB file in version 2.1.88. Bun generates those maps unless *.map is excluded. He would keep an index under 150 characters, consolidation after 24 hours and five sessions, and memory under 200 lines and 25KB. He had already landed on that shared-prefix pattern himself.

Developer Action Items

  • ☐ Inventory whether Anthropic / Claude / GitHub runs in prod, CI, staging, or on laptops before you debate severity.
  • ☐ Confirm the vendor's fixed build for Anthropic / Claude / GitHub from HN Claude/Codex/Fable, then schedule the patch window.
  • ☐ If you cannot patch today, isolate the service, rotate tokens that sat on the affected surface, and raise the logging floor.
  • ☐ Record the decision and residual risk so the next on-call does not re-litigate whether you are exposed.

Claude Code's Source Got Leaked. Here's FAQ

Did Claude Code npm version 2.1.88 leak customer data or API keys?

No. Pawel Jozefiak writes that customer data, credentials, user conversations, and API keys were not in the package. Anthropic confirmed a packaging error. The files are CLI source, not a database.

Were Claude model weights included in the source map?

No. The leak is the software harness around Claude, covering tools, memory, context, permissions, and multi-agent coordination. Jozefiak writes that you cannot run your own Claude from it.

What is autoDream in the leaked Claude Code source?

autoDream, under services/autoDream/, is a background consolidation engine. It forks a read-only subagent only after 24 hours, at least five completed sessions, and a free consolidation lock, then prunes memory to under 200 lines and 25KB.

How does Claude Code's three-layer memory work?

MEMORY.md is an always-loaded index of pointers, each under 150 characters. Topic files load on demand. Raw transcripts are grep'd for specific identifiers and are never re-read in full. The agent verifies memories against the codebase before acting.

Is it safe to npm install a GitHub mirror of the leaked Claude Code repo?

Jozefiak warns against it. The source imports internal workspace packages that are not on npm, and someone registered those names with a disposable email, so a blind npm install can pull malicious code. Anthropic has pulled the original package.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →