Context editing removes stale tool calls and results from an agent’s context as it approaches token limits. It is one part of context management: deciding what enters, stays in, and leaves the context window. section 11.3.8
Coding agents use related mechanisms to keep a compact working context:
- Context editing clears stale tool calls and results. section 11.3.8
- Compaction summarizes long interactions while preserving key implementation details. section 11.3.8
- Memory stores reusable information outside the context window for later recovery. section 11.3.8
