liveBook · Manning

Context editing

As explained in Context Engineering

The removal or modification of information in an agent’s active context to manage its contents and size.

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

How Context Engineering covers it

How deep it goes
Defines context editing and contrasts it with compaction and memory, using implementation examples across coding agents.
Examples
Uses Claude, OpenCode, Aider, and a dynamic context-pruning plugin as implementation examples.
What you can do after
Operate context controls by clearing stale tool results, compacting sessions, or persisting reusable memory outside the window.
How it connects
Connects context editing to context management, compaction, memory, and tool-output pruning.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Context Engineering. The section links point to the parts of the book it draws on.