Domain 5 · 15% of exam
Context Management & Reliability glossary
56 terms drawn from this domain’s 6 lessons and the sources they cite. A term that matters in more than one domain appears on each of their pages.
The full glossary is searchable across all five domains, and the domain curriculum explains where each term is used.
- /clear
- The command that starts fresh with an empty context while Claude Code saves the previous conversation, so it stays resumable via `/resume`. Best practice is to use it frequently between tasks; `/compact` is the alternative when you want a summary of the current work to survive. code.claude.com › sessions
- /compact
- The command that replaces conversation history with a summary. `/compact <instructions>` focuses that summary — for example `/compact Focus on the API changes` — so what survives is the part still relevant to the current iteration rather than a generic recap. code.claude.com › best-practices
- /rewind
- The command (also Esc-Esc on an empty prompt) that opens the rewind menu, offering to restore code, conversation, or both from the automatic per-prompt checkpoints. It is local undo that complements rather than replaces git. A file that only Bash commands changed isn't tracked; once Claude has edited a file with its editing tools, `/rewind` also undoes later Bash changes to it. code.claude.com › checkpointing
- Access failure vs valid empty result
- An access failure means the tool could not reach the data source, so it is `isError: true` and a retry candidate. A valid empty result means the tool reached the source and found nothing, so it is `isError: false` with `resultCount: 0` and is the answer, not a failure. Confusing the two causes wasted retries and wrong escalations.
- Aggregate metrics trap
- A 97% overall accuracy figure can hide 40-60% error rates on specific document types, because high-volume easy segments dominate the average. The rule is to validate accuracy by document type and field segment before automating, then follow the sequence: measure by segment, calibrate confidence, set thresholds, add stratified sampling, and only then reduce human review.
- Ambiguous customer matching
- When a lookup returns several possible customer records, the agent must ask for an additional identifier that actually partitions the candidates — email, phone, order number, postcode — without reading the candidates' details back. Never select by recency, activity, or any other heuristic: the wrong pick risks exposing one customer's data to another or acting on the wrong account.
- Artifact/filesystem output pattern
- Having subagents write large results to an artefact or file that bypasses the coordinator, preserving fidelity and cutting token overhead through a multi-stage pipeline. Rendering should also stay content-appropriate rather than uniform: financial data as tables, news as prose, technical findings as structured lists. anthropic.com › multi-agent-research-system
- Calibration
- Mapping reported confidence to actual accuracy by running labelled validation sets — data where the answer is already known — through the system, then setting routing thresholds from the result (for example, by the share confirmed correct in each confidence band). The labels must come from outside the model, as human verdicts or recorded outcomes; a second model's verdicts are not ground truth. Judge whether the correct final state was reached rather than whether a specific process was followed, and keep manual testing, which catches edge cases evals miss.
- canUseTool
- The permission callback, last step of permission evaluation, which runs only when no earlier step resolves the call. Tools auto-approved by `acceptEdits`, `bypassPermissions`, or an allow rule never reach it — so for a check that must run on every call, use a `PreToolUse` hook instead. code.claude.com › permissions
- Checkpointing
- The separate mechanism that snapshots and reverts file changes, creating one checkpoint per user prompt. Tracking is per file and starts with Claude's own file-editing tools: a file that only Bash commands changed isn't tracked, but once Claude has edited a file with its editing tools, a rewind also undoes later Bash changes to it. Claude Code keeps the 100 most recent checkpoints, and most subagent edits are not tracked. code.claude.com › checkpointing
- CitationAgent
- A dedicated post-synthesis pipeline stage whose sole job is locating citations for the synthesised text, rather than trusting the synthesis step to carry attribution through on its own. anthropic.com › multi-agent-research-system
- Compaction
- Taking a conversation nearing the context limit, summarising it, and reinitiating a new window with that summary — one of three long-horizon techniques alongside structured note-taking and sub-agent architectures. Its named risk is losing subtle but critical context whose importance only emerges later. Tool result clearing is the lightest-touch form, and a beta server-side compaction on Claude 4.6+ summarises earlier turns automatically. anthropic.com › effective-context-engineering-for-ai-agents
- Confidence-based routing
- Reporting high-confidence findings directly and routing low-confidence ones to human review; in review pipelines, route on severity and confidence together, so a low-confidence high-severity finding goes to a person and a low-confidence low-severity one is only logged. Raw self-reported confidence is uncalibrated — a form of the model judging itself — so it is unfit for automated decisions until thresholds are calibrated, and it is never a substitute for explicit criteria defining what counts as a valid finding.
- Conflict handling
- When two credible sources report different values, the analysis agent annotates both with full attribution and the coordinator decides how to reconcile before synthesis — never arbitrarily select one, average them, or prefer the more authoritative publisher. Different publication dates often explain the difference as a trend rather than a contradiction, which is why temporal context must be preserved through synthesis, and a `conflict_detected` boolean marks a value genuinely in conflict as distinct from one that is simply absent.
- Context awareness
- The built-in ability of Sonnet 5, Sonnet 4.6, Sonnet 4.5, and Haiku 4.5 to track their own remaining token budget through a conversation via budget tags the API injects automatically. There is nothing to enable, and it lets the model factor remaining room into its own decisions. platform.claude.com › context-windows
- Context degradation
- The observable symptom of a long exploration session: the model starts referencing "typical patterns" instead of the specific classes, methods, and dependency chains it discovered earlier, as verbose discovery output buries the precise findings. It is not a token-limit problem, so a larger context window does not fix it. It happens over time in one long session, unlike attention dilution, where a single pass is given too many items to judge.
- Context editing
- A beta Claude API feature for managing a growing conversation more selectively than compaction: tool result clearing drops old tool outputs, and thinking block clearing drops earlier extended-thinking blocks, while the rest of the history stays intact. platform.claude.com › context-windows
- Context rot
- The documented phenomenon that accuracy and recall degrade as token count grows, which makes curating what is in context as important as how much space there is. Context is a finite resource with diminishing marginal returns — the model draws on a limited attention budget that every added token depletes. platform.claude.com › context-windows
- Context window
- All the text a model can reference when generating a response, including the response itself. The current models (Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2 and earlier 5.x models), plus Opus 4.6–4.8 and Sonnet 4.6, have a 1,000,000-token window by default with no beta header; Opus 4.5, Sonnet 4.5 and Haiku 4.5 have 200,000. Long context bills at standard pricing except on Haiku 5.5, where prompts over 100,000 tokens cost more. Maximum output is 128k tokens for the 1M-window models (300k via a Message Batches API beta header on Opus 5.5/5, Sonnet 5.5/5, Haiku 5.5, Opus 4.6–4.8 and Sonnet 4.6) and 64k for the 200k models. platform.claude.com › context-windows
- Context window overflow
- If the input alone exceeds the window, every model returns a 400 `invalid_request_error` ("prompt is too long") — there is no silent truncation. On Claude 4.5 and later, input plus `max_tokens` exceeding the window is accepted instead and stops with `model_context_window_exceeded`. The token counting API, `POST /v1/messages/count_tokens`, estimates usage beforehand and is free with its own separate rate limit. platform.claude.com › token-counting
- Coverage annotations
- Explicitly marking synthesis gaps — "section on geothermal energy is limited due to unavailable journal access during research" — rather than silently omitting a topic. In practice each topic area gets a status (well-supported, limited, or a gap) with the reason, and a gap entry ends with an explicit no-claim ("No claim is made about this area"). Without them a gap reads as the topic being irrelevant rather than the source being unavailable.
- Data-collection date
- The date or period the data inside a source was gathered or measured, recorded alongside its publication date because the two differ: a report published in 2026 can carry 2023 data. Neither is the date your pipeline retrieved the page. The dates explain why figures differ, as a trend rather than a contradiction; they do not rank sources.
- detected_pattern
- A field on a structured finding that tags which specific construct triggered it, so dismissal rates can be analysed by pattern. When one pattern is dismissed consistently the documented fix is a formal rule or prompt refinement for that pattern — not another retry. claude.com › building-agents-with-the-claude-agent-sdk
- Error propagation anti-patterns
- Two failure modes: silent suppression, returning empty results marked as success so the coordinator never retries and the final output has invisible gaps — the worst of the two; and workflow termination, killing an entire pipeline on one subagent failure and discarding work that succeeded. The correct middle ground is local retry, then structured propagation, then resuming from the last good state.
- Evaluation rubric
- The criteria an LLM judge scores against, in Anthropic's documented case factual accuracy, citation accuracy, completeness, source quality, and tool efficiency. The shape that proved most consistent was a single call with a single prompt outputting a 0.0-1.0 score plus a pass/fail grade, run against roughly 20 representative queries — enough to see the impact of a change. anthropic.com › multi-agent-research-system
- Field-level confidence
- A continuous confidence score emitted for each extracted field rather than one per document, so only the doubtful field is routed to review. It routes nothing until it has been calibrated against a labelled validation set, with thresholds set per field and per document type.
- Four error categories
- Every tool failure falls into one of four categories, each with its own recovery: transient (timeouts, unavailability, rate limits — retry after a delay), validation (bad input format or missing fields — fix the input and retry), business (policy violations and limit exceedances — never retry; explain the refusal in customer-friendly terms and take the permitted alternative, often escalation), and permission (access denied or insufficient credentials — escalate or use different credentials).
- Hook decision priority
- When multiple PreToolUse hooks return different decisions, `deny` beats `defer`, which beats `ask`, which beats `allow`. One hook's `deny` blocks the tool call. Matching hooks run in parallel and finish in no fixed order, so no hook may rely on another having run. code.claude.com › hooks
- Invalid tool call
- A tool call Claude makes that is invalid, such as one missing a required parameter. Report it like any failure, with a `tool_result` carrying `is_error: true` and a clear message; Claude can then call the tool again with the information filled in. The docs promise no fixed number of attempts, so cap retries in your loop. `strict: true` prevents missing parameters and type mismatches, but not a well-typed wrong value, which only your tool's validation error can catch. platform.claude.com › handle-tool-calls
- is_error
- The optional boolean on a `tool_result` block, "Set to `true` if the tool failed or the call was invalid"; return the error text as `content`. Claude may then call the tool again, so cap retries in your loop. Write instructive messages (what went wrong, what to try next) rather than a bare "failed". For server tools such as web search you send no `is_error` result: the API returns any error inside the tool's own result block. platform.claude.com › handle-tool-calls
- Labelled validation set
- A set of documents whose correct values have been verified by people, used to measure accuracy and calibrate confidence. Labelled by domain experts, stratified to over-represent rare document types, and held out from prompt tuning and few-shot examples so measured accuracy is not inflated. It is rebuilt when the model, prompt, schema or document mix changes.
- Local recovery with selective propagation
- The multi-agent error pattern: subagents retry transient failures themselves, propagate only what they cannot resolve, and include partial results plus what was attempted. It prevents both silent suppression and terminating a whole workflow on one failure.
- Lost in the middle
- Models process the beginning and end of long inputs reliably while findings buried in the middle may be missed or under-weighted. The fix is structural rather than prompt-based: put a key findings summary at the start of an aggregated input, then the detailed results under explicit section headers, with the task at the end. It is a position effect within one input, not attention dilution (too many targets in one pass), which is fixed by splitting the work into passes.
- model_context_window_exceeded
- The `stop_reason` returned when the response filled the model's context window; treat it as truncation, the same way you would `max_tokens`. On 4.5-and-later models a request whose input plus `max_tokens` exceeds the window is accepted and stops this way rather than erroring. platform.claude.com › context-windows
- Partial automation (by segment)
- Deciding automation per segment (document type, field, and their combination) rather than for the whole system: segments whose measured accuracy clears the bar run unreviewed, and failing document types and failing fields stay in human review. Neither "automate everything above a threshold" nor "never automate" is the answer.
- permissionDecision
- The `PreToolUse` hook output field whose four values are `allow`, `deny`, `ask`, and `defer`. `defer` does not fall through to the next permission step — the tool does not run and the turn ends with a result whose `stop_reason` is `tool_deferred`, so the call can be resumed later; it is honoured only in non-interactive (`-p`) runs when Claude makes a single tool call in the turn, and any `updatedInput` returned with it is ignored. code.claude.com › hooks
- Persistent case facts block
- The fix for the progressive summarisation trap: extract transactional facts — customer ID, order IDs, amounts, dates, statuses — into a structured block included in every prompt and never summarised, sitting outside the summarisable narrative history. Your code rebuilds it from current state on every request (it is not a session-start snapshot or the model's memory) and places it before the history and the newest turn. For multi-issue sessions each issue gets its own entry to prevent cross-contamination.
- PreToolUse
- The hook event that runs before a tool executes, able to block, modify, or redirect the outgoing call — the implementation mechanism for prerequisite gates. Hooks run before every other permission step and a hook deny applies even in `bypassPermissions` mode. code.claude.com › hooks
- Programmatic enforcement
- Hooks, prerequisite gates, or code-level checks that physically block a tool until its prerequisites complete. It is deterministic — it works every time regardless of what the model decides — and is the required answer for financial, security, and compliance operations.
- Progressive summarisation trap
- Summarising earlier turns to free budget systematically destroys exactly the information transactional systems need — amounts, dates, order numbers, and customer-stated expectations. "I'd like a refund of $247.83 for order #8891" becomes "customer wants a refund for a recent order", and the agent can no longer act.
- Prompt caching
- Marking a stable prefix with a `cache_control` breakpoint so the API reuses that processed prefix at a fraction of the input cost. Caching matches prefix by prefix from the start of the prompt, so static content — system instructions, tool definitions, reference documents — must come first and volatile content after the breakpoint, or nothing matches. An `ephemeral` breakpoint lasts about five minutes from last use.
- Prompt-based guidance
- Putting workflow rules in the system prompt. It is probabilistic: it works most of the time but carries a non-zero failure rate, which is acceptable for formatting and style but not where a single failure means financial loss, a security breach, or a compliance violation.
- Reviewer capacity prioritisation
- Route the highest-uncertainty items to human reviewers first — low-confidence fields, ambiguous or contradictory sources, document types with historically poor accuracy — and reorder the queue dynamically. Never spread limited reviewer capacity evenly across all extractions.
- Self-correction schema fields
- Schema fields that make discrepancies visible without external logic: `calculated_total` (computed from the line items, never copied) alongside `stated_total` (as printed, nullable) with a `total_discrepancy` flag when they differ, and a `conflict_detected` boolean with a `conflict_note` marking a source that contradicts itself rather than silently picking one value. `conflict_detected` is the retry stop condition: a self-contradictory document is accepted as extracted and routed to review, not retried.
- Source quality heuristics
- Prompt-level guardrails that stop low-quality sources — SEO content farms outranking authoritative publications — from dominating synthesis. anthropic.com › multi-agent-research-system
- Stratified random sampling
- Sampling from each stratum — document type, confidence band, field type — for human verification. Critically it must include high-confidence extractions that are already automated: those are the blind spot, and a novel error pattern there goes undetected without sampling. A flat or volume-proportional draw barely touches a rare segment (200 draws at 2% gives about 4), so each stratum gets a guaranteed minimum, drawn at random within it.
- Structured claim-source mapping
- The five fields every finding must carry so provenance survives a pipeline: the claim, the source URL, the document name, the relevant excerpt, and the publication date (plus the data-collection date where it differs), all required rather than optional. Attribution most commonly dies at step 3, synthesis, where compression and paraphrasing drop the mappings unless downstream agents are explicitly instructed to preserve and merge them.
- Structured error context
- The four elements a failing subagent must return so the coordinator can decide intelligently: the failure type, what was attempted (the specific query, parameters, and target system), any partial results gathered before the failure, and potential alternative approaches. "Search failed" gives the coordinator nothing to act on.
- Structured handoff protocol
- The self-contained summary an agent must produce when escalating to a human, who does not have access to the conversation transcript. The exam guide names four fields: customer ID, root cause, refund amount and recommended action; a short issue summary and the actions already taken are useful additions.
- Structured note-taking
- Anthropic's official name for scratchpad files, also called agentic memory: the agent regularly writes notes persisted outside the context window and re-reads them instead of trusting a filling context. Entries carry exact names and `file:line` references, written after each discovery and read back before the next step; a file that is never read back is a log, not a mitigation. It excels for iterative work with clear milestones, and should be instructed from the start of an exploration rather than deployed once degradation appears. anthropic.com › effective-context-engineering-for-ai-agents
- Structured state manifest
- The crash-recovery mechanism for long explorations: each agent exports its state — what has been explored, key findings, current phase and next steps, unresolved questions — to a known file the coordinator reloads on resume. It is written after every significant step, not once per phase or on shutdown; on resume the coordinator skips complete phases, re-delegates only pending items and injects the established findings. It persists exploration findings across sessions, which is a different job from checkpoints, which undo code changes within one.
- Subagent
- A specialised agent invoked by a coordinator that runs in its own fresh context window. It does not inherit the coordinator's conversation history or system prompt, shares no memory between invocations, and returns only its final distilled message to the parent. That is the exam model; current docs add exceptions: a forked subagent inherits the whole conversation, a resumed subagent keeps its own history, and the `memory` field gives a subagent a persistent directory across conversations. code.claude.com › subagents
- Subagent context isolation
- A subagent's context window starts fresh with no parent conversation; the only content crossing the boundary is the Agent tool's prompt string. Intermediate tool calls and results stay inside the subagent, so heavy exploration never accumulates in the coordinator's context. code.claude.com › subagents
- Unreliable escalation triggers
- Two the exam tests as anti-patterns: sentiment or frustration detection, because emotional state does not correlate with case complexity, and self-reported confidence scores, because the model is often confident on hard cases and hedges on easy ones — producing exactly the symptom of escalating simple cases while attempting complex ones.
- Valid escalation triggers
- Exactly three: an explicit customer request for a human (honoured immediately, with zero investigation first), a policy gap (policy silent or ambiguous on the request) or a customer's request for an exception to policy, and a genuine inability to make progress after a real attempt. A clear policy "no" that the customer accepts is explained, not escalated; a request for an exception to it is escalated.
- What counts toward the context window
- The system prompt, every message in `messages` including tool results, images, and documents, the tool definitions, and the model's own output for the turn including extended thinking. Cached prefixes still occupy the window — caching changes cost, not usage — which is why untrimmed verbose tool results are a budget problem even when cheap to reprocess. platform.claude.com › context-windows