Reference
Glossary
44 exam-critical terms across 7 categories.
Token
APIThe unit an LLM reads and writes. ~4 characters or ¾ of a word in English. You pay per input + output token, and context limits are measured in tokens.
Context window
APIMax tokens the model considers per call. Claude models today have ~200K windows. Includes system prompt, history, tool results, and output room.
stop_reason
APIField in Claude's response indicating why generation stopped. Values: end_turn (done), tool_use (wants a tool), max_tokens (hit output cap), stop_sequence (hit a stop string).
tool_use
APIA content block Claude returns when it wants to call a tool. Contains tool name, input args, and a unique tool_use_id you must reference in the tool_result.
tool_result
APIA content block you send back in the next user message containing the tool's output. Must reference the matching tool_use_id or the API rejects the call.
tool_choice
APIControls tool calling. 'auto' = model decides (may return text). 'any' = must call a tool, model picks which. Forced name = must call that specific tool.
Agent
AgenticAn LLM in a loop that decides its own next step until it judges the task done. Three properties: autonomy, tool use, action loop.
Agentic loop
AgenticSend messages → inspect stop_reason → if tool_use, execute + append tool_result → call again → if end_turn, done.
Subagent
AgenticA delegated worker LLM with its own context window and tool set. Returns only a summary to the caller. Does NOT inherit the caller's conversation history — pass context explicitly.
Coordinator
AgenticThe top-level agent in a hub-and-spoke multi-agent system. Plans, dispatches subagents, synthesizes. All communication routes through it — subagents never talk to each other directly.
Task tool
AgenticThe Agent SDK primitive for spawning a subagent. Emit multiple Task calls in a single response to spawn subagents in parallel and reduce round-trip latency.
Orchestrator-workers
AgenticPattern where a coordinator plans at runtime and dispatches worker subagents. Different from a workflow — the plan is decided by the model, not pre-written.
Extended thinking
APIBuilt-in capability where Claude reasons in a dedicated internal channel before answering. Different from CoT prompting (a technique). Use for complex problems.
Chain of thought (CoT)
PromptPrompt technique asking the model to reason step by step (often in <thinking> tags) before producing the answer. Improves accuracy on reasoning tasks; costs tokens.
CLAUDE.md
Claude CodeInstructions file Claude Code reads every turn. Three levels: user (~/.claude/CLAUDE.md, personal), project (./CLAUDE.md, shared via git), directory (path-specific).
.claudeignore
Claude Code.gitignore-syntax file that excludes paths from Claude Code's reads. Controls reading, not writing. For blocking writes, use hooks.
.claude/rules/
Claude CodePath-specific rules with YAML glob frontmatter that apply across an entire codebase — unlike directory-level CLAUDE.md which is location-bound.
Plan mode
Claude CodeMode where Claude proposes a plan before executing destructive changes. Use for multi-file migrations, architecture decisions, or anything you want to inspect first.
Slash command
Claude CodeUser-triggered prompt template in .claude/commands/. File name becomes /name. For repeatable workflows like /pr-review, /release.
Skill
Claude CodeFolder with SKILL.md describing when to trigger and what to do. The 'description' frontmatter field is Claude's routing signal. May include supporting files.
context: fork
Claude CodeSkill option that runs the skill in an isolated subagent context, keeping verbose output out of the main conversation window. Preserves parent context.
Hook
Claude CodeExternal script fired on lifecycle events (PreToolUse, PostToolUse, Stop). Exit 0 allows; exit 2 blocks and surfaces stderr to Claude as feedback. Deterministic gate.
-p (non-interactive)
Claude CodeCLI flag: claude -p 'prompt' runs a single non-interactive turn and exits. Mandatory for CI/CD pipelines — without it the job hangs waiting for input.
Claude Code SDK
Claude CodeProgrammatic API to drive Claude Code sessions from your own code. For building higher-level tools, dashboards, or batch automations on top.
Tool description
Tool DesignThe #1 lever for tool selection. Should specify: what it does, expected inputs, example queries handled, and explicit boundaries vs similar tools.
input_schema
Tool DesignJSON Schema defining a tool's parameters. Use enums to constrain choices; describe every field; mark required fields explicitly.
MCP
MCPModel Context Protocol. Standard protocol connecting AI applications to external systems. Think 'USB-C for AI.' JSON-RPC based.
Host / client / server
MCPHost = the AI app the user opens (Claude Desktop). Client = connector inside the host that speaks MCP. Server = external process exposing tools/resources/prompts.
stdio transport
MCPTransport for local MCP servers running as subprocesses. Communication via stdin/stdout as JSON-RPC. Easy to ship, no network.
Streamable HTTP
MCPCurrent preferred transport for remote MCP servers per the 2025-06-18 spec. SSE is being deprecated for new deployments.
Idempotency key
Tool DesignParameter on mutating tools that lets the agent safely retry after a timeout without doubling side effects. Standard for anything that changes state.
Few-shot
PromptPrompt pattern: include 2-5 input/output examples in <example> tags. Beats detailed instructions for classification, format, and edge cases.
XML tags
PromptStructural delimiters Claude is trained to recognize: <instructions>, <example>, <document>, <output_format>. Partition long prompts unambiguously.
Structured output
PromptReliable way to get JSON: define a tool whose input_schema matches your desired JSON, then use tool_choice to force it. Schema is server-enforced.
Nullable field
PromptSchema pattern: fields that may not exist in source documents should be nullable, so Claude doesn't fabricate to fill a required field.
Prompt caching
PromptMark stable prompt prefixes with cache_control: ephemeral. Subsequent calls within TTL reuse cached compute at reduced cost and latency. Dynamic content must go AFTER the cached prefix.
Batch API
APIAsync, high-volume, cheaper per-token API. For latency-tolerant workloads (overnight reports, bulk extraction). NOT for blocking pre-merge checks where latency matters.
Lost in the middle
ContextDocumented failure mode: content near the middle of a long context gets less attention than content near the start or end. Put critical facts at the top or bottom.
Hybrid retrieval
ContextCombine vector search (semantics) with BM25/keyword (exact terms) and rerank with a cross-encoder. Standard production RAG pattern; beats either method alone.
Case facts block
ContextPersistent verbatim block containing transactional data (amounts, dates, IDs) that must NEVER be summarized. Included in every prompt to prevent progressive summarization from corrupting details.
Model routing
ContextCost pattern: cheap fast model (haiku) triages, strong model (opus/sonnet) does actual reasoning. Typical outcome: 70-80% of turns handled by cheap model.
Independent review
PromptFresh Claude instance with a reviewer prompt reviews another instance's output. More effective than self-review because it doesn't share the generator's assumptions.
Escalation trigger
ContextThree valid triggers: explicit customer request, policy gap (no rule covers the case), inability to make meaningful progress. NOT sentiment or self-reported confidence.
Progressive summarization
ContextCompaction strategy that summarizes older turns. DANGEROUS for transactional data — amounts, IDs, and dates get paraphrased into vague summaries. Use case facts block instead.