Learn Claude Code

Learning Path

s01 to s20: Progressive Agent Harness Design

Layer Legend

Tools & Execution
Planning & Control
Memory Management
Concurrency & Scheduling
Multi-Agent Platform
01
s01Minimal model/tool loop

The Agent LoopOne Loop Is All You Need

102 lines of code1 tools

The smallest useful agent is a loop that calls the model, runs tools, and feeds results back.

Learn More
02
s02Tool dispatch map

Tool UseAdd a Tool, Add Just One Line

135 lines of code5 tools

The loop stays stable while capabilities register into a dispatch table.

Learn More
03
s03Permission gate

PermissionCheck Permissions Before Execution

180 lines of code5 tools

Dangerous actions need a harness decision point before the shell runs.

Learn More
04
s04Lifecycle hooks

HooksHang on the Loop, Don't Write into It

232 lines of code5 tools

Cross-cutting behavior belongs around the loop, not tangled inside it.

Learn More
05
s05Todo manager

TodoWriteAn Agent Without a Plan Drifts Off Course

236 lines of code6 tools

Explicit plans keep long-running work visible and correctable.

Learn More
06
s06Isolated subtask context

SubagentBreak Large Tasks into Small Ones with Clean Context

304 lines of code7 tools

Subagents give each subtask a clean message history while preserving the main thread.

Learn More
07
s07On-demand skill loader

Skill LoadingLoad Only When Needed

335 lines of code8 tools

Inject specialized knowledge only when the task actually needs it.

Learn More
08
s08Context compaction

Context CompactContext Will Fill Up

414 lines of code9 tools

Compression keeps the conversation usable when the context window gets crowded.

Learn More
09
s09Durable memory layer

MemoryKeep a Layer That Doesn't Lose Details

528 lines of code6 tools

Some facts should survive summarization and future sessions.

Learn More
10
s10Runtime prompt assembly

System PromptAssembled at Runtime, Never Hardcoded

166 lines of code3 tools

The system prompt is a generated product of policy, tools, skills, and context.

Learn More
11
s11Retry strategy

Error RecoveryErrors Are the Start of a Retry

287 lines of code3 tools

A robust harness classifies failures and decides what kind of retry is worthwhile.

Learn More
12
s12Task board

Task SystemBreak Big Goals into Small Tasks

297 lines of code8 tools

A task graph turns vague goals into ordered, observable work.

Learn More
13
s13Background execution

Background TasksSlow Operations Go to the Background

379 lines of code8 tools

The agent can keep reasoning while slow work completes elsewhere.

Learn More
14
s14Scheduled task creation

Cron SchedulerProducing Work on a Schedule

645 lines of code11 tools

Recurring work should be created by the harness, not remembered by the model.

Learn More
15
s15Teammate mailboxes

Agent TeamsOne Agent Isn't Enough, Form a Team

745 lines of code14 tools

Persistent teammates let work continue in parallel without stuffing every thought into one context.

Learn More
16
s16Shared coordination protocols

Team ProtocolsTeammates Need Agreements

709 lines of code15 tools

Multi-agent systems need explicit message contracts, not vibes.

Learn More
17
s17Autonomous task claiming

Autonomous AgentsCheck the Board, Claim the Task

648 lines of code15 tools

Teammates become useful when they can discover and claim work themselves.

Learn More
18
s18Worktree lifecycle

Worktree IsolationSeparate Directories, No Conflicts

802 lines of code18 tools

Parallel agents need isolated filesystems as much as isolated conversations.

Learn More
19
s19MCP tool bridge

MCP ToolsExternal Tools, Standard Protocol

835 lines of code23 tools

External services can become agent tools through a standard discovery and call protocol.

Learn More
20
s20Integrated harness

Comprehensive AgentAll Mechanisms, One Loop

1708 lines of code32 tools

The final harness is still one loop, now surrounded by the systems that make it production-shaped.

Learn More

LOC Growth

s01
102
s02
135
s03
180
s04
232
s05
236
s06
304
s07
335
s08
414
s09
528
s10
166
s11
287
s12
297
s13
379
s14
645
s15
745
s16
709
s17
648
s18
802
s19
835
s20
1708