Context compaction finally has a theory: summarizing provably beats selecting, and the optimal budget equals one-way communication complexity
The first formal analysis of context compaction models it as two games — a Context Selection Game (retain a subset of accumulated state) and a Context Generation Game (summarize state into a bounded message) — and proves the generation game is equivalent to one-way communication complexity, so the minimum compaction budget for answering a query set within a target error is exactly that complexity. It further proves a strict separation: generation-based compaction outperforms selection-based for certain query classes, meaning summarize-then-drop beats retrieve-and-keep on a provable set of workloads. The authors demonstrate the framework by measuring Anthropic's own context compaction endpoint on set membership queries, giving builders a way to score a deployed compaction algorithm against the optimum instead of eyeballing it.
↳ Follow the thread