Skip to content

Lesson 3 of 6 · 4 min read

Clearing, Compaction and Notes

Long-running agents need context reduction, and the tools differ in how much they lose. Tool-result clearing replaces results already used with placeholders while keeping the record of each call. Notes move durable facts and progress out of the transcript into a small structured store the agent rereads. Compaction rewrites the conversation into a summary and is the lossiest, so it runs rarely, at deliberate boundaries, under a contract that names what must survive, and with a test that checks it did.

Reviewed By the AIAgentInterviews editorial team
free sign-in, no card required

Practise it as an interviewer asks it

Course lessons that teach this

Related lessons