{"repo":"thtskaran/claude-code-analysis","free":true,"listed":false,"github":"https://github.com/thtskaran/claude-code-analysis","clone":"git clone https://github.com/thtskaran/claude-code-analysis.git","description":"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.","language":null,"stars":124,"topics":["agentic-ai","ai-agents","anthropic","architecture-analysis","claude-code","cli-tools","llm-internals","mcp","react-ink","reverse-engineering"],"license":null,"category":"ai-agents","readme_excerpt":"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 outp","default_branch":null,"files":null,"tree":[],"storefront":"/r/thtskaran","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/thtskaran/claude-code-analysis/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}