Domain 5 · 15% of exam
Context Management & Reliability flashcards
120 cards distilled from the six task statements in this domain, one question per fact the exam can actually ask for. Anything you mark “Again” comes back at the end of the round, and again tomorrow — a card you keep getting right moves up a box and goes quiet for longer each time, up to a fortnight.
Use these once you have read the lessons — they test recall, not understanding. For the reasoning behind any answer, the domain curriculum explains it, and the cheat sheet condenses it.
Loading your deck…
Every card in this deck
The whole deck as a list, for scanning or printing.
- Which current Claude models have a 1,000,000-token context window by default?
- Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2 (and earlier 5.x models), plus Opus 4.6–4.8 and Sonnet 4.6 — the default, no beta header required.
- Which Claude models have a 200,000-token context window, and what is their max output?
- Opus 4.5, Sonnet 4.5 and Haiku 4.5 — 200k window, 64k max output.
- What counts toward the context window on every request?
- The system prompt, every message (incl. tool results, images, documents), tool definitions, and the model's output for the turn including extended thinking.
- Do cached prompt prefixes still count toward the context window?
- Yes — prompt caching changes what you pay for those tokens, not whether they count toward the window.
- What happens if the input ALONE exceeds the model's context window?
- A 400 invalid_request_error ('prompt is too long') on every model.
- On Claude 4.5+ models, what happens if input + max_tokens exceeds the window?
- The request is accepted; if generation reaches the limit, it stops with stop_reason 'model_context_window_exceeded'.
- What API endpoint lets you estimate token usage before sending a request?
- The token counting API — POST /v1/messages/count_tokens (free, separate rate limit from message creation).
- What is 'context rot'?
- Recall accuracy degrades as the number of tokens in context increases — more context is not automatically better.
- What is the 'attention budget' concept, and what causes it to deplete?
- LLMs have a limited attention budget; every added token depletes it — driven by n² pairwise token relationships stretching thin at long context lengths.
- Which Claude models have automatic 'context awareness'?
- Sonnet 5, Sonnet 4.6, Sonnet 4.5, and Haiku 4.5 — they track their remaining token budget via API-injected tags, with nothing to enable.
- What is 'compaction' (Anthropic's official term)?
- Taking a conversation nearing the context window limit, summarising its contents, and reinitiating a new context window with the summary.
- What is the documented risk of compaction?
- Overly aggressive compaction can lose subtle but critical context whose importance only becomes apparent later.
- What is the safest, lightest-touch form of compaction?
- Tool result clearing — dropping old tool outputs while keeping the rest of conversation history.
- What does a persistent 'case facts' block protect, and why does it sit outside summarised history?
- Transactional facts (amounts, dates, order numbers, statuses) — because progressive summarisation destroys exactly this kind of numerical precision.
- What is the structural (not prompt-based) fix for the lost-in-the-middle effect?
- Place a key findings summary at the beginning of aggregated inputs, with explicit section headers throughout and the task at the end.
- Name the three valid escalation triggers for a support agent.
- Explicit customer request for a human · policy exception/gap · inability to make meaningful progress.
- Name the two unreliable escalation triggers.
- Sentiment-based escalation (frustration detection) and self-reported model confidence scores.
- A customer explicitly says 'I want a human.' What should the agent do?
- Escalate immediately — no investigation, no 'let me try first.' This is an absolute rule with no exceptions.
- Distinguish a policy gap from a policy violation for escalation purposes.
- A gap means policy is silent or ambiguous on the situation (escalate). A clear 'no' that the customer accepts needs only an explanation, but if the customer asks for an exception to it, escalate: the guide lists 'policy exceptions/gaps' as a trigger.
- A customer is frustrated but the issue is straightforward. What's the correct move?
- Acknowledge the frustration and offer the resolution once — do not escalate. Escalate if they then ask for a human; a second offer is the same 'let me try first' delay.
- A tool returns multiple matching customer records. What should the agent do?
- Ask for an additional identifier that partitions the candidates (order number, postcode, card last four) — never select by heuristics like most-recent or most-active, and never read the candidates out.
- What Agent SDK mechanism guarantees an escalation check runs on every tool call, deterministically?
- A PreToolUse hook — hooks are used to 'require human approval for sensitive actions' rather than relying on the model to remember.
- A PreToolUse hook should route a sensitive action to a human rather than kill it outright. Which permissionDecision value does that, and what do the other three do?
- ask — it surfaces the call for human approval. deny blocks it, allow lets it through, defer ends the query so you can resume it later.
- Why is canUseTool the wrong place to put a mandatory escalation check?
- It only fires when the permission flow falls through to a prompt — any call auto-approved by an allow rule, acceptEdits, or bypassPermissions skips it entirely. Use a PreToolUse hook, which runs before every other step.
- What is the hook decision priority order?
- deny > defer > ask > allow. A deny blocks the operation even in bypassPermissions mode.
- What must a structured handoff to a human agent include?
- Customer ID, root cause analysis, and recommended action (plus amount, where relevant) — since the human lacks the conversation transcript.
- What's the proportionate first response to poor escalation calibration, before adding classifiers or sentiment models?
- Add explicit escalation criteria with few-shot examples to the system prompt.
- Name the four elements of structured error context a subagent should return on failure.
- Failure type · what was attempted · partial results gathered · alternative approaches.
- Name the four failure type categories.
- Transient (retry locally) · validation (correct the input, never resend unchanged) · business (do not retry; explain the refusal and take the permitted alternative, often escalation) · permission (propagate, access must change).
- Distinguish an access failure from a valid empty result.
- Access failure: the tool couldn't reach the source (timeout/connection error) — consider retry. Valid empty result: the query executed and found nothing — this IS the answer, no retry.
- How does the Messages API signal a client tool execution failure?
- Return the error message as tool_result content along with 'is_error': true.
- Do you need to handle is_error results for server tools (web_search, code_execution, etc.)?
- No — server tools run on Anthropic's infrastructure and Claude handles their errors transparently.
- When a tool_result reports an invalid/missing-parameter call, what does Claude do by default?
- Retries 2-3 times with corrections before apologising to the user.
- What is the 'silent suppression' anti-pattern, and why is it the worst one?
- Returning empty results marked as success after a failure (e.g. a timeout) — it's invisible, so the coordinator never retries or tries alternatives.
- What is the 'workflow termination' anti-pattern?
- Killing the entire pipeline because one subagent failed, discarding results other subagents completed successfully.
- What should subagents do with transient failures before propagating to the coordinator?
- Attempt local recovery (backoff retry, fallback sources) — for transient failures only; propagate what they cannot resolve, including what was attempted and any partial results.
- What are coverage annotations in synthesis output for?
- Explicitly noting which topic areas are well-supported vs which have gaps due to unavailable sources, instead of silently omitting the gap.
- Why does Anthropic say agent errors are especially dangerous if unhandled?
- Because agents are stateful — minor failures can be catastrophic, and 'we can't just restart from the beginning.'
- What is 'resume-from-failure' / durable execution?
- Building systems that resume from where the agent was when the error occurred, instead of restarting from scratch.
- What did Anthropic observe about a single failed step in production agent systems?
- One step failing can send agents onto an entirely different trajectory — the 'prototype-to-production gap' is wider than anticipated.
- What does 'context degradation' look like in an extended codebase-exploration session?
- The model starts referencing 'typical patterns' instead of the specific classes, methods, and file paths it discovered earlier.
- Is context degradation a token-limit problem?
- No — it's the model losing grip on specific findings as verbose output accumulates. A larger window still fills with verbose output.
- What is Anthropic's official term for 'scratchpad files'?
- Structured note-taking, or agentic memory — writing notes persisted outside the context window that the agent reads back later.
- What kind of work does structured note-taking excel at, per Anthropic's guidance on choosing among the three long-horizon techniques?
- Iterative development with clear milestones.
- What is the PRIMARY benefit of subagent delegation for codebase exploration?
- Context isolation — keeping the main agent's context clean while subagents handle verbose exploration. Parallelisation is secondary.
- How much does a subagent return to the coordinator relative to what it explored?
- It may use tens of thousands of tokens exploring but returns only a condensed, distilled summary.
- What does Claude Code's /clear command do?
- Starts fresh with an empty context; the previous conversation is saved and resumable via /resume.
- What does /compact [instructions] do, and give an example.
- Replaces history with a summary, optionally focused on what you specify — e.g. '/compact Focus on the API changes'.
- When is /compact best used — proactively or only at the context limit?
- Proactively, during extended sessions, to protect context quality — not only as a last resort.
- What creates a Claude Code checkpoint, and what does /rewind restore?
- Every user prompt creates a checkpoint; /rewind can restore code and conversation, conversation only, or code only.
- What is the blind spot of Claude Code's checkpointing?
- A file that only Bash commands changed isn't tracked. Bash changes to a file Claude's file editing tools already edited are rewound.
- What content does a subagent's context window start with when spawned?
- Fresh, with no parent conversation — the only content passed in is the Agent tool's prompt string.
- Why is summary injection needed between exploration phases?
- Because Phase 2 subagents don't automatically inherit Phase 1 findings; without an injected summary they'd duplicate Phase 1 exploration (cold start problem).
- What does a crash-recovery state manifest contain?
- Explored paths, key findings, current phase, and next steps — loaded by the coordinator on resume and injected into agent prompts.
- Why is the 'aggregate metrics trap' dangerous — e.g. a system reporting 97% overall accuracy?
- The aggregate can hide 40-60% error rates on specific document types, because high-volume, high-accuracy segments dominate the weighted average.
- What's the correct validation sequence before automating extractions?
- Measure accuracy by type+field → calibrate confidence with validation sets → set thresholds → stratified sampling → only then reduce human review.
- Should stratified sampling include high-confidence extractions?
- Yes — high-confidence items are automated and unreviewed; they're the blind spot where novel error patterns go undetected without sampling.
- What does calibrating a confidence score require?
- A labelled validation set (ground truth) — comparing the model's reported confidence to actual accuracy per field/document type.
- What LLM-as-judge scoring format did Anthropic find most consistent for scalable evaluation?
- A single LLM call with a single prompt outputting a 0.0-1.0 score plus a pass-fail grade — found 'the most consistent and aligned with human judgements'.
- Name the five dimensions in Anthropic's research-agent evaluation rubric.
- Factual accuracy, citation accuracy, completeness, source quality, tool efficiency.
- Does automated evaluation (evals, LLM judges) make manual human testing unnecessary?
- No — people testing agents find edge cases that evals miss; manual testing remains essential even with automation in place.
- What is a detected_pattern field used for?
- Tagging what specifically triggered a finding, enabling systematic analysis of dismissal/error patterns rather than reviewing anomalies one by one.
- What does 'calibrated review routing' mean when a model self-reports confidence?
- The self-reported score is checked against a labelled validation set before being used as a routing threshold — raw confidence alone is not a routing signal.
- What does the exam guide prescribe when a high false-positive category is eroding developer trust?
- Fix the noisy category, not a global dial: temporarily disable the high false-positive category to restore trust while its prompt is improved, write explicit criteria instead of relying on confidence-based filtering, and define severity levels with concrete examples for consistent classification.
- How should limited reviewer capacity be allocated?
- Route the highest-uncertainty items first — never spread capacity evenly across all extractions.
- Name the five fields of a structured claim-source mapping.
- Claim, source URL, document name, relevant excerpt, publication date — plus the data-collection date where it differs. All required, not optional.
- At which step of a multi-agent pipeline does attribution most commonly get lost?
- Step 3 — synthesis, where an agent compresses and paraphrases findings without explicitly preserving claim-source mappings.
- What is the CitationAgent pattern?
- A dedicated pipeline stage that runs after synthesis, whose sole job is locating specific citation points for the report's claims.
- What are 'source quality heuristics' and why were they added?
- Prompt-level guardrails against picking SEO content farms over authoritative sources — early agents consistently favoured the former until this was fixed.
- What is the artifact/filesystem output pattern, and what does it prevent?
- Subagent outputs bypass the main coordinator for certain results, improving fidelity and cutting token overhead — it prevents information loss from repeated copying through multi-stage processing.
- Two credible sources report different statistics for the same measure. What's the correct handling?
- Annotate with both values and full source attribution — never arbitrarily select one, average them, or pick the more recent/authoritative source. The coordinator decides how to reconcile.
- Source A (2023) reports 8% growth; Source B (2024) reports 12% growth. Is this a contradiction?
- Not necessarily — different publication dates can explain different numbers as a trend, not a contradiction. Publication dates must be preserved to interpret this correctly.
- What does a conflict_detected boolean field enable in a structured schema?
- Distinguishing a field that is genuinely in conflict (two credible but differing values) from one that is simply null/absent.
- How should financial data, news, and technical findings each be rendered in a synthesis report?
- Financial data as tables, news as prose, technical findings as structured lists — never flatten everything into one uniform format.
- What structural practice preserves attribution when passing context between agents?
- Using structured data formats that separate content from metadata (source URLs, document names, page numbers) rather than blending them into prose.
- Which 1M-window model charges more for long prompts?
- Haiku 5.5 — prompts over 100,000 tokens cost more; on the other 1M models long context bills at standard pricing.
- In what order should a request place the case facts block, the history and the newest turn?
- Case facts block first, then the (summarised) history, then the newest turn.
- Is the case facts block a snapshot taken at session start?
- No — your code rebuilds it from current state on every request; a stale block still reads as authoritative while it is wrong.
- What is the strongest general place to trim verbose tool output?
- A PostToolUse hook that replaces the result via updatedToolOutput (keeping the tool's output shape) — before the result enters history.
- Why is trimming a tool result after it is appended to history too late?
- It was already sent and counted on the turn it arrived, and is re-sent every turn until something clears it.
- Should tool output be trimmed by size or by task relevance?
- By task relevance — e.g. dropping delivered_at as boilerplate breaks the return-window check; keep one field list per intent.
- How does lost in the middle differ from attention dilution?
- Lost in the middle is position within one input (reorder + headers); attention dilution is too many targets in one pass (split into passes).
- What does 'compress by restructuring, not by deleting' mean for conversation history?
- Summarise the narrative and keep the case facts verbatim, rather than dropping turns — the stateless API never sees what you omit.
- What two strategies does the API's context editing (beta) offer?
- Tool result clearing and thinking block clearing.
- Upstream agents return compact findings with no dates, source locations or method. What goes wrong?
- It reintroduces the summarisation trap downstream: synthesis cannot weigh, date or attribute the claims.
- The agent is unsure of a fact vs unsure of policy. What does it do in each case?
- Unsure of a fact the customer can supply: ask a clarifying question. Unsure of policy: escalate.
- Is 'money is involved' an escalation trigger?
- No — it is a threshold gate: below the limit resolve; above it a hook blocks the call and redirects to escalation (Task 1.5).
- Policy is silent on a competitor price match. Why is refusing it wrong?
- Silent is not prohibited — refusing invents policy as much as granting it. A gap escalates.
- A request has several parts and one is stuck. What should the agent do?
- Decompose it, resolve the rest, and escalate only the stuck item — not the whole conversation.
- Why must at least one few-shot escalation example resolve rather than escalate?
- An escalate-only set teaches 'escalate' and shifts the boundary instead of defining it.
- What is the design test for a subagent's error payload?
- The coordinator's next action must be derivable from the error alone — no guessing, no going back to ask.
- How should a report word a valid empty result vs an access failure?
- Valid empty: 'No sources found on X'. Access failure: 'X not covered: retrieval failed'.
- Sample Q8 option B (backoff retry, then a generic 'search unavailable'): what is right and what is wrong?
- The local backoff retry is right; the generic status afterwards is fatal — a correct-plus-fatal distractor.
- Which failure types does a subagent retry locally?
- Transient only. Validation is corrected (never resent unchanged); business and permission are propagated.
- Are errorCategory and isRetryable fields of the MCP specification?
- No — they are an application convention carried in the tool result; the guide fixes the four elements, not the field names.
- Attempt 1 retrieves 2 sources, attempt 2 none, attempt 3 one more, then the run gives up. What does the error carry?
- All three partial results — partial results accumulate across attempts and always travel, even on the failure path.
- How should a coverage gap entry end?
- With an explicit no-claim ('No claim is made about this sector'), so silence is not read as a negative finding.
- Scratchpad or /compact first?
- Scratchpad first — compaction is lossy, so write the specifics to disk, then compact.
- What reloads after /compact in Claude Code?
- The project-root CLAUDE.md is re-injected from disk; nested CLAUDE.md files and paths: rules reload when a matching file is next touched.
- What are the key traits of Claude Code's built-in Explore subagent?
- Read-only codebase search returning a summary; runs on the parent's model; starts without CLAUDE.md.
- Manifest vs --resume: what does each restore?
- --resume restores one conversation with its old (possibly stale) tool results; a manifest restores structured state across many agents.
- When should an agent write its crash-recovery manifest?
- After every significant step — not once per phase, on shutdown, or at a context threshold.
- On resume from a coordinator manifest, what happens?
- Skip complete phases, re-delegate only pending items, and inject the phase outputs and scratchpad path into each new agent's prompt.
- How does context degradation differ from attention dilution?
- Degradation happens over a long session (early specifics lose prominence); dilution is one pass over too many items, fixed by focused passes (4.6).
- A scratchpad holds the right specifics but answers stay generic. What is missing?
- The read-back — a scratchpad written but never re-read is a log, not a mitigation.
- Why can a 97% headline coexist with a failing segment?
- It is a volume-weighted mean: a segment at a few percent of volume barely moves it and can still own most of the errors.
- Should automation be decided globally or per segment?
- Per segment: automate what clears the bar; keep failing document types and failing fields in review — not all or nothing.
- Why is a single calibration curve pooled over all document types a mistake?
- It is the same error as one global threshold one level down — thresholds must be per field and per document type.
- Besides low calibrated confidence, what should route an extraction to review?
- An ambiguous or contradictory source: conflict_detected, an 'unclear' value, or a validation failure retry could not fix.
- Why does a flat or proportional sample miss a rare segment, and what fixes it?
- It follows volume (200 draws at 2% ≈ 4); guarantee a minimum per stratum and draw at random inside it.
- What makes a good labelled validation set?
- Labelled by domain experts, stratified to over-represent rare types, and held out from prompt tuning and few-shot examples.
- When must confidence be recalibrated?
- When the model, prompt or schema, or document mix changes; when sampling shows drift; and on a schedule.
- How do Task 5.2 and Task 5.5 treat confidence differently?
- 5.2: a raw self-reported score as a decision rule is the anti-pattern. 5.5: a per-field score calibrated on labels is the design.
- A new document type arrives with no labelled data. How is it routed?
- Full human review until it has labels and its own calibration — not the raw score.
- Which two dates should a finding carry?
- The publication date and the data-collection date (period measured) — a 2026 report can carry 2023 data.
- What three sections should a multi-source report have?
- Well-established findings, contested findings, and coverage gaps.
- Who reconciles conflicting values in the research pipeline?
- Analysis annotates both values, the coordinator decides how to reconcile before synthesis, and synthesis renders the decision with attribution.
- A source says the data 'suggests' a link. May the report say 'shows'?
- No — the source's hedges are data and must be preserved.
- How should conflicts between findings be detected?
- By comparing measure, period and population — not by exact wording.
- Does 'mention the sources you used' satisfy the citation requirement?
- No — it binds per claim; each claim needs its own citation, not a bibliography or one sentence of sources.