Skip to main content
ClaudeWave
alejandrobalderas avatar
alejandrobalderas

claude-code-from-source

View on GitHub

Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps

Tools2.2k stars651 forksTypeScriptUpdated 2mo ago
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.

ClaudeWave Trust Score
67/100
· OK
Passed
  • Recently active
  • Healthy fork ratio
  • Clear description
  • Documented (README)
Flags
  • !No standard license detected
Last scanned: 6/11/2026
Get started
Method: Clone
Terminal
git clone https://github.com/alejandrobalderas/claude-code-from-source
1. Clone the repository.
2. Follow the README for installation and usage instructions.

Tools overview

README preview not available. Visit the repo on GitHub for full documentation.

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 2.2k GitHub stars and was last updated 2mo ago.

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 67/100 (tier: OK). 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 from 2mo ago, with 1 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.

Deploy claude-code-from-source to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: alejandrobalderas/claude-code-from-source
[![Featured on ClaudeWave](https://claudewave.com/api/badge/alejandrobalderas-claude-code-from-source)](https://claudewave.com/repo/alejandrobalderas-claude-code-from-source)
<a href="https://claudewave.com/repo/alejandrobalderas-claude-code-from-source"><img src="https://claudewave.com/api/badge/alejandrobalderas-claude-code-from-source" alt="Featured on ClaudeWave: alejandrobalderas/claude-code-from-source" width="320" height="64" /></a>

More Tools