claude-code-from-source
Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps
- 3k stars
- 821 forks
- 3 open issues
- Language: TypeScript
- License: no standard licence
- updated
Install
git clone https://github.com/alejandrobalderas/claude-code-from-source- Clone the repository.
- Follow the README for installation and usage instructions.
Editor's note
This repository is a free, online technical book spanning 18 chapters and roughly 400 print-equivalent pages, derived from studying TypeScript source maps that Anthropic inadvertently shipped inside Claude Code's npm package. The author recovered the original TypeScript through the `sourcesContent` field of those source maps, then wrote original pseudocode and prose to document the architecture without reproducing proprietary code. Coverage includes Claude Code's six core abstractions, its five-phase bootstrap pipeline, the agent loop in `query.ts`, a 14-step tool execution pipeline, concurrent tool partitioning, multi-agent swarm coordination, a four-layer context compression strategy, file-based memory with LLM-driven recall, MCP integration across eight transports, and terminal UI rendering via a custom Ink fork. A standout detail is the fork-agent prompt cache trick, where parallel sub-agents share byte-identical prefixes to reduce input token costs by roughly 95 percent. The material targets senior engineers building agentic systems, architects evaluating design trade-offs, and anyone who wants a detailed internal view of how Claude Code works.
Tools overview
What people ask about claude-code-from-source
What is alejandrobalderas/claude-code-from-source?
alejandrobalderas/claude-code-from-source is tools for the Claude AI ecosystem. Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps It has 3k GitHub stars and its last recorded update is dated 2026-04-04.
How do I install claude-code-from-source?
You can install claude-code-from-source by cloning the repository (https://github.com/alejandrobalderas/claude-code-from-source) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is alejandrobalderas/claude-code-from-source safe to use?
Our security agent has analyzed alejandrobalderas/claude-code-from-source and assigned a Trust Score of 44/100 (tier: Caution). See the full breakdown of passed checks and flags on this page.
Who maintains alejandrobalderas/claude-code-from-source?
alejandrobalderas/claude-code-from-source is maintained by alejandrobalderas. The last recorded GitHub activity is dated 2026-04-04, with 3 open issues.
Are there alternatives to claude-code-from-source?
Yes. On ClaudeWave you can browse similar tools at /categories/tools, sorted by popularity or recent activity.