What must survive context compaction, and how would you test that the summary preserves it?

Instruction: Explain what to preserve, what belongs in authoritative state, and how to detect lost constraints.

Context: Practice preserving task constraints, evidence, pending work, and trust boundaries when an agent summarizes context.

Updated

Example Answer

I’d preserve the goal, constraints, important decisions, evidence references, completed work, and what still needs doing. Permissions and action status belong in authoritative state, not just a model-written summary. I’d also keep source text distinguishable from instructions so compaction cannot turn a document’s suggestion into user approval. To test the summary, I’d resume the same task from both the full history and the compacted version and check the required outcomes and forbidden actions. A shorter context is useful only if it preserves the facts that affect the next decision.

Concrete example

An agent has been told to draft a supplier email but wait before sending. A useful checkpoint records draft_complete, send_not_authorized, the draft reference, and the pending review. A summary that says “contact the supplier” loses the most important constraint. Test that resumption still produces a reviewable draft and makes no send call.

Follow-up to practice

What would you do if the summary conflicts with the recorded tool result?

Reference

Anthropic: context engineering and compaction

Your preparation path

Work through these questions in order. Read the answer aloud, then explain it in your own words.

Related Questions