Loading...
Context Editing & Tool-Result Clearing(CETC)
A harness or API-level primitive that automatically evicts stale content from the live context window once it crosses a token threshold, most often by surgically replacing old tool_result blocks with short placeholders while keeping the matching tool_use record intact. Because file reads, search hits, and API dumps are re-fetchable, they are dropped at zero inference cost and re-pulled only if a later turn actually needs them, which keeps the KV-cache prefix stable and counters context rot on long loops. Anthropic ships this as clear_tool_uses_20250919 and compact_20260112, with a reported ~84% token reduction on a 100-turn web-search evaluation and a 29-39% performance lift. Distinct from `context-compress-patterns`: clearing losslessly evicts re-fetchable raw results rather than lossily summarizing them, unlike `filesystem-as-context` it needs no explicit write-to-disk offload step, and unlike `memory-forgetting-policies` it is not about decaying long-term memory but about pruning the working window.
Loading technique guideβ¦
Context Editing & Tool-Result Clearing(CETC)
A harness or API-level primitive that automatically evicts stale content from the live context window once it crosses a token threshold, most often by surgically replacing old tool_result blocks with short placeholders while keeping the matching tool_use record intact. Because file reads, search hits, and API dumps are re-fetchable, they are dropped at zero inference cost and re-pulled only if a later turn actually needs them, which keeps the KV-cache prefix stable and counters context rot on long loops. Anthropic ships this as clear_tool_uses_20250919 and compact_20260112, with a reported ~84% token reduction on a 100-turn web-search evaluation and a 29-39% performance lift. Distinct from `context-compress-patterns`: clearing losslessly evicts re-fetchable raw results rather than lossily summarizing them, unlike `filesystem-as-context` it needs no explicit write-to-disk offload step, and unlike `memory-forgetting-policies` it is not about decaying long-term memory but about pruning the working window.
Loading technique guideβ¦