Context compaction
Answer: What happens when an agent shrinks its context: standing instructions can be dropped, and some methods keep a residual memory or a separate constraint list.
This hub gathers practice notes and paper notes on context compaction and summarization. Use it when an agent has forgotten a rule after auto-compact, or when you want the library's record of a specific paper.
The practice note on side constraints already states a working habit: keep standing rules outside the summary and put them back verbatim after compaction. Author-reported figures stay on the paper notes; they are not reproduced here unless a note says they were.
Compaction is adjacent to memory, but it is not the same topic. Memory is what you store on purpose. Compaction is what you drop or rewrite when the window fills.
Project notes
- ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization (2509-13313-resum)
- ACON: Optimizing Context Compression for Long-horizon LLM Agents (2510-00615-acon)
- Parallel Context Compaction for Long-Horizon LLM Agent Serving (2605-23296-parallel-context-compaction)
- Lost in Context Compaction: When LLM Systems Drop Side Constraints (2608-11242-lost-in-context-compaction)
- CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agents (2609-26779-cliffcompaction)
- AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents (2610-02163-autocompact)
- REMORY: Learning Residual Memory for Context Compaction (2610-11287-remory)
- Evaluating Context Compaction on the Questions That Come Later (2610-27301-compaction-questions-that-come-later)
- SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification (2611-06876-speccompact)
- Context compaction and side constraints (ao-compaction)
- Gemini CLI compaction: /compress and compressionThreshold (ao-compaction-gemini-cli-compress)
- Beyond one summary: residual memory and parallel compaction (ao-compaction-memory-and-parallel)
- Context compaction can silently drop user constraints (ao-compaction-side-constraints)
- Summarize and resume: long-horizon agents without bigger windows (ao-compaction-summarize-and-resume)
- When should a coding agent compact its context? (ao-compaction-when-to-compact)
Main claims on these notes
- 2509-13313-resum: ReSum is a context-summarization method for long-horizon search agents, presented as compatible with existing agents.
- 2510-00615-acon: Acon reduces peak token usage by 26-54% on AppWorld, OfficeBench, and Multi-objective QA, while improving task success over existing compression baselines, according to the authors.
- 2605-23296-parallel-context-compaction: The authors say sequential compaction can reduce context by 90-99% in token count, with no guarantee of what is kept.
- 2609-26779-cliffcompaction: CliffCompaction is presented as an autocompaction method for coding agents that aims to cut cost under a bounded context.
- 2610-02163-autocompact: AutoCompact adds a compact() action the agent can call during a coding trajectory, rather than compacting only under window pressure.
- 2610-27301-compaction-questions-that-come-later: The authors call the question available at compaction time known and later questions hidden.
- 2611-06876-speccompact: SpecCompact fine-tunes a small drafter and generates structured summary slots in parallel, with target-model verification.
- ao-compaction-gemini-cli-compress: compressionThreshold sets the trigger fraction.
Atlas topics grouped here
- ao compaction
- 2610 02163 autocompact
- 2611 06876 speccompact
Related hubs
What links here
- LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models (2310-05736-llmlingua)
For language models and agents: start at /llms.txt. This page in Markdown: /library/topics/compaction.md.