Episode Six completes Foundations by engineering context, uncertainty, provenance, and escalation. By the end, you should be able to preserve authoritative state outside the transcript, compact without losing critical evidence, handle conflicting sources, and connect the complete Foundations control stack. Now apply those principles to the finite and fallible context available to the model. A model can reason only over the information actually present and usable in the current request. The context window may be large, but irrelevant volume still increases cost and can make critical facts harder to use. What should a context strategy preserve first? The task, authoritative facts, current workflow state, material decisions, unresolved questions, and provenance needed for the next action. Meanwhile, bulky raw material can remain in durable storage and be retrieved when needed. Harbour Resolution has a case containing two hundred emails, six calls, four policy versions, and several transaction files. Sending everything on every turn is not a serious context strategy. The system should index source material, retrieve task-relevant evidence, and retain a compact case state outside the model conversation. That case state can identify parties, chronology, contested facts, authoritative sources, prior human decisions, and open evidence gaps. The model receives the subset needed for the present step. What is the lost-in-the-middle problem in practical terms? Important information can be overlooked when buried among large amounts of less relevant context, even though it technically fits. Therefore, organise context deliberately and do not assume capacity equals attention. Place stable high-priority instructions clearly, group related evidence, label sources, and keep the immediate question unambiguous. Retrieval quality often matters more than maximising token use. Long-running agents also accumulate tool results, repeated drafts, and superseded plans. Context editing can remove or replace material no longer needed for the next decision. Compaction can summarise an earlier conversation so work continues within a bounded window. Current Claude platform documentation recommends server-side compaction for supported long-running workflows. Does a compacted summary become the authoritative record? No. Durable application state and original evidence remain authoritative, while the summary is a working representation that may omit nuance. Consequential facts should carry stable identifiers so they can be rehydrated and verified. A summary that says customer disputed a charge is weaker than one that preserves transaction identifiers, dates, amount, source messages, and unresolved contradiction. Do not repeatedly summarise summaries without checking against source material, because small losses can compound. Subagent handoffs create the same risk. Pass explicit fact tables, evidence references, assumptions, and unknowns rather than a vague narrative impression. Now consider ambiguity. Claude may understand a request linguistically while still lacking operational facts required for safe action. A customer saying cancel it could refer to a card, transfer, complaint, or subscription. The agent should ask a targeted question or escalate rather than choosing the most convenient interpretation. What makes an escalation good? It states what is known, what remains uncertain, what was attempted, what risk prevents continuation, and what decision the human must make. The workflow should preserve the response so the agent resumes from the human decision rather than starting again. Escalation criteria can combine deterministic rules and model judgement. Application code should force escalation for prohibited actions, missing authentication, regulatory thresholds, and failed control checks. Claude can identify semantic ambiguity, conflicting evidence, unusual circumstances, or likely customer distress. A prompt-only escalation rule is too weak for a mandatory threshold. Tool errors must propagate with the same honesty. If policy retrieval failed, the final answer must not say no relevant policy exists. It should say the source could not be checked and route the matter accordingly. Confidence scores need similar care. A model-generated number is not automatically calibrated probability. Before using confidence to automate decisions, compare confidence bands with observed accuracy on representative data. Low-confidence cases may go to human review, but high-confidence samples also need review to detect confidently wrong patterns. That is why stratified sampling is stronger than reviewing only visibly uncertain outputs. Human review should target risk as well as uncertainty. A low-value typo correction may need no review, while a high-impact payment recommendation may require approval regardless of model confidence. Provenance is the final reliability pillar. Every material claim should be traceable to a source, tool observation, or clearly labelled inference. For changing information, retain source dates and effective dates rather than merely the time the agent retrieved it. If policy versions conflict, determine authority and applicability before preferring the newest upload. A document uploaded yesterday may contain a policy superseded last year. What should the model do when sources genuinely disagree? Preserve the disagreement, explain its consequence, seek an authoritative resolution, and avoid manufacturing consensus. The common thread is that reliable architecture makes uncertainty, failure, state, and authority visible. Foundations is not a vocabulary test about agents. It tests whether you can build a controlled loop whose tools, context, prompts, and workflows behave coherently under realistic conditions. Before moving to Professional, you should be able to sketch the support agent from end to end. Show the user request, authenticated identity, orchestrator, Claude request, tool catalogue, read-only services, tool-result history, escalation route, structured draft, validation, approval, and audit trail. Then point to which components are probabilistic and which components enforce guarantees. Foundations is complete when you can connect the loop, tools, prompts, context, escalation, provenance, and deterministic controls as one coherent system. For source navigation, use the context-window, compaction, context-editing, prompt-caching, hallucination-reduction, and human-escalation material. In the next episode we step back from implementation and design the entire Harbour Resolution platform around business value and service constraints.