TL;DR: Order them by what they lose. Clearing drops the bulk of tool results the agent has already used and keeps the record of each call, so it is nearly lossless and runs first. Notes move what must outlast the transcript (decisions with reasons, progress, current facts, active handles) into a small block the harness renders every turn, so they run continuously. Compaction rewrites the conversation into a summary and loses whatever the summary omits, so it runs rarely, at a boundary, under a contract and a test.
How to approach it
Name the three precisely before comparing them, because candidates often use "compaction" for all of them. Then compare on the same three axes for each: what is lost, what it does to the prompt cache, and how it fails. Finish with the order you apply them in and the signal that moves you to the next one.
A strong answer
| Clearing | Notes | Compaction | |
|---|---|---|---|
| What changes | Used results become placeholders; calls stay | A small structured block is kept current | Earlier turns replaced by a summary |
| What is lost | The bulk of results, recoverable by calling again | Nothing, if written well | Whatever the summary leaves out, unrecoverable |
| Cache cost | Miss from the first cleared result, once per batch | None if rendered at the end | Miss for the compacted region |
| Typical failure | Clearing a result the model is still using | Stale or missing entries; model-written goal drift | A dropped identifier, constraint or failed approach |
| When | First threshold, often | Every turn | Later threshold or a finished subtask |
Which fits which run.
- A coding agent that reads many files and test logs. Almost all growth is tool output. Clearing alone keeps it well under budget for a long time; notes record decisions ("export is server-side because client export broke at 50k rows") so clearing the log that taught the lesson costs nothing.
- A support conversation that runs for hours. Growth is mostly what the customer said, which clearing cannot touch. Notes carry the case facts as they are confirmed; compaction eventually runs at a natural boundary, such as a resolved issue, under a contract that keeps every identifier and commitment.
- A research agent reading forty pages. Neither is the main tool: isolate the reading in subagents that return findings, so the pages never enter the parent's context.
The order, and the signal to move on. Clear at a first threshold. If the context is still over budget after clearing because the conversation itself is long, compact at a second, higher threshold or at the next subtask boundary. Notes are not a step in the sequence; they run all the time, and they are what makes the other two safe.
What interviewers probe next
"Why keep the tool call when you clear the result?" Without it the model has no record that it read the file, and it reads it again or assumes the information does not exist. The placeholder says what was there and how to get it back.
"Who writes the notes, the model or the harness?" Both, for different sections. The harness owns the goal and constraints, copied from run state so nothing can drift them; the model writes decisions, progress and facts through a notes tool.
"Can compaction be done by a smaller, cheaper model?" Yes, if it passes the same tests. The risk is not fluency but omission, so measure identifier and decision retention on replayed traces before switching.
What if?
What if · interview follow-ups
Hold your answer as the constraints change
Your agent clears used tool results at 40% of the window and compacts the conversation at 70%.
Start here
What if, after clearing, the agent keeps calling the same tool to reread results it already cleared?
What did it need from those results?
The result held a fact it still needs, and nothing carried it forward. Record that fact in notes when the result is used, or clear fewer recent results. Repeated refetching of the same cleared item is the metric that tells you.
Carry it forwardClear the bulk only after the fact it held is in notes.
Weak answerTurning clearing off, which brings back the original problem.
Constraint changes
What if compaction never triggers because clearing keeps the context below 70%?
Is that a problem?
It is the intended outcome. The cheaper, less lossy tool did the work. Compaction is there for runs whose conversation itself grows long.
Carry it forwardThe best compaction is the one you never needed.
Weak answerLowering the compaction threshold so it runs more.
Constraint changes
What if a user's instruction from turn 2 is lost after compaction?
Should it have been in the transcript at all?
A lasting instruction belongs in run state and the fixed notes section, not only in a message. Lift constraints when they are stated, and add them to the compaction contract's must-survive list.
Carry it forwardConstraints live in state, not in old messages.
Weak answerAsking the compaction prompt to 'remember important instructions'.
Now defend it
In one line, how do you choose among them?
By what the run can afford to lose: clear used results first, keep durable facts in harness-rendered notes all the time, and compact the conversation rarely under a tested contract.
How it's scored
Weak: Treats all three as summarisation, or proposes summarising every turn.
Hire: Distinguishes them by what they lose, applies clearing before compaction, and keeps decisions in notes.
Strong Hire: Compares all three on loss, cache cost and failure mode, matches them to the shape of each run (tool-heavy, conversation-heavy, exploration-heavy), gives the harness ownership of fixed note sections, and names the metrics that show a reduction went wrong.
Common mistakes
- Compacting first, the lossiest step, when most of the context is clearable tool output.
- Deleting tool calls along with their results.
- Letting the model rewrite the goal and constraints in its own notes.
- Forgetting that each reduction breaks the cache, and running them every turn.