thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

AI & Machine Learning · Advanced

Context Compaction

Summarizing or pruning earlier conversation content so a long-running agent stays within its context window.

Definition

Compaction replaces older turns or tool outputs with concise summaries, preserving key decisions while freeing tokens. Claude Code and the Claude API offer automatic compaction and context editing.

Exam tip

Compaction lets long-running agents continue past the context limit by summarizing earlier turns.

Related terms