AITraining2U

Programs

Resources

Case Studies

Quick Links

Enquire Now
Core Domain 5 · Context Management & Reliability ~45 min

Compare context editing, compaction and external memory

Pick the right strategy for a conversation that outgrows the window.

Three different tools solve three different long-run problems, and the exam tests whether you can tell them apart. Build a long-running agent and apply each in turn.

What to build

  1. Build an agent that runs long enough to approach the context limit.
  2. Strategy A: clear stale tool results from the history and measure what breaks.
  3. Strategy B: compact — summarise the run so far and continue from the summary.
  4. Strategy C: write durable facts to external storage and retrieve on demand.
  5. For each, record what information was lost and whether the loss mattered.
  6. Decide which strategy fits which of three scenarios you write yourself.

Done when

  • You can state what each strategy discards and what it preserves.
  • You have identified a task where compaction loses something essential.
  • External memory survives a process restart; the other two do not.
  • Your choice for each scenario is defended by a property, not a preference.

The trap this exercise teaches

Reaching for a bigger context window as the answer. More window does not fix attention degradation — it just costs more to be confused in.

Before you start

The theory behind this build is covered in Context editing, compaction and memory. If any step below is unfamiliar, read that first — the exercise assumes it. Primary source: Claude Docs — Context editing.

Check yourself against the exam

This exercise sits in Domain 5, which is 15% of the CCAR‑F exam. Once you have built it, run a domain drill in the study app and see whether the questions read differently.