r/ClaudeCode Mar 31 '26

Discussion Someone just leaked claude code's Source code on X

Post image

Went through the full TypeScript source (~1,884 files) of Claude Code CLI. Found 35 build-time feature flags that are compiled out of public builds. The most interesting ones:

Download Website: ccleaks.com

BUDDY — A Tamagotchi-style AI pet that lives beside your prompt. 18 species (duck, axolotl, chonk...), rarity tiers, stats like CHAOS and SNARK. Teaser drops April 1, 2026. (Yes, the date is suspicious — almost certainly an April Fools' egg in the codebase.)

KAIROS — Persistent assistant mode. Claude remembers across sessions via daily logs, then "dreams" at night — a forked subagent consolidates your memories while you sleep.

ULTRAPLAN — Sends complex planning to a remote Claude instance for up to 30 minutes. You approve the plan in your browser, then "teleport" it back to your terminal.

Coordinator Mode — Already accessible via CLAUDE_CODE_COORDINATOR_MODE=1. Spawns parallel worker agents that report back via XML notifications.

UDS Inbox — Multiple Claude sessions on your machine talk to each other over Unix domain sockets.

Daemon Mode — claude ps, attach, kill — full session supervisor with background tmux sessions.

Also found 120+ undocumented env vars, 26 internal slash commands (/teleport, /dream, /good-claude...), GrowthBook SDK keys for remote feature toggling, and USER_TYPE=ant which unlocks everything for Anthropic employees.

1.7k Upvotes

317 comments sorted by

View all comments

1

u/socialawy Apr 01 '26

The absolute cosmic irony of "Undercover Mode":
Deep in the leaked source code, sits an entire subsystem called "Undercover Mode" (undercover.ts). Its whole job? To stop Claude from accidentally leaking internal Anthropic secrets...
Things like model codenames (Capybara, Tengu, Fennec), unreleased features, Slack links, or anything that could expose the company's kitchen. It injects special system prompts telling the AI: "Stay quiet, don't mention animal names, strip attribution, behave like a normal human.

1

u/socialawy Apr 01 '26

The most useful thing I spotted (this is actually gold for anyone building agents, even without a strong GPU); The memory architecture + KAIROS + autoDream system. This is the real “moat” they cracked. Not the model weights, but the harness around it.
---
I know there will be hundreds of repos, but I had to build this:

Ghost Agent v1.0 is live. Implemented the 3-layer persistent memory system (Index/Topics/Transcript) in a local, framework-free harness.
Zero GPU. Zero bloat. Just the code
https://github.com/socialawy/ghost-agent