Reference
Glossary
Every technical term used across the concepts, cheat sheet, and worked examples, defined both ways.
--continue
Picks up your most recent conversation, whatever it was.
A Claude Code CLI flag that resumes the most recently active session.
--resume <name>
Jumps back into one specific, named conversation, even if you've had others since.
A Claude Code CLI flag that resumes a specific session by name or identifier, rather than defaulting to the most recent.
.mcp.json
The shared, project-level file listing MCP servers everyone on the team gets.
The project-scoped MCP server configuration file, checked into version control and shared with anyone who checks out the project.
~/.claude.json
Your own personal, private configuration file — not shared with the team.
The user/home-directory-scoped configuration file (personal MCP servers, personal settings), private to the individual machine/user.
CLAUDE.md
A file that Claude automatically reads before every task in a project — like a standing set of house rules.
A markdown file auto-loaded into context for every Claude Code session in that project/directory; nested subdirectory CLAUDE.md files load only when Claude works in that subdirectory.
Context degradation
What happens when the working memory gets so full that answers start getting vaguer and more generic instead of specific.
A decline in response quality/specificity as context fills, evidenced by the model falling back to generic patterns rather than citing the specific artifacts it previously discovered.
Context window
The model's working memory for the current conversation — everything it can 'see' right now. It's limited, and it can get crowded.
The finite token budget available to the model per request, containing the full conversation history, system prompt, tool definitions, and any loaded files/CLAUDE.md content.
Few-shot examples
A couple of worked examples shown to the model demonstrating exactly how you want a tricky, recurring case handled.
Example input/output pairs included in the prompt to demonstrate a specific desired behavior, especially effective for well-characterized, recurring edge cases.
Hook
A piece of real code that runs automatically at a specific moment, guaranteed — unlike an instruction, it can't be skipped or forgotten.
Claude Code executes hooks as shell commands/scripts at defined lifecycle points (e.g. PreToolUse, PostToolUse, Stop). Hooks are deterministic and run independent of model judgment.
MCP (Model Context Protocol)
A standard way to connect outside systems and data to an AI agent.
An open protocol for connecting external tools, data sources, and prompt templates to an AI application via a standardized server interface.
MCP prompt
A saved template you invoke yourself, the same way you'd use a slash command.
A user-invoked template exposed by an MCP server, surfaced in Claude Code as a slash command in the form /mcp__servername__promptname, with arguments passed after the command name.
MCP resource
A piece of data you manually attach to the conversation with an @-mention — not something the model calls on its own.
Data exposed by an MCP server that is attached to context via explicit @-mention, distinct from tools (which the model calls) and prompts (which the user invokes).
MCP tool
An action the model can actively choose to call, like 'look up this order' or 'send this refund.'
A model-callable action exposed by an MCP server, described via a name, description, and input schema, selected by the model based on its description.
Orchestration layer
The code wrapped around the model that enforces rules the model itself can't be trusted to guarantee.
Code surrounding the agentic loop (outside the model's own reasoning) responsible for enforcing deterministic guarantees — e.g. checking final state and force-escalating, or gating specific tool calls.
permissions.deny
A settings list that just outright forbids certain actions, no custom code needed.
A declarative permission rule in Claude Code settings that blocks matching tool calls/paths outright — the bluntest guarantee mechanism, requiring no hook script.
Plan mode
A mode where Claude maps out a strategy and shows it to you before making any actual changes.
A Claude Code mode in which the agent explores and proposes an implementation strategy for human review before any file modifications are made.
PostToolUse hook
A checkpoint that runs right after Claude uses a tool, e.g. to automatically clean up or format whatever just changed.
A hook type that fires after a tool call completes, commonly used to run formatters/linters on files that were just edited.
PreToolUse hook
A checkpoint that runs right before Claude uses a tool, able to block that action entirely.
A hook type that fires before a tool call executes; can inspect the proposed call and block or modify it before it runs.
Schema
A precise description of what shape a piece of data must have — which fields exist, what type each one is, and which are required.
A formal (often JSON Schema-based) specification of a data structure's fields, types, and required/optional status, used both for tool input definitions and structured extraction targets.
Session forking
Splitting one conversation into two independent copies that both remember everything up to that point, then develop separately.
Branching an existing session's accumulated context into two independent continuations for side-by-side comparison of approaches. Naming/exact mechanism varies by product surface (Claude Code CLI vs. Agent SDK) — verify current syntax before relying on it.
Skill
A more substantial, shared workflow file the whole team can use and improve together, saved to the project so everyone gets it.
A self-contained, version-controlled workflow defined in .claude/skills/<name>/SKILL.md, invokable and iterated on by the whole team via source control.
Slash command
A saved chunk of instructions you can pull up on demand by typing /something, instead of retyping or pasting it every time.
A user-invoked command (e.g. /review) that injects a predefined instruction block into the conversation on demand.
Statelessness
The model has no memory of its own between requests — it only 'knows' what you include in the current message.
The API holds no server-side conversation state; the full message history must be resent on every request for the model to have access to prior turns.
Stop hook
A checkpoint that runs when the agent thinks it's finished, as a last check before it actually stops.
A hook type that fires when the agent attempts to end its turn/session, useful for enforcing end-of-task conditions.
stop_reason
A field in the model's response that tells your code what to do next — keep looping, or stop.
A field on the Messages API response indicating why the model stopped generating: 'tool_use' (wants to call a tool), 'end_turn' (finished), among other terminal values.
Stratified random sampling
Regularly reviewing a fixed, random slice of even the 'trusted' output, so you can catch and measure rare mistakes over time.
An ongoing QA audit method: reviewing a fixed percentage of high-confidence outputs on a rolling basis to produce an unbiased, repeatable error-rate estimate and detect drift/patterns.
Structured error metadata
An error message that tells the agent what kind of failure this was and whether trying again is even worth it, instead of just 'something went wrong.'
An error response including fields like errorCategory (transient/validation/permission), a retryable boolean, and a cause description, enabling deterministic recovery decisions.
Subagent
A separate assistant with its own clean memory, used when a task is big or messy enough to deserve its own isolated workspace.
A separately-invoked agent instance (via the Agent/Task tool) with an independent context window, its own system prompt and tool access.
Tool consolidation
Merging two tools that do overlapping things into one tool with an option, so there's no longer a wrong choice to make.
Structurally merging semantically overlapping tools into a single tool with a discriminating parameter, removing an ambiguous selection surface rather than just improving descriptions.
tool_choice
A setting that lets you force the model to call a specific tool, force it to call some tool, or let it decide freely.
An API parameter controlling tool selection: a specific named tool ({type:'tool', name:'...'}), 'any' (some tool must be called), or 'auto' (model decides). The order of tools in the tools array does not reliably influence selection.
Tool/function schema (for extraction)
Defining a fake 'tool' whose only job is to hold your desired output shape, so the model's own tool-calling mechanism enforces the structure for you.
Using a tool definition's input_schema as the target extraction structure and reading the resulting tool_use.input, rather than prompting for JSON text and parsing it — types/required fields are enforced by construction.