Guide · 28 episodes · updated 2026-09-06

Context management: what stays in the window, what gets dropped

← all guides

How do AI agents decide what to keep in their context window and what to summarize, drop, or retrieve later?

Every long-running hits the same wall: the is finite, but the task, the transcript, and the keep growing. Papers converge on the same fixes — summarize into or dossiers, retrieve only entries instead of raw logs, compress by before reuse — but they disagree sharply on the risk this creates. Some show silently deleting safety rules or stale-but-important facts, producing amnesia or reversals mid-task. Others treat eviction itself as the real bottleneck, arguing agents need more compute at the moment of forgetting, not just a bigger window. A few reframe the whole problem as a security surface, since what gets kept or dropped can be manipulated by an attacker as easily as by a summarizer.

What context management means

Context management is the active engineering problem of deciding what goes into a model’s context window and what gets summarized, dropped, or retrieved on demand. It dominates real-world agent behavior more than most prompt-engineering write-ups admit.

The episodes (28)

Newest first. Each line is what that paper contributed to the question.

Papers we have not covered yet

Other guides

Intro written by Anthropic's Claude Sonnet 5; episodes selected and edited by Garrett Casey. Episode notes come from each episode's own analysis. How PaperDive is made.