CCA-F › Domain 5

Domain 5 — Context Management & Reliability

15% of the exam · keep agents cheap, fast & dependable · 40 deep-dive subtopics

Exam traps and practice for this domain

On the exam every option in this domain is a sensible practice; these traps decide most questions. Each trap page has a simulator and exam-style practice.

Practice: 43 plain-style questions on D5, each with “Explain simply” and “Think it through”. New here? Start here.

This is the curriculum hub for Domain 5. Each subtopic below is a self-contained, architect-level page: concept → diagram → real API/code → trade-offs → exam traps → practice questions. Every number, error code, header, and field is verified against the Messages API and the official docs. Work top-to-bottom, or jump to any cluster.

🧪 Take the Domain 5 Mock Exam Bank ›
Exam-level, scenario-based questions per cluster + a full mock — instant scoring & explanations.
🗄️ Prompt Caching & Memory — where it lives, how it works: who stores the cache, what step is skipped, and which memory store (DB / vector / graph) to pick.
🧹 Cheat sheet — Fixing Context Bloat: which technique to use when (decision flow + master table with the integrity rule for each).
🧯 Who catches what — 400 vs refusal vs is_error: the request pipeline, why a 400 is server-side/pre-model, and every reason a request 400s.
🕳️ Silent failures — passes but wrong: the dangerous quadrant (HTTP 200, end_turn, no flag, still wrong) — hallucination, logic errors, wrong tool args, and how to make them loud with evals, a verifier & deterministic checks.
💰 Cost — anti-patterns, best practices & the JSON that always costs more: the cost model, 15 anti-patterns + fixes, costlier-vs-cheaper request pairs, CoT/adaptive-thinking cost, and a guardrail checklist (the CostSherlock seed).
🛡️ Guardrails — the full catalog to build: every guardrail an agent needs, by risk (security, prompt-injection, hallucination, reliability, privacy/GxP, content-safety, human-in-the-loop, observability), each tagged with the layer it must be enforced at.
🧑‍💻 Runnable example: examples/context_bloat_techniques.py — every technique done without breaking integrity or reliability (README).

Cluster 1 · Context Windows & Token Budgeting

Cluster 2 · Prompt Caching

Cluster 3 · Managing Long Conversations

Cluster 4 · Long Context & Retrieval

Cluster 5 · Reliability: Errors & Retries

Cluster 6 · Reliability: Degradation & Recovery

Cluster 7 · Cost & Performance Optimization

Cluster 8 · Observability & Production Ops

Ready to test yourself? Head to the Domain 5 Mock Exam Bank.