Definition

What is Context Pruning?

Last updated

The practice of removing or masking older, low-signal content, usually stale tool observations, from an AI agent's context window as a trajectory grows.

Context pruning keeps a long-running agent's window focused by dropping observations it has likely stopped attending to, but its value is regime-dependent: it helps when a strong retriever feeds a mid-capacity model and hurts once the model is accurate enough to filter its own context. Unlike context compression, which rewrites content into fewer tokens in place, pruning evicts content outright, so it trades a leaner window against the risk of losing evidence the agent later needs.

Put context into practice

Create your first context container and connect it to your AI tools in minutes.

Create Your First Container