PRODUCTION SCENARIO
A long-running investigation has filled the context with superseded tool results. The bulk of the prompt is those results rather than the conversation text, and each tool call's parameters are a few characters. The three most recent results must stay available verbatim. A short list of source IDs appears only inside older results and has to stay usable once those results are gone.
Which configuration keeps the window manageable without losing the IDs?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: clear_tool_uses with keep at three, paired with the memory tool
Context editing clears the oldest tool results and keeps the most recent, and pairing it with the memory tool is the documented way to hold facts that must outlive the clearing: Claude is warned as the threshold approaches and writes them to memory first. Raising the trigger is right when clearing fires while the window is still comfortable and the results are still needed; here it only postpones the same loss. Clearing tool inputs too is right when the call parameters are themselves large, and these are a few characters. Compaction is right when the conversation text is the bulk, and it summarizes rather than clears, so the recent three stop being verbatim.