Claude Partner Certificate — 5 · Context & Reliability
CC — 07

Domain 5 · Context Management & Reliability

This domain is about keeping an agent's memory, errors and sources trustworthy: what to keep in context, when to escalate, how subagents report failure, and how to keep track of where each claim came from.

Read time9 min
Exam weight15%
Tasks5.1 to 5.6
SectionClaude Partner Certificate

Videos: Ep 18 to Ep 20

Key terms: Context window: everything Claude can see at once. Summarization: shrinking earlier conversation into a shorter version. Escalation: handing a case to a human. Provenance: where each piece of information came from. Confidence score: how sure a system says it is.

01 — task 5.1

5.1 Manage conversation context to preserve critical information across long interactions

What it is: Claude can only use what is in its context window, and that fills up and gets summarized as a conversation grows. Summaries blur exact numbers, details in the middle of long inputs are easy to miss, and bulky tool results waste space. The fix is to keep key facts in a short, separate block and trim everything else.

The exam tests: how context gets lost or diluted, and how to protect the facts that matter. Video: Ep 18.

Attention dips in the middle of the context

Where in the contextHow well the model attends
Beginning (system prompt, first message)Strong
MiddleBlind spot
End (most recent messages)Strong

A PostToolUse hook keeps about 20 of 400 tokens

flowchart LR A["Raw tool output<br/>400 tokens"] --> H["PostToolUse hook"] H --> C["Agent context<br/>clean case facts, about 20 tokens"] H -.-> N["95% noise dropped"]

Full notes

Rule: The API is stateless, so every request must carry the complete conversation history.

Rule: Progressive summarization turns exact numbers, percentages, dates and customer expectations into vague summaries.

Rule: The lost-in-the-middle effect: models handle the start and end of a long input well and may skip findings in the middle. Put key findings at the beginning of combined inputs, and organize details under explicit section headers.

Rule: Tool results pile up and eat tokens out of proportion to their value, for example 40 or more fields per order lookup when 5 matter. Trim verbose output to the relevant fields before it accumulates.

Rule: Keep a persistent "case facts" block (amounts, dates, order numbers, statuses) in every prompt, outside the summarized history. In multi-issue sessions, keep structured issue data in a separate layer.

Rule: Require subagents to return metadata (dates, source locations, methodology) in structured output. When downstream agents have small context budgets, have upstream agents return key facts, citations and relevance scores instead of long reasoning.

✗
Trap
Trusting a running summary to carry exact figures.

Deep dive

02 — task 5.2

5.2 Design effective escalation and ambiguity resolution patterns

What it is: Escalation means handing a case to a human. An agent should do it when the customer asks for one, when the policy does not cover the situation, or when it is stuck. A customer's mood, or the agent's own confidence score, are poor signals.

The exam tests: the right triggers for handing a case to a human, and the wrong ones. Video: Ep 18.

Escalate on requests, gaps and stalls, not on mood or confidence

Escalate whenDo not escalate on
Customer explicitly asks for a humanFrustrated tone on its own
Policy is silent or has a gapSelf-reported confidence score
Agent cannot make meaningful progressTask complexity on its own

Several customer matches? Ask for another identifier; never pick one by heuristic.

Full notes

Rule: Escalate when the customer explicitly asks for a human, when policy is silent or has a gap on the request, or when the agent cannot make meaningful progress.

Rule: Honor an explicit request for a human straight away, without investigating first.

Rule: If the issue is straightforward and within the agent's reach, acknowledge the frustration and offer a resolution. Escalate only if the customer repeats their preference.

Rule: Sentiment and self-reported confidence scores are unreliable stand-ins for how complex a case really is.

Rule: When a lookup returns several matches, ask for another identifier. Do not choose by heuristic.

Rule: Put explicit escalation criteria, with few-shot examples, into the system prompt.

✗
Trap
Escalating easy cases while trying to handle policy exceptions alone. Also wrong: escalating on tone, or on a confidence number the model reports about itself.

Deep dive

03 — task 5.3

5.3 Implement error propagation strategies across multi-agent systems

What it is: In a multi-agent system, a subagent that fails should report what happened, what it tried, any partial results and what could be tried next, so the coordinator can decide. It fixes small problems itself first, and never hides a failure by returning an empty result as if it had worked.

The exam tests: what a subagent should report when something fails, and what it should not hide. Video: Ep 19.

An ideal error response includes:

  • Error category
  • Whether it is retryable
  • The query that was attempted
  • Partial results and alternatives

Full notes

Rule: Structured error context (failure type, attempted query, partial results, alternatives) lets the coordinator choose a recovery.

Rule: An access failure, such as a timeout, needs a retry decision. A valid empty result is a successful query that found no matches.

Rule: Subagents recover locally from transient failures. They pass up only what they cannot resolve, with what was attempted and the partial results.

Rule: Synthesis output should carry coverage annotations: which findings are well supported, and which topics have gaps because sources were unavailable.

✗
Trap
Two anti-patterns: silently suppressing an error (returning an empty result as a success), and ending the whole workflow because of one failure. A generic status such as "search unavailable" also hides context from the coordinator.

Deep dive

04 — task 5.4

5.4 Manage context effectively in large codebase exploration

What it is: In a long session on a big codebase, Claude gradually loses track of what it found earlier. You keep it on track by writing key findings to a scratchpad file, using /compact to shrink the conversation, and saving agent state in a manifest file so work can resume after a crash.

The exam tests: how to keep a long exploration coherent, and how to recover after a crash. Video: Ep 19.

Handle silent failures in three layers

flowchart LR A["Error<br/>structured error escalation"] --> B["Context<br/>scratchpad and /compact"] --> C["Recovery<br/>manifest file"]

Full notes

Rule: In long sessions, context degrades. Answers become inconsistent, and the model refers to "typical patterns" instead of the specific classes it found earlier.

Rule: A scratchpad file records key findings on disk, outside the context window. Tell Claude to use it, and add it to CLAUDE.md for pipelines.

Rule: Send subagents to answer specific questions ("find all test files", "trace the refund flow") while the main agent keeps the high-level picture.

Rule: Summarize one exploration phase before you start the next, and inject that summary into the new agents' context.

Rule: For crash recovery, each agent exports its state to a known location (a manifest). The coordinator loads the manifest on resume and injects it into the agents' prompts.

Rule: /compact reduces context use when it fills with verbose discovery output, keeping the highlights.

✗
Trap
Letting one long session carry everything until it forgets what it found.

Deep dive

05 — task 5.5

5.5 Design human review workflows and confidence calibration

What it is: Even when an automated system is 97% accurate overall, it can be weak on one type of document. You find out by sampling results from each group and by checking confidence scores against known answers. Low-confidence or unclear cases go to a human reviewer.

The exam tests: how to measure real accuracy and decide where humans look. Video: Ep 20.

Full notes

Rule: A high overall accuracy, such as 97%, can hide poor results on specific document types or fields.

Rule: Stratified random sampling of high-confidence extractions measures the true error rate and reveals new error patterns.

Rule: Field-level confidence scores must be calibrated with labeled validation sets. Raw model confidence is not enough.

Rule: Check accuracy by document type and by field before you reduce human review.

Rule: Send low-confidence extractions, and those with ambiguous or contradictory sources, to human review. This focuses limited reviewer time.

✗
Trap
Cutting review because the overall accuracy number looks good.

Deep dive

06 — task 5.6

5.6 Preserve information provenance and handle uncertainty in multi-source synthesis

What it is: When Claude combines findings from several sources, it can lose track of which claim came from where. The fix is to carry each claim together with its source and its date through every step, and when two sources disagree, to show both instead of choosing one.

The exam tests: how to keep every claim tied to its source, and what to do when sources disagree. Video: Ep 20.

Provenance is most at risk at the synthesis step

flowchart LR A["Search agent"] --> B["Analysis agent"] --> C["Synthesis agent"] --> D["Report agent"] C -.- N["Highest-risk boundary for provenance loss: explicitly require source tags in its system prompt and output schema"]

Full notes

Rule: Source attribution is lost when findings are compressed in a summary step without claim-source mappings.

Rule: Subagents output structured claim-source mappings (source URLs, document names, relevant excerpts). Downstream agents must preserve and merge them.

Rule: When credible sources give conflicting statistics, annotate the conflict with source attribution. Do not pick one. The coordinator decides how to reconcile them.

Rule: Require publication or collection dates in structured outputs, so a difference over time is not mistaken for a contradiction. This is a schema fix: dates are required fields. Prompt tuning and retry logic do not fix it.

Rule: Structure reports to separate well-established findings from contested ones. Match the format to the content: tables for financial data, prose for news, structured lists for technical findings.

✗
Trap
Choosing one of two conflicting values, or leaving dates optional.

Deep dive