loading
loading
Clearing stale tool results or thinking blocks out of the conversation before the model sees them, to keep a long agent run lean.
A beta feature where you pass context_management.edits with a strategy like clear_tool_uses_20250919 (drops old tool results) or clear_thinking_20251015 (drops thinking blocks). It prunes rather than summarizes — the cleared content is gone, not condensed — which is the opposite of compaction. Use it when old tool outputs are no longer relevant and you want a leaner transcript without paying to re-process or summarize them; many long-running agents use editing, compaction, and a memory tool together.
Plainly
Think of Context Editing as a simple recipe for doing the work better. Clearing stale tool results or thinking blocks out of the conversation before the model sees them, to keep a long agent run lean.
In practice
Use it when you need a repeatable method instead of guessing from vibes. In practice, define the owner, input, output, and failure mode before you rely on it.