Learn · Context management & reliability · CCAR-F task 5.1

Context is a budget, not a bucket

Long sessions lose facts in the middle. Keep a sourced case-facts block outside the history, trim tool output, and load the rest just in time.

Key ideas

Worked example: Compacting with a focus

In Claude Code, /compact keep the API design decisions summarises the session while telling the summary what must survive. Auto-compact does the same near the limit; in the API, server-side compaction plays this role.

Exam traps

Official docs

Practise CCAR-F questions · Next lesson: Escalation and ambiguity