How Claude Code Works: Architecture & Internals
A technical deep-dive into Claude Code's internal mechanisms, based on official Anthropic documentation and verified community analysis.
Author: Florian BRUNIAUX | Contributions from Claude (Anthropic)
Reading time: ~25 minutes (full) | ~5 minutes (TL;DR only)
Last verified: February 2026 (Claude Code v2.1.34)
本篇目录
- Source Transparency
- Where Claude Code Sits in the Harness Stack
- TL;DR - 5 Bullet Summary
- Visual Overview
- Table of Contents
- 1. The Master Loop
- 2. The Tool Arsenal
- 3. Context Management Internals
- 4. Sub-Agent Architecture
- 5. Permission & Security Model
- 6. MCP Integration
- 7. Advanced Tool Use Patterns (API)
- 8. The Edit Tool: How It Actually Works
- 9. Session Persistence
- 10. Philosophy: Less Scaffolding, More Model
- 11. Claude Code vs Alternatives
- 12. Sources & References
- 13. Appendix: What We Don't Know
- Contributing
- Anthropic API Patterns for Architects
- Go further