Appendix D: Glossary

This glossary covers the core terminology used throughout Decoding Agent Harness: Claude Code Architecture Deep Dive, sorted alphabetically. Each entry includes the original English term, a recommended Chinese translation, a concise definition, cross-references to related terms, and a reference to the chapter where the term is first discussed in depth.

How to use this glossary:

  • The “See also” field after each term points to related terms, enabling thematic reading
  • The “Chapter” field after each term indicates where the term is first discussed in depth in the main text
  • Technical terms are kept in their original English form; Chinese translations are provided for supplementary understanding

Core Concept Relationship Diagram

The following diagrams illustrate the relationships among the core terms in this book, helping readers establish an overall conceptual framework:

flowchart TD
    subgraph CoreArchitecture["Core Architecture Concepts"]
        LLM["LLM — Large Language Model"]
        AH["Agent Harness"]
        Agent["Agent"]
        ML["Main Loop"]
    end

    subgraph ToolSystem["Tool System"]
        TI["Tool Interface"]
        TR["Tool Registry"]
        BT["Build Tool (Factory Function)"]
        Tool["Tool"]
    end

    subgraph PermissionSecurity["Permissions & Security"]
        PP["Permission Pipeline"]
        PM["Permission Mode"]
        TC["Transcript Classifier"]
        BC["Bash Classifier"]
    end

    subgraph ContextManagement["Context Management"]
        CW["Context Window"]
        Token["Token"]
        TB["Token Budget"]
        Comp["Compaction"]
    end

    subgraph MemorySystem["Memory System"]
        Memory["Memory"]
        CM["CLAUDE.md"]
        MI["Memory Injection"]
    end

    LLM --> AH --> Agent --> ML
    ML --> TR
    TR --> TI --> Tool
    BT --> Tool
    ML --> PP
    PM --> PP
    TC --> PP
    BC --> PP
    ML --> CW
    Token --> CW
    TB --> CW
    Comp --> CW
    ML --> MI
    CM --> MI
    CM --> Memory

    classDef core fill:#4a90d9,stroke:#2c5f8a,color:#fff
    classDef tool fill:#8fbc8f,stroke:#5a8a5a,color:#fff
    classDef security fill:#ef5350,stroke:#c62828,color:#fff
    classDef context fill:#ff9800,stroke:#e65100,color:#fff
    classDef mem fill:#ce93d8,stroke:#7b1fa2,color:#fff

    class LLM,AH,Agent,ML core
    class TI,TR,BT,Tool tool
    class PP,PM,TC,BC security
    class CW,Token,TB,Comp context
    class Memory,CM,MI mem
flowchart LR
    subgraph CompactionStrategies["Compaction Strategy Hierarchy"]
        direction LR
        MC["Micro Compact"] --> AC["Auto Compact"]
        AC --> HS["History Snip"]
        HS --> CC["Context Collapse"]
    end

    classDef light fill:#c8e6c9,stroke:#4caf50,color:#333
    classDef medium fill:#fff9c4,stroke:#fbc02d,color:#333
    classDef heavy fill:#ffccbc,stroke:#e64a19,color:#333
    classDef extreme fill:#ef5350,stroke:#b71c1c,color:#fff

    class MC light
    class AC medium
    class HS heavy
    class CC extreme

A

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Ablation Baseline消融基线A control group marker in A/B experiments used to quantify the precise impact of a new feature on system behaviorFeature Flag, Enhanced TelemetryChapter 13
Agent智能体An AI program entity with autonomous planning, tool invocation, and iterative execution capabilities that can dynamically adjust its behavior based on environmental feedback. In the Claude Code architecture, an Agent is wrapped by the Agent Harness and collaborates with the tool system through the Main LoopAgent Harness, Subagent, Coordinator ModeChapter 1
Agent Harness智能体线束 / 执行框架The runtime infrastructure layer that wraps the large language model, responsible for orchestrating and executing core capabilities such as tool dispatch, permission control, context management, and streaming rendering. This is the most fundamental architectural concept in Claude Code, defining the standard framework for LLM interaction with the external worldAgent, Tool, Permission Mode, Context WindowChapter 1
Agent Memory Snapshot智能体内存快照Serialized preservation of an agent’s runtime internal state, supporting cross-session restoration of the execution context. Enabled by the AGENT_MEMORY_SNAPSHOT feature flagMemory, Agent, Feature FlagChapter 10
Agent Trigger智能体触发器A time-based (cron) or event-driven automatic scheduling mechanism that allows agents to execute tasks on a schedule without human attendance. Enabled by the AGENT_TRIGGERS feature flagDaemon, Cron ToolChapter 9
Always Allow / Always Deny / Always Ask始终允许 / 始终拒绝 / 始终询问Three basic policies in permission rules, with priority order: Always Deny > Always Allow > Always Ask. These rules are defined in the three-tier configuration of settings.jsonPermission Mode, Permission PipelineChapter 4
API TurnAPI 轮次A complete request-response interaction cycle, containing the full round-trip of user input, model inference, and tool call results. A single user request may trigger multiple API Turns (when tool calls are required)Main Loop, Token, ToolChapter 2
Async Generator异步生成器A function declared using async function* in JavaScript/TypeScript that incrementally yields asynchronous results via yield. It is the core programming primitive for Claude Code’s streaming output. The query engine and streaming tool executor both use this patternStream, Query EngineChapter 2
Auto Compact自动压缩A context compression mechanism that is automatically triggered when the conversation context approaches the Token threshold, without requiring manual user intervention. Enhanced by the REACTIVE_COMPACT feature flagCompaction, Context Window, Token BudgetChapter 7
Auto Mode自动模式A permission mode in which the agent can autonomously decide to execute most operations without requesting user confirmation for each one. Combined with TRANSCRIPT_CLASSIFIER, it enables automatic mode inference based on conversation contentPermission Mode, Transcript ClassifierChapter 3
Auto Theme自动主题A color scheme that automatically switches between light and dark themes based on the operating system’s preference for the Claude Code terminal interface. Controlled by the AUTO_THEME feature flagFeature FlagChapter 12
Away Summary离开摘要An automatically generated conversation summary produced when the user returns after being away, helping the user quickly catch up on what happened during their absence. Controlled by the AWAY_SUMMARY feature flagBackground Session, Feature FlagChapter 11

B

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Background Session (BG_SESSIONS)后台会话A session instance that runs independently of the foreground terminal, supporting continuous execution of long-running tasks in the background. Enabled by the BG_SESSIONS feature flagDaemon, Agent TriggerChapter 11
Bash ClassifierBash 分类器A module that uses machine learning to classify the safety of Bash commands entered by the user; high-confidence safe commands can be automatically approved. Enabled by the BASH_CLASSIFIER feature flagPermission Pipeline, BashToolChapter 3
Bridge Mode桥接模式A bidirectional communication protocol between Claude Code and IDEs (such as VS Code, JetBrains), supporting permission callbacks and state synchronization. Enabled by the BRIDGE_MODE feature flagIDE Integration, KAIROSChapter 7
Build-time Dead Code Elimination编译时死代码消除The Bun bundler evaluates feature flags at compile time and removes entire code branches where conditions are false, reducing output size. This is the foundation of Claude Code’s feature flag mechanismFeature Flag, Bun BundleAppendix C
Buddy伴侣精灵An interactive animated character component in the REPL interface that provides personable feedback and visual companionship. Enabled by the BUDDY feature flagREPL, Companion SpriteChapter 12
Bun BundleBun 打包The bundling functionality of the Bun runtime that injects static values of feature flags at compile time. Bun is Claude Code’s primary build and runtime toolchainFeature Flag, Dead Code EliminationAppendix C
Build Tool (buildTool)工具工厂函数A unified factory function for creating tool instances that fills in safe default values for methods not explicitly defined (such as isEnabled, isReadOnly, etc.)Tool, Tool RegistryChapter 3

C

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Cache Safe Params缓存安全参数A set of parameters marked in API requests that will not cause the Prompt Cache to be invalidated, ensuring maximum cache hit ratesPrompt Cache, CompactionChapter 7
Cached Micro Compact缓存式微压缩An advanced compaction strategy that maintains Prompt Cache boundary markers during compression, preventing wholesale cache invalidation caused by compaction. Controlled by the CACHED_MICROCOMPACT feature flagCompaction, Prompt Cache, Micro CompactChapter 7
Channel频道A bidirectional communication pipe used in KAIROS mode for passing messages and permission requests between the IDE and Claude Code. Controlled by the KAIROS_CHANNELS feature flagKAIROS, Bridge ModeChapter 6
CHICAGO_MCPChicago MCPA specific MCP server configuration pattern that integrates Computer Use capabilities and a dedicated toolset. Controlled by the CHICAGO_MCP feature flagMCP, Feature FlagChapter 7
CLI (Command Line Interface)命令行界面Claude Code’s primary interaction entry point — a terminal-based text interface that uses the Ink framework to render React components. Responsible for argument parsing, REPL initialization, and user input captureREPL, InkChapter 2
CLAUDE.mdCLAUDE 记忆文件The core carrier file of the memory system, supporting nested hierarchies at the global level (~/.claude/CLAUDE.md), project level (project root directory), and directory level. Its contents are injected into the system prompt at the start of each conversation turnMemory, Memory InjectionChapter 6
Compaction上下文压缩The process of compressing lengthy conversation history into a concise summary that retains key information, freeing up Token space for subsequent conversation. Claude Code provides multiple compaction strategies: micro-compact, auto-compact, history snip, and context collapseAuto Compact, Context Window, Token BudgetChapter 7
Companion Sprite伴侣精灵组件The visual implementation of the Buddy feature — an animated character React component rendered in the terminalBuddy, REPLChapter 12
Concurrency Safe并发安全A tool attribute; tools marked as concurrency safe can be scheduled for simultaneous execution by the streaming tool executor without waiting for the previous call to completeTool, Streaming Tool ExecutorChapter 3
Context Collapse上下文折叠A more aggressive context reduction strategy than traditional compaction, using a dedicated collapse UI to make the user aware of and optionally restore collapsed content. Controlled by the CONTEXT_COLLAPSE feature flagCompaction, Context WindowChapter 7
Context Window上下文窗口The maximum number of Tokens a model can process in a single request — the fundamental constraint underlying all context management strategies. Claude Code’s compaction system and memory system are both designed around this limitToken, Compaction, Token BudgetChapter 7
Coordinator Mode协调器模式The central role in multi-agent collaboration, responsible for task distribution, progress aggregation, and result consolidation. Controlled by the COORDINATOR_MODE feature flagAgent, Subagent, FORK_SUBAGENTChapter 10
COWORKER_TYPE_TELEMETRY协作者类型遥测An anonymous telemetry feature that automatically detects and reports the current collaboration environment type (IDE plugin, standalone terminal, CI pipeline, etc.)Feature Flag, TelemetryChapter 13
Cron ToolCron 定时工具A set of tools in agent triggers that define execution schedules based on standard cron expressions (CronCreateTool, CronDeleteTool, CronListTool). Controlled by the AGENT_TRIGGERS feature flagAgent Trigger, DaemonChapter 9

D

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Daemon守护进程A mode in which Claude Code runs as a long-lived background process, supporting persistent services and scheduled task execution. Controlled by the DAEMON feature flagBackground Session, Agent TriggerChapter 11
Dead Code Elimination死代码消除An optimization technique where the compiler/bundler identifies and removes code paths that will never be executed during the build phase. In Claude Code, the false branches of Feature Flags are removed through this mechanismFeature Flag, Bun Bundle, Build-time Dead Code EliminationAppendix C
DIRECT_CONNECT直连模式Bypasses intermediate proxy layers to establish a direct network connection to the Anthropic API endpoint. Controlled by the DIRECT_CONNECT feature flagFeature Flag, SSH RemoteChapter 11
Dynamic Tool Registration动态工具注册The process by which MCP tools are dynamically discovered, adapted, and registered in the tool registry at runtime. Unlike built-in tools’ static registration, the number and types of MCP tools are not determined at compile timeMCP, Tool Registry, Build ToolChapter 12

E

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Enhanced Telemetry增强遥测Extended anonymous usage telemetry data collection capabilities. Controlled by the ENHANCED_TELEMETRY_BETA feature flagTelemetry, COWORKER_TYPE_TELEMETRYChapter 13
Extended Thinking扩展思考The model’s internal reasoning process before generating a final response, which improves reasoning quality on complex tasks through additional thinking Tokens. Controlled by the ULTRATHINK feature flagUltrathink, Token, LLMChapter 5
Extract Memories记忆提取Automatically identifies and extracts reusable knowledge fragments from conversation content at session end, persisting them to the memory file system. Controlled by the EXTRACT_MEMORIES feature flagMemory, CLAUDE.md, Team MemoryChapter 10

F

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Feature Flag功能标志A boolean switch injected at compile time via Bun define, controlling whether specific feature code is included in the final output. When a flag is false, the code branch it guards is entirely removed through dead code eliminationBuild-time Dead Code Elimination, Bun BundleAppendix C
File Persistence文件持久化The ability to track and record file system changes across API turns, supporting state consistency during session recovery. Controlled by the FILE_PERSISTENCE feature flagBackground Session, CompactionChapter 11
Fork Mode / Fork SubagentFork 模式 / Fork 子智能体A mode that creates independent child processes via fork to execute subtasks; subagents have their own context and permission scope. Controlled by the FORK_SUBAGENT feature flag. Subagents implement nested execution by recursively calling the Main LoopSubagent, Agent, Main LoopChapter 9
Fullscreen Layout全屏布局An enhanced layout that Claude Code activates in full-screen terminal environments (such as tmux, iTerm2), supporting multi-panel and floating elements. This is a prerequisite for advanced UI features such as Terminal PanelTerminal Panel, REPLChapter 12

G-H

English TermChinese TranslationConcise DefinitionSee AlsoChapter
GlobToolGlob 搜索工具A tool that searches for files by filename glob pattern matching, returning results sorted by modification time. Marked as readOnly and concurrencySafeGrepTool, FileReadTool, ToolChapter 3
GrepToolGrep 搜索工具A regex-based content search tool powered by ripgrep, supporting three output modes: files_with_matches / content / count. Marked as readOnly and concurrencySafeGlobTool, ToolChapter 3
Hard Fail硬失败A mode that terminates directly on critical errors rather than degrading gracefully. Controlled by the HARD_FAIL feature flagFeature Flag, Permission PipelineChapter 3
Hook钩子User-defined scripts or callback functions triggered at specific lifecycle events (such as before/after tool execution, session start/end). This is the core mechanism for Claude Code lifecycle extensionHook Prompts, PreToolUse, PostToolUseChapter 8
Hook Prompts钩子提示词A mechanism that allows hooks to inject custom prompts into the conversation flow, enabling dynamic system-level instruction customization. Controlled by the HOOK_PROMPTS feature flagHook, System PromptChapter 9
History Snip历史裁剪 / Snip CompactA compaction strategy that intelligently trims processed conversation history, retaining key information while significantly reducing Token usage. Controlled by the HISTORY_SNIP feature flagCompaction, Auto Compact, TokenChapter 7

I-J-K

English TermChinese TranslationConcise DefinitionSee AlsoChapter
IDE IntegrationIDE 集成Claude Code’s integration capability with IDEs (such as VS Code, JetBrains) via Bridge Mode or KAIROS mode, supporting permission callbacks, state synchronization, and bidirectional communicationBridge Mode, KAIROS, ChannelChapter 7
InkInk 框架A React-based terminal UI rendering framework used by Claude Code to render React component trees as terminal text output. It is the core technology of the presentation layerCLI, REPL, ReactChapter 2
Job Classifier作业分类器A classification module based on the Templates feature flag that automatically identifies user request types and routes them to the corresponding processing pipelineTemplates, Feature FlagChapter 9
JWT (JSON Web Token)JSON Web 令牌A token mechanism used for secure authentication in IDE bridge mode, ensuring communication security between the CLI and IDE pluginBridge Mode, IDE IntegrationChapter 7
KAIROS助手模式 / KAIROS 模式A complete collaboration feature set for IDE integration, including channel communication, session recovery, GitHub Webhook integration, and more. Controlled by the KAIROS feature flag, with multiple sub-flags (KAIROS_BRIEF, KAIROS_CHANNELS, etc.)Channel, Bridge Mode, Feature FlagChapter 6
KAIROS DreamKAIROS Dream 模式An extended mode of KAIROS used for loading additional skill sets. Controlled by the KAIROS_DREAM feature flagKAIROS, SkillChapter 6

L-M

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Layered Architecture分层架构Claude Code’s overall architectural style, divided into four layers: Presentation, Orchestration, Capability, and InfrastructureAgent Harness, CLI, Main LoopAppendix A
LLM (Large Language Model)大语言模型Large-scale pre-trained language models based on the Transformer architecture, such as Claude, which serve as the reasoning core of agents. In Claude Code, the LLM interacts with the tool system through the Agent HarnessAgent, Agent Harness, API TurnChapter 1
Lodestone磁石An enhanced memory retrieval and matching mechanism that improves the accuracy of finding relevant knowledge from the memory file system. Controlled by the LODESTONE feature flagMemory, CLAUDE.mdChapter 10
Main Loop主循环Claude Code’s core execution loop, responsible for the iterative process of receiving user input, calling the model API, processing tool calls, and rendering output. Each iteration is called a turnAPI Turn, Tool, Query EngineChapter 2
MCP (Model Context Protocol)模型上下文协议A standardized protocol defined by Anthropic that allows external tool servers to provide context information and callable tools to the model. Claude Code implements a complete MCP clientDynamic Tool Registration, MCP SkillsChapter 12
MCP SkillsMCP 技能发现The ability to dynamically discover and load extensible skills from external servers via the MCP protocol. Controlled by the MCP_SKILLS feature flagMCP, Skill, Dynamic Tool RegistrationChapter 7
Memory记忆A file system for persistently storing user preferences, project knowledge, and historical experience, retaining key information across sessions. The core carrier is the CLAUDE.md fileCLAUDE.md, Extract Memories, Team MemoryChapter 6
Memory Injection记忆注入The process of injecting knowledge from CLAUDE.md files into the system prompt at the start of each conversation turn. See the memory injection path in Appendix A.3Memory, CLAUDE.md, System PromptChapter 6
Message Actions消息操作Contextual action buttons provided on conversation messages, such as copying content, regenerating responses, and other interactive features. Controlled by the MESSAGE_ACTIONS feature flagFeature FlagChapter 12
Micro Compact微压缩A fast compaction strategy that performs lightweight context reduction without triggering full compaction. When used with Cached Micro Compact, it can maintain cache boundariesCompaction, Cached Micro Compact, Auto CompactChapter 7
Monitor Tool监控工具The ability to provide real-time output monitoring and status tracking when the Bash tool executes background commands. Controlled by the MONITOR_TOOL feature flagBashTool, ToolChapter 7
Multi-tier Settings三级配置The hierarchical configuration model of the settings system, containing three levels — global (~/.claude/settings.json), project (.claude/settings.json), and local (.claude/settings.local.json) — with lower-priority settings overridden by higher-priority onesPermission Mode, Settings SyncChapter 5

N-O-P

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Native Client Attestation原生客户端认证Enables platform-native client identity verification mechanisms. Controlled by the NATIVE_CLIENT_ATTESTATION feature flagFeature Flag, Permission PipelineChapter 3
Permission Mode权限模式A setting that controls the agent’s level of autonomous execution, including ask (confirm each time), auto-edit (auto-approve edits), full-auto (fully automatic), and more. Combined with Transcript Classifier, it enables automatic inferenceAuto Mode, Permission Pipeline, Always AllowChapter 4
Permission Pipeline权限管线The multi-layered permission check pipeline before tool execution, containing the complete decision chain of classifier evaluation, user confirmation dialogs, and auto-approval rules. See the permission decision path in Appendix A.3Permission Mode, Bash Classifier, Transcript ClassifierChapter 4
Plan ModePlan 模式An interactive planning interface provided by the Ultraplan feature, allowing users to review, modify, and approve complex task plans before execution. In Plan Mode, only read-only tools are permittedEnterPlanModeTool, ExitPlanModeV2Tool, UltraplanChapter 14
Power Assertion幂等断言A code design principle ensuring that operations can be safely repeated without side effects. Used in the tool system design to guarantee retry safetyTool, Unattended RetryChapter 3
PreToolUse / PostToolUse工具执行前/后钩子Lifecycle hooks triggered before/after tool execution, used respectively for modifying input parameters or blocking execution, and for processing execution results or loggingHook, Hook PromptsChapter 8
Proactive Mode主动模式The agent’s ability to proactively analyze code, offer suggestions, or perform background tasks when the user is idle. Controlled by the PROACTIVE feature flagFeature Flag, SleepToolChapter 5
Prompt Cache提示缓存A caching mechanism provided by the Anthropic API that caches recurring system prompts and context prefixes to reduce latency and costCache Safe Params, CompactionChapter 7
Prompt Cache Break Detection提示缓存断裂检测Detects whether cache boundaries have been disrupted during operations such as compaction, and reports the impact on cache hit rates. Controlled by the PROMPT_CACHE_BREAK_DETECTION feature flagPrompt Cache, CompactionChapter 7

Q-R

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Query Engine查询引擎The core engine that manages the complete conversation lifecycle (from receiving user input to outputting the final response), coordinating model calls, tool execution, and context management. It encapsulates all communication details with the Anthropic Messages APIMain Loop, Async Generator, API TurnChapter 2
Quick Search快速搜索An interface feature for instant searching within the current conversation history, supporting quick location of specific content. Controlled by the QUICK_SEARCH feature flagFeature FlagChapter 12
Reactive Compact响应式压缩A compaction strategy that is automatically triggered when Token usage approaches the threshold, serving as a real-time response to resource pressure. Controlled by the REACTIVE_COMPACT feature flagAuto Compact, Compaction, Token BudgetChapter 7
ReactReact 框架Claude Code’s UI layer is built on the React framework, rendering React component trees as terminal text output through the Ink adapterInk, CLI, REPLChapter 2
ReadOnly Tool只读工具A tool marked as readOnly that only performs read operations without modifying the file system or external state. Read-only tools can be used in Plan Mode and generally have more relaxed permission constraintsTool, Plan Mode, Concurrency SafeChapter 3
REPL (Read-Eval-Print Loop)交互式循环Claude Code’s main interface loop, continuously receiving user input, executing processing, and rendering output to form an interactive closed loop. Rendered using the Ink frameworkCLI, Ink, Main LoopChapter 2
Runtime Gate运行时门控A type of feature flag that is true at compile time but requires additional conditions (such as environment variables, server-side configuration) to be truly activated at runtime. Examples include KAIROS, COORDINATOR_MODE, etc.Feature Flag, Build-time Dead Code EliminationAppendix C

S

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Selector PatternSelector 模式An efficient subscription pattern in state management that allows components to subscribe only to the state subsets they care about, avoiding unnecessary re-rendersState Management, ReactChapter 2
Settings Sync设置同步The ability to bidirectionally synchronize user configuration (permission rules, environment variables, etc.) between local and cloud. Controlled by the UPLOAD_USER_SETTINGS and DOWNLOAD_USER_SETTINGS feature flagsMulti-tier Settings, Feature FlagChapter 10
Skill技能An installable extension capability pack that extends the agent’s domain expertise through prompt templates and tool definitions. Invoked via slash commandsSkill Generator, MCP Skills, Slash CommandChapter 11
Skill Generator技能生成器A tool that dynamically generates new skill definitions, supporting users in creating custom skills through natural language descriptions. Controlled by the RUN_SKILL_GENERATOR feature flagSkill, Feature FlagChapter 7
Slash Command斜杠命令A skill invocation method triggered by the / prefix, such as /commit, /review-pr, etc. Each slash command corresponds to a registered skillSkill, SkillToolChapter 11
Snip Compact裁剪压缩The compaction implementation of the History Snip feature, which intelligently trims processed historical messagesHistory Snip, CompactionChapter 7
SSH RemoteSSH 远程模式The ability to connect to a remote machine via the SSH protocol and run Claude Code in the remote environment. Controlled by the SSH_REMOTE feature flagFeature Flag, DIRECT_CONNECTChapter 11
State Management状态管理Claude Code’s global application state management mechanism, using a centralized state store combined with the selector pattern for efficient state subscription and updatesSelector Pattern, ReactChapter 2
Stop Reason停止原因A field in the model response that identifies the reason for ending the current inference turn, with values of end_turn (normal end) or tool_use (tool execution required). The Main Loop uses the stop reason to determine whether to continue loopingAPI Turn, Main Loop, ToolChapter 2
Stream流 / 流式A method of transmitting and processing data incrementally in chunks. Claude Code uses streaming APIs to achieve incremental output and tool calls. Implemented at the lower level via Async GeneratorsAsync Generator, Query EngineChapter 13
Streaming Tool Executor流式工具执行器An execution module that runs tools in a streaming manner and renders output in real time during tool execution. Supports parallel scheduling of concurrency-safe toolsTool, Concurrency Safe, StreamChapter 3
Subagent子智能体An independent execution unit forked or spawned by the main agent, with its own context and permissions, handling specific subtasks. Implements nested execution by recursively calling the Main LoopFork Mode, Agent, Coordinator ModeChapter 9
System Prompt系统提示词Instruction text injected at the beginning of each API request, defining the agent’s behavioral norms, available tools, and usage constraints. Memory content from CLAUDE.md is merged into the system prompt through Memory InjectionMemory Injection, CLAUDE.md, Prompt CacheChapter 2

T

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Team Memory (TEAMMEM)团队记忆A shared memory file system for teams, supporting the sharing of project knowledge and coding standards among team members. Controlled by the TEAMMEM feature flagMemory, CLAUDE.md, Extract MemoriesChapter 10
Terminal Panel终端面板An independent terminal panel component in the fullscreen layout that allows users to execute terminal commands without leaving Claude Code. Controlled by the TERMINAL_PANEL feature flag, with the shortcut key Meta+JFullscreen Layout, Feature FlagChapter 12
Templates模板系统A classification module that enables the Job Classifier for identifying and routing different types of user requests. Controlled by the TEMPLATES feature flagJob Classifier, Feature FlagChapter 9
Token词元 / TokenThe basic unit of text processing by the model, and the core metric for context window capacity and API billing. All context management strategies revolve around the effective utilization of TokensContext Window, Token Budget, CompactionChapter 2
Token BudgetToken 预算A management mechanism that plans and monitors the total available Tokens in a single session, providing usage warnings and allocation strategies. Controlled by the TOKEN_BUDGET feature flagToken, Context Window, CompactionChapter 7
Tool工具An external capability unit that an agent can invoke (such as file read/write, Bash commands, web search, etc.), registered and executed through a standardized interface. All tools follow the protocol defined by the Tool InterfaceTool Registry, Build Tool, Permission PipelineChapter 3
Tool Interface工具接口The standard protocol that all tools must follow, defining core methods such as isEnabled, isReadOnly, isConcurrencySafe, isDestructive, checkPermissions, and moreTool, Build ToolChapter 3
Tool Orchestration工具编排The high-level scheduling capability of an agent to select, combine, and sequence multiple tool calls based on task requirementsTool, Agent, Main LoopChapter 3
Tool Permission Context工具权限上下文A state object containing the current permission mode, authorized rules, and pending checks,贯穿 throughout the tool execution’s permission decision flowPermission Pipeline, Permission ModeChapter 4
Tool Registry工具注册表The central module for global tool registration, discovery, and assembly, responsible for merging built-in tools with MCP dynamic tools, sorting by name, and deduplicating (built-in tools take priority)Tool, Dynamic Tool Registration, MCPChapter 3
ToolSearch Tool工具搜索工具A lazily-loaded tool that matches by keyword, helping the model quickly locate needed tools among a large number of available tools. Controlled by the ToolSearch feature flagTool Registry, Feature FlagChapter 3
Transcription / Transcript对话转录 / 转录记录The complete conversation history record, containing all user messages, model responses, and tool call results. It serves as the data foundation for compaction and auditingTranscript Classifier, CompactionChapter 2
Transcript Classifier转录分类器A classification model that automatically determines the appropriate permission mode based on conversation content, supporting inference of auto mode from conversation context. Controlled by the TRANSCRIPT_CLASSIFIER feature flagPermission Mode, Auto Mode, Feature FlagChapter 3
Tree-sitterTree-sitter 解析器An incremental parsing framework used for precise AST-level parsing and safety analysis of Bash commands. Controlled by the TREE_SITTER_BASH feature flag, with a shadow mode (TREE_SITTER_BASH_SHADOW) for validationBash Classifier, Feature FlagChapter 3
Turn轮次A complete iteration of the conversation main loop, from sending a message to the model to receiving the full response. A single user request may trigger multiple turns (when tool calls are involved)API Turn, Main Loop, Stop ReasonChapter 2

U-V

English TermChinese TranslationConcise DefinitionSee AlsoChapter
UDS (Unix Domain Socket) InboxUnix 域套接字收件箱A communication endpoint that receives messages from other local processes via Unix Domain Socket. Controlled by the UDS_INBOX feature flagFeature Flag, ListPeersToolChapter 7
Ultraplan超级规划An advanced planning feature that provides an interactive plan review interface, supporting user approval and modification of complex task execution plans before execution. Controlled by the ULTRAPLAN feature flagPlan Mode, EnterPlanModeToolChapter 5
Ultrathink深度思考A feature flag that enables Extended Thinking capability, allowing the model to perform deeper reasoning before generating a responseExtended Thinking, Feature Flag, TokenChapter 5
Unattended Retry无人值守重试A mechanism that automatically retries on API call failure without user intervention. Controlled by the UNATTENDED_RETRY feature flag. Combined with Power Assertion to ensure retry safetyFeature Flag, Power AssertionChapter 13
Verification Agent验证智能体An automated verification process launched after task completion, used to confirm the correctness and completeness of task results. Controlled by the VERIFICATION_AGENT feature flagAgent, Feature FlagChapter 8
Voice Mode语音模式An interactive mode that enables Push-to-Talk voice input and speech synthesis output, supporting voice-driven conversation experiences. Controlled by the VOICE_MODE feature flagFeature FlagChapter 12

W-Z

English TermChinese TranslationConcise DefinitionSee AlsoChapter
Web Browser Tool网页浏览器工具A browser panel built into Claude Code that supports web content browsing, extraction, and interaction. Controlled by the WEB_BROWSER_TOOL feature flagWebFetchTool, WebSearchTool, Feature FlagChapter 7
Workflow Scripts工作流脚本A script system that supports automated task orchestration, allowing the definition and execution of multi-step workflows. Controlled by the WORKFLOW_SCRIPTS feature flagAgent Trigger, Feature FlagChapter 9
Worktree工作树A wrapper around Git worktree that creates isolated working directories for subagents or parallel tasks, avoiding file conflicts in the main workspace. Controlled by the Worktree Mode feature flagFork Mode, Subagent, EnterWorktreeToolChapter 9
Zod SchemaZod 验证模式A runtime type validation schema defined using the Zod library, used for type checking of tool input parameters and auto-completion hint generation. Each tool’s input parameters are validated through a Zod SchemaTool, Tool Interface, Build ToolChapter 3

Note: This glossary contains approximately 100 core terms covering the main concepts discussed throughout the book. The Chinese translations are the recommended standardized translations used in this book; readers may encounter different translations in other materials. For detailed information on specific feature flags, please refer to Appendix C; for attribute information on specific tools, please refer to Appendix B.