Skip to content
CCAF Preparation

Domain 5 · 15% of exam

Context Management & Reliability glossary

51 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, and it cannot revert changes made by Bash commands. 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 — email, phone, order number. 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. 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 that fires only when the evaluation flow falls through to a prompt. 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. Its blind spot is that it tracks only edits made through Claude's own file-editing tools, not changes made via Bash commands. 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. 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, annotate both with full attribution and let the consumer decide — 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.
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. Fable 5, Opus 5, and Sonnet 5 ship a 1,000,000-token window by default with no beta header; Haiku 4.5 ships 200,000. Maximum output is 128k tokens for the 1M-window models (300k via a Batches API beta on Opus and Sonnet). 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. Without them a gap reads as the topic being irrelevant rather than the source being unavailable.
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
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, escalate or take an alternative workflow), and permission (access denied or insufficient credentials — escalate or use different credentials).
Hook decision priority
When multiple hooks or permission rules disagree, `deny` beats `defer`, which beats `ask`, which beats `allow`. If any hook returns `deny` the operation is blocked regardless of what the others returned. code.claude.com › hooks
is_error
The optional boolean on a `tool_result` block that signals a client-tool execution failure; return the error text as `content` with `"is_error": true` and Claude incorporates it into its response. Server-tool errors are handled transparently by Anthropic's infrastructure and are not your responsibility. platform.claude.com › handle-tool-calls
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.
Malformed-call retry
Claude's own model-level behaviour: when its tool call is invalid or missing required parameters, it retries 2-3 times with corrections before apologising to the user. This is a separate mechanism from `isRetryable`, which applies after your tool has run and failed. platform.claude.com › handle-tool-calls
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
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 — it ends the query so you can resume it later, 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. 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` alongside `stated_total` with a `total_discrepancy` flag when they differ, and `conflict_detected` booleans marking a source that contradicts itself rather than silently picking one value.
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.
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. 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. It carries the customer ID, a conversation summary, root cause analysis, the amount where relevant, and a recommended action.
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. 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 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. 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 exception or gap where the policy is silent rather than merely restrictive, and a genuine inability to make progress after a real attempt. A policy violation has a documented answer and does not require escalation.
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