跳到主要内容

Glossary: Claude Code and Agent Systems (English)

Terms are grouped by theme. Where It Appears points to documentation chapters or typical source areas in this repository.

Agent Core​

TermDefinitionWhere It Appears
Agent LoopClosed cycle: call model → parse response → dispatch tools → append results → repeat until a terminal condition.docs/en/03-core-loop.md; src/query.ts
tool_useStructured tool invocation from the model (name + JSON arguments).docs/en/04-tool-system.md; src/query.ts
tool_resultObservation written back into the conversation after a tool runs.docs/en/04-tool-system.md; src/Tool.ts
async generatorasync function that yields events; consumers pull incrementally.docs/en/03-core-loop.md; src/query.ts
state machineDiscrete states and transitions for the loop (continue / terminate / recover).docs/en/03-core-loop.md; experiments/exp_03_core_agent_loop/
terminal conditionExit reasons such as task done, max turns, user abort, fatal error.docs/en/03-core-loop.md
turnOne iteration of model → tools → model.docs/en/03-core-loop.md
stream eventChunked events in streaming APIs (text deltas, tool blocks, usage).docs/en/12-api-streaming.md

Tool System​

TermDefinitionWhere It Appears
Tool modeHow a tool participates in the dialog (e.g., parallelizable, needs approval).docs/en/04-tool-system.md
validate inputCheck arguments against JSON Schema or validators before execution.docs/en/04-tool-system.md; src/Tool.ts
tool registryMap from tool name to implementation and schema.docs/en/04-tool-system.md
partition concurrentRun independent tool calls in parallel; serialize dependent ones.docs/en/04-tool-system.md
result truncationShorten or externalize oversized tool output to bound context size.docs/en/04-tool-system.md; src/utils/toolResultStorage.ts

Context / Prompt​

TermDefinitionWhere It Appears
system promptFixed behavioral instructions, usually separate from user messages.docs/en/06-context-prompt.md; src/utils/systemPrompt.ts
user contextWorkspace, open files, git state, etc., injected into the prompt.docs/en/06-context-prompt.md
CLAUDE.mdProject-level instruction file loaded into context.docs/en/06-context-prompt.md
cache boundaryMarks segments of the message list eligible for provider-side caching.docs/en/06-context-prompt.md; docs/en/12-api-streaming.md
prompt assemblyBuilding the final API payload from rules, memory, tools, and history.docs/en/06-context-prompt.md

Memory​

TermDefinitionWhere It Appears
long-term memoryKnowledge persisted across sessions (files, vector stores, summaries).docs/en/07-memory-system.md
session memoryShort-lived state and notes within the current session.docs/en/07-memory-system.md
memory recallRetrieve relevant snippets for a query and inject into context.docs/en/07-memory-system.md
TF-IDFTerm frequency–inverse document frequency; lightweight relevance ranking.docs/en/07-memory-system.md; experiments/exp_07_memory_system/

MCP​

TermDefinitionWhere It Appears
MCPModel Context Protocol: standard way to expose tools and resources.docs/en/09-mcp-integration.md
JSON-RPCJSON remote procedure call envelope (method / params / id) used by MCP.docs/en/09-mcp-integration.md
transportChannel carrying MCP messages (stdio, HTTP, WebSocket, etc.).docs/en/09-mcp-integration.md
tool discoveryAfter connect, list remote tools/resources/prompts.docs/en/09-mcp-integration.md; experiments/exp_09_mcp_client/

Multi-Agent​

TermDefinitionWhere It Appears
SwarmMulti-teammate agent orchestration and related UI/backend.docs/en/10-multi-agent.md; src/utils/swarm/
mailboxAsync message passing between processes or agents (e.g., files).docs/en/10-multi-agent.md; src/utils/teammateMailbox.ts
nested agentParent launches a child via a tool; child has restricted tools and transcript.docs/en/10-multi-agent.md
leader-workerLeader decomposes work; workers execute in parallel and aggregate.docs/en/10-multi-agent.md
sidechain transcriptChild conversation isolated from the main thread; may merge as summary.docs/en/10-multi-agent.md

API / Streaming​

TermDefinitionWhere It Appears
SSEServer-Sent Events: one-way event stream over HTTP.docs/en/12-api-streaming.md
streamingConsume model output incrementally to reduce time-to-first-token.docs/en/12-api-streaming.md
content_block_deltaStreaming field/event type representing a delta on a content block.docs/en/12-api-streaming.md; vendor SDKs
retryRe-issue a request after a recoverable failure.docs/en/12-api-streaming.md
backoffIncrease delay between retries to reduce load on the service.docs/en/12-api-streaming.md

Config​

TermDefinitionWhere It Appears
compactionShorten context via summarization, dropping, or merging.docs/en/14-compact-context-mgmt.md
microcompactSmall-granularity, cheaper compaction strategy.docs/en/14-compact-context-mgmt.md
autocompactAutomatically compact when approaching budget limits.docs/en/14-compact-context-mgmt.md
token budgetUpper bound on tokens for prompt, completion, and tool results.docs/en/14-compact-context-mgmt.md; src/utils/tokenBudget.ts
managed / MDMOrganization-managed settings overlays.docs/en/13-config-settings.md; src/utils/settings/mdm/

Permission / Security​

TermDefinitionWhere It Appears
permission modeTiered policy for tools and filesystem (e.g., ask, allow-list).docs/en/05-permission-security.md
ruleDeclarative match (path, command) → allow/deny decision.docs/en/05-permission-security.md
sandboxRestricted execution environment for subprocesses (fs, network).docs/en/05-permission-security.md
bypassSkip checks under explicit user grant or elevated mode (audit carefully).docs/en/05-permission-security.md

UI​

TermDefinitionWhere It Appears
InkReact-based library for terminal user interfaces.docs/en/08-terminal-ui.md; src/screens/REPL.tsx
ReactDeclarative UI framework used with Ink in the terminal.docs/en/08-terminal-ui.md
Vim modeVim-style keybindings in the prompt or REPL.docs/en/08-terminal-ui.md; src/vim/
keybindingMap keyboard shortcuts to commands or actions.docs/en/08-terminal-ui.md; docs/en/15-command-system.md
REPLInteractive read-eval-print loop main surface.docs/en/08-terminal-ui.md; src/screens/REPL.tsx

Paths are relative to the repository root claude-code-snapshot/.