Claude Code multi-agent

Claude Code Analysis

We read all 512K lines of Claude Code's accidentally exposed source. 82 docs, 15 diagrams, every subsystem mapped — from the hidden YOLO safety classifier to multi-agent swarms.

Install

From source
git clone https://github.com/thtskaran/claude-code-analysis.git

From the README

How Claude Code Actually Works
On March 31, 2026, a .map file in Claude Code's npm package accidentally exposed the full TypeScript source. We read all 512,000 lines. Here's everything we found.

The Stuff They Don't Tell You

Claude Code isn't just a chat-in-terminal wrapper. It's a 1,902-file TypeScript monolith with its own React rendering engine, a multi-agent swarm system, a two-stage AI safety classifier, and 88 hidden feature flags — many for features that don't exist yet.

Here are some of the things we found buried in the source:

There's a hidden AI that judges every command you run. Before Claude Code executes a tool call, a separate classifier called "YOLO" runs a two-stage evaluation. Stage 1 is a fast 64-token scan. If it's suspicious, Stage 2 does a full 4,096-token reasoning pass to decide: allow, deny, or ask the user. Temperature is zero. It errs on the side of blocking. → Full breakdown

Your conversations get secretly compressed. When context pressure exceeds 93%, Claude Code runs one of six compaction strategies — from lightweight microcompaction (clearing old tool results) to spawning an entire forked subprocess that summarizes your conversation into a 9-section format. You never see this happen. → How compaction works

It ships an entire React rendering engine for the terminal. Not a simple TUI library. A custom React Fiber reconciler, a Yoga flex-layout engine, a screen buffer with packed Int32Arrays, and a frame-diffing system that reduces terminal output from 10KB to 50 bytes on idle scroll. 7,743 lines of rendering code. → Ink pipeline deep dive

Multi-agent "swarms" communicate through files on disk. When Claude Code spawns parallel agents, they coordinate via a file-based mailbox system at ~/.claude/work/ipc/ with 500ms polling. The leader…
Read the full README on GitHub

Details

Last updated
2 April 2026
Topics
agentic-aiai-agentsanthropicarchitecture-analysisclaude-codecli-toolsllm-internalsmcpreact-inkreverse-engineeringsecurity-researchtypescript

FAQ

What is Claude Code Analysis?

We read all 512K lines of Claude Code's accidentally exposed source. 82 docs, 15 diagrams, every subsystem mapped — from the hidden YOLO safety classifier to multi-agent swarms. It is a multi-agent for Claude Code, from thtskaran/claude-code-analysis on GitHub.

How do I install Claude Code Analysis?

Clone thtskaran/claude-code-analysis from GitHub and follow the setup steps in its README.

Is Claude Code Analysis popular?

thtskaran/claude-code-analysis has 130 GitHub stars and 17 forks. It was last updated on 2 April 2026.

More multi-agent & worktrees

Browse the most popular Claude Code mods, all multi-agent & worktrees, or the skills and MCP server directories.