Dev & Engineering source-code-analysisagent-loopcontext-engineeringsecuritymulti-agenttypescript

How Claude Code Works

Deep-dive architecture analysis of Claude Code: agent loop, context engineering, tooling, and security.

FollowAgents review · FARS-2.1
Not recommended
0/ 100 5-point scale 0.0 / 5
1 2 3 4 5 6
1Trust0 / 29 · 0.0/5

Evidence: The repository is an educational architecture analysis, containing no executable code or tools, so there is no actual implementation of least privilege, user confirmation, data flow transparency, sensitive data handling, dependency security, external effects, rollback, or source attribution. Deduction: These criteria are not applicable, but per rules, no evidence supports any score, hence all 0.

2Reliability0 / 14 · 0.0/5

Evidence: The repository is a documentation collection, with no executable code or tests, so self-consistency, dependency availability, and failure messages cannot be assessed. Deduction: No actual implementation to verify these criteria.

3Adaptability0 / 18 · 0.0/5

Evidence: README clearly identifies target audiences and scenarios, but the repository itself is not a runnable Agent, so capability boundaries, trigger precision, and environment fit are not implemented. Deduction: Documentation describes Claude Code's capabilities, not this repository's product, so these criteria are not applicable.

4Convention0 / 18 · 0.0/5

Evidence: Clear documentation structure, MIT license, update log, and contributor list exist, but missing install notes (not an installable product), naming stability (no API), examples and FAQ (docs but no FAQ), known limitations (roadmap but not explicit), versioning changelog (update log but no formal versions). Deduction: Partially satisfied, but many criteria are not applicable or evidence is insufficient.

5Effectiveness0 / 13 · 0.0/5

Evidence: Documentation provides in-depth technical analysis, offering marginal value to target audience, but output usability (no actual output) and cost-benefit (no execution cost) cannot be assessed. Deduction: As a documentation project, these criteria are not applicable.

6Verifiability0 / 8 · 0.0/5

Evidence: README claims analysis based on source snapshot and distinguishes inference from facts, but lacks specific citations or cross-validation sources. Deduction: Lack of traceable references and external verification, hence low scores.

Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision 4a1fe85d3dc6
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Safety controls not found in source: least-privilege scoping, confirmation before acting, data-flow disclosure, sensitive-data handling, dependency security, disclosed external effects, rollback or recovery path, verifiable attribution
Before you use it
  • This repository is a documentation project, not an executable Agent product.
  • Analysis is based on leaked source snapshots, may be inaccurate or outdated, and lacks specific citations.
  • Unverified publisher identity; treat the analysis with caution.
Review evidence [1][2]
See the full review method →

What does this agent do, and when should you use it?

how-claude-code-works is an in-depth architecture study of Anthropic's Claude Code, based on a snapshot of its 500k-line TypeScript source. The repository offers 21 topical documents covering the system main loop, context compaction, tool system, permission security, multi-agent collaboration, and more. It is bilingual (Chinese and English) with a Docsify online site and a companion project, claude-code-from-scratch. It's an unofficial educational project, disclaiming any affiliation with Anthropic.

This repository performs reverse engineering analysis of Claude Code's internals. It reads the source snapshot, extracts architectural decisions, and produces documentation. Documents use Mermaid diagrams to describe system flows and provide specific numbers (e.g., 235ms startup, 7-layer defense). The companion project claude-code-from-scratch offers TypeScript and Python implementations of about 4300 lines. The repository itself does not execute code but provides educational analysis.

  1. Developers wanting to learn production-grade coding agent architecture can read the main loop and context engineering chapters.
  2. Users aiming to deeply customize Claude Code can study Hooks, memory, and skills system chapters.
  3. Developers interested in AI safety can explore the 7-layer defense in the permission and security chapter.
  4. Students building a coding agent from scratch can follow the claude-code-from-scratch project.
  5. Users evaluating Claude Code's newer features (e.g., /goal, Auto Mode) can refer to black-box reverse engineering sections.

What are this agent's strengths and limitations?

Pros
  • Based on real source snapshot, offers concrete architectural details and metrics (e.g., 7-layer defense, 4-level compaction) rather than generalities.
  • Bilingual (Chinese primary), with 21 in-depth chapters, beneficial for Chinese-speaking developers.
  • Companion from-scratch project enables hands-on learning.
Limitations
  • Analysis is based on v2.1.6x snapshot and may be outdated; newer features rely on black-box reverse engineering with uncertain accuracy.
  • Unofficial and disclaimed; may not match actual Claude Code internals.
  • Requires technical background; documentation is dense and may have a steep learning curve.

How do you install or deploy this agent?

This repository is a documentation project, not traditional software. To run the docs site locally: git clone https://github.com/Windy3f3f3f3f/how-claude-code-works.git. Install Node.js and Docsify: npm i docsify-cli -g.

How do you use this agent?

cd how-claude-code-works, run docsify serve docs, then open http://localhost:3000 in your browser. Alternatively, read online at https://windy3f3f3f3f.github.io/how-claude-code-works/#/.

How does this agent compare with similar options?

The repository does not mention specific alternatives, but it can be compared to architecture analyses of other agent frameworks like LangChain or AutoGPT.

FAQ

Is this analysis official?
No. It's independent research; the authors state it does not represent Anthropic's official design and does not distribute Anthropic source.
Which version is the analysis based on?
It's based on a source snapshot from late March 2026 (approx. v2.1.6x); later versions may differ significantly.
Can I run the code in this repository?
The repository is documentation only; no executable code. To build an agent, use the companion project claude-code-from-scratch.
Is there an English version?
Yes, an English translation is available and can be toggled in the UI.

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents