Learn Claude Code
Back To Learning Path
Deep Dive

Entity Map

When This Page Helps

Use this when concepts start to blur. It tells you which layer each thing belongs to.

Reference -- Use this when concepts start to blur together. It tells you which layer each thing belongs to.

As you move into the second half of the repo, you will notice that the main source of confusion is often not code. It is the fact that many entities look similar while living on different layers. This map helps you keep them straight.

How This Map Differs From Other Docs

  • this map answers: which layer does this thing belong to?
  • glossary.md answers: what does the word mean?
  • data-structures.md answers: what does the state shape look like?

A Fast Layered Picture

conversation layer
  - message
  - prompt block
  - reminder

action layer
  - tool call
  - tool result
  - hook event

work layer
  - work-graph task
  - runtime task
  - protocol request

execution layer
  - subagent
  - teammate
  - worktree lane

platform layer
  - MCP server
  - memory record
  - capability router

The Most Commonly Confused Pairs

Message vs PromptBlock

EntityWhat It IsWhat It Is Not
Messageconversational content in historynot a stable system rule
PromptBlockstable prompt instruction fragmentnot one turn's latest event

Todo / Plan vs Task

EntityWhat It IsWhat It Is Not
todo / plantemporary session guidancenot a durable work graph
taskdurable work nodenot one turn's local thought

Work-Graph Task vs RuntimeTaskState

EntityWhat It IsWhat It Is Not
work-graph taskdurable goal and dependency nodenot the live executor
runtime taskcurrently running execution slotnot the durable dependency node

Subagent vs Teammate

EntityWhat It IsWhat It Is Not
subagentone-shot delegated workernot a long-lived team member
teammatepersistent collaborator with identity and inboxnot a disposable summary tool

ProtocolRequest vs normal message

EntityWhat It IsWhat It Is Not
normal messagefree-form communicationnot a traceable approval workflow
protocol requeststructured request with request_idnot casual chat text

Task vs Worktree

EntityWhat It IsWhat It Is Not
taskwhat should be donenot a directory
worktreewhere isolated execution happensnot the goal itself

Memory vs CLAUDE.md

EntityWhat It IsWhat It Is Not
memorydurable cross-session factsnot the project rule file
CLAUDE.mdstable local rule / instruction surfacenot user-specific long-term fact storage

MCPServer vs MCPTool

EntityWhat It IsWhat It Is Not
MCP serverexternal capability providernot one specific tool
MCP toolone exposed capabilitynot the whole connection surface

Quick "What / Where" Table

EntityMain JobTypical Place
Messagevisible conversation contextmessages[]
PromptPartsinput assembly fragmentsprompt builder
PermissionRuleexecution decision rulessettings / session state
HookEventlifecycle extension pointhook system
MemoryEntrydurable factmemory store
TaskRecordwork goal nodetask board
RuntimeTaskStatelive execution slotruntime manager
TeamMemberpersistent worker identityteam config
MessageEnvelopestructured teammate messageinbox
RequestRecordprotocol workflow staterequest tracker
WorktreeRecordisolated execution laneworktree index
MCPServerConfigexternal capability provider configplugin / settings

Key Takeaway

The more capable the system becomes, the more important clear entity boundaries become.