Learn Claude Code
An open-source, 12-session educational repository that teaches harness engineering for real AI agents by reverse-engineering Claude Code's architecture from scratch.
At a Glance
Fully free and open-source under the MIT License. Clone, use, modify, and distribute without restriction.
Engagement
Available On
Alternatives
Listed May 2026
About Learn Claude Code
Learn Claude Code is an open-source educational repository that teaches developers how to build agent harnesses — the tools, context management, permissions, and environment infrastructure that surround a model and make it effective in a specific domain. Structured as 12 progressive sessions, it reverse-engineers Claude Code's architecture from a minimal agent loop all the way to isolated, autonomous multi-agent teams. The project is written primarily in TypeScript and Python, licensed under MIT, and includes an interactive Next.js web platform for visualizations and step-through diagrams.
- s01–s02: The Agent Loop & Tool Use — Start with
python agents/s01_agent_loop.pyto build the minimalwhileloop that drives every agent; add tools by registering handlers in a dispatch map. - s03–s06: Planning & Knowledge — Learn TodoWrite for structured planning, subagent isolation with independent
messages[], on-demand skill loading viatool_result, and three-layer context compression for infinite sessions. - s07–s08: Persistence — Build a file-based task graph with dependency ordering; run slow operations in daemon threads with notification injection so the agent keeps thinking.
- s09–s12: Teams & Autonomy — Spawn persistent teammate agents with async JSONL mailboxes, implement request-response team protocols, enable autonomous task claiming, and isolate parallel execution in separate worktrees.
- Interactive Web Platform — Run
cd web && npm install && npm run devto access step-through diagrams, source viewer, and session documentation atlocalhost:3000. - Multilingual Documentation — Mental-model-first docs (problem → solution → ASCII diagram → minimal code) available in English, Chinese, and Japanese.
- Companion CLI & SDK — After completing the sessions, apply knowledge via the open-source
Kode Agent CLI(npm i -g @shareai-lab/kode) or the embeddableKode Agent SDKfor backend and browser-extension integration. - Universal Harness Patterns — Design principles generalize beyond coding agents to farm management, hotel operations, medical research, manufacturing, and any domain requiring perception, reasoning, and action.
Community Discussions
Be the first to start a conversation about Learn Claude Code
Share your experience with Learn Claude Code, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Fully free and open-source under the MIT License. Clone, use, modify, and distribute without restriction.
- All 12 progressive agent harness sessions
- Python reference implementations (s01–s12 + capstone)
- Interactive Next.js web platform
- Multilingual documentation (English, Chinese, Japanese)
- MIT License — free to use, modify, and distribute
Capabilities
Key Features
- 12 progressive sessions from minimal agent loop to multi-agent worktree isolation
- Subagent spawning with isolated message contexts
- On-demand skill loading via tool_result injection
- Three-layer context compression for infinite sessions
- File-based task graph with dependency ordering
- Daemon-thread background task execution with notification queue
- Persistent teammate agents with async JSONL mailboxes
- Autonomous task claiming by idle agents
- Worktree isolation for parallel agent execution
- Interactive Next.js web platform with step-through diagrams
- Multilingual documentation (English, Chinese, Japanese)
- MIT licensed and free to use
