cs.CLOct 14, 2026

Prune the Summary, Not the History: Source-Judged Compaction for Long-Horizon Agents

Authors: Guanghui Min, Chen Chen

Organizations: Department of Computer Science, University of Virginia

Abstract

Long-horizon LLM agents rely on context compaction: when the interaction history outgrows the context window, a compressor replaces it with a natural-language summary. We show that these summaries contain more than a record of what happened. Compaction prompts ask for decisions and next steps, so each summary mixes facts established by the environment with reasoning written by the compressor, and the agent cannot tell the two apart afterwards. In an analysis of a widely used structured compressor, 83% of failed runs trace back to an action that carries out a specific summary entry, most of which no environment output supports. We propose Source-Judged Compaction (SJC), a training-free post-processing step that scores each summary entry for whether it has a source in the environment outputs or the previous summary, and removes the entries that do not. It changes neither the agent nor the compressor and adds one inexpensive judge request per compaction. The judge is Jev, a non-generative decision model that answers the source question with a calibrated probability instead of text. On AppWorld and OfficeBench with two agent models, SJC improves cross-run reliability over the underlying compressor by 2.1%-8.9% without increasing the agent's token usage.

Figures & tables

Appendix figures & tables6 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Compact-Bench: Measuring What Context Compaction Costs Long-Horizon Coding Agents

    Oct 22, 2026Ruopei Sun, Jianfeng Cai, Kangwen Zhao +2Context Compaction for LLM AgentsLLM Context Compression

  2. Parallel Context Compaction for Long-Horizon LLM Agent Serving

    May 22, 2026Musa Cim, Burak Topcu, Chita Das +1LLM Inference EfficiencyLLM Agent Workflow Optimization