context compaction
The core idea is to prevent an AI agent's memory from bloating with every past action and tool output. By compressing older items into compact summaries or discarding irrelevant ones, the agent retains only what is needed for current decisions. This slashes computational load and keeps responses fast, often matching the performance of using the full history.
Across the papers, compaction consistently reduces token consumption and inference cost while maintaining or boosting success rates. Whether through compression, pruning, or learned summarization, the methods show that carefully managed context outperforms full history by avoiding dilution of relevant information. Even lossy approaches preserve task performance, and some frameworks allow deterministic auditability or adapt to task dynamics.
- Papers
- 79
- Released code
- 7
- First seen
- June 2026
- Latest
- Nov 2026
61 papers in the last two months, against 14 in the two before.
Start here
Three papers to read first, in the order they came out- 1Context compaction spares benchmark scores but silently drops task constraints
Context compaction does not affect benchmark task performance but silently removes task constraints.
Oct 2026 - 2Chatbots can recover from earlier mistakes by rebuilding what users asked
Rebuilding the task specification from the user's messages alone, using an analyzer that never sees the assistant's turns, recovers most of the quality lost to polluted multi-turn context.
Nov 2026 - 3Prompt compression weakens refusal of harmful requests in AI models
Context compression weakens refusal alignment in instruction-tuned language models, but Memory Steering restores it.
Nov 2026
How fast it is moving
Often studied with
agent memoryA repository where an agent stores past interactions and outcomes to inform future decisions.26 togethermemory consolidationSummarizing or structuring past information to reduce token usage while preserving task accuracy.10 togetherlarge language modelA neural network trained on massive text corpora to generate coherent text and perform diverse language tasks.10 togetherWho is working on it
The papers
Most central to this idea first, not most recent.
- Big Techcs.AI
Chatbots can recover from earlier mistakes by rebuilding what users asked
Rebuilding the task specification from the user's messages alone, using an analyzer that never sees the assistant's turns, recovers most of the quality lost to polluted multi-turn context.
University of California, San Diego, Microsoft Research · Nov 2026
- Academiccs.AI
Prompt compression weakens refusal of harmful requests in AI models
Context compression weakens refusal alignment in instruction-tuned language models, but Memory Steering restores it.
Digital Innovation Lab, Algoma University · Nov 2026
- Research Labcs.LG
Context compaction spares benchmark scores but silently drops task constraints
Context compaction does not affect benchmark task performance but silently removes task constraints.
ELLIS Institute Tübingen, Max Planck Institute for Intelligent Systems · Oct 2026
- Independentcs.CL
Compaction tuned for one query fails to aid later queries
Optimizing context compaction for the current question does not reliably preserve information needed by later questions, and method rankings change across tasks.
Oct 2026
- Research Labcs.AI
Letting agents manage their own context can cut cost without hurting performance
Most strong frontier models can manage their own context using two tools and one paragraph of guidance, keeping scores and reducing cost.
Hamburg University of Technology, Helmholtz-Zentrum Hereon · Oct 2026
- Big Techcs.CL
Compressed latent packets let different language models reuse context efficiently
Frozen LLMs compress shared context into fixed packets that different receivers read for multiple questions, boosting accuracy and speed.
Rochester Institute of Technology, NVIDIA · Oct 2026
- Chinese Techcs.CV
Adaptive visual memory cuts multimodal reasoning costs without losing accuracy
Adaptive selection of fine-grained visual tokens during decoding improves multimodal reasoning accuracy and efficiency compared with one-shot compression.
City University of Hong Kong, Zhejiang University · Oct 2026
- Big Techcs.AI
FOCUS Compresses Agent Histories While Preserving Future Decisions
FOCUS cuts peak context by up to 48% and improves task success by up to 8.9 percentage points without training.
M365 Research, Microsoft · Sept 2026
- Big Techcs.LG
Streaming KV caches makes agent context compaction faster to train
KV-streams streams KV cache across compactions instead of re-prefilling, achieving 2.6x to 5x faster agent training without performance loss.
Mila, Microsoft · Sept 2026
- Big Techcs.IR
Learned context curation boosts LLM catalog search accuracy
Context curation and post-training with RPTune improves LLM catalog search accuracy by up to 31.4 percentage points.
Google, University of Illinois Urbana-Champaign · Oct 2026
- Top Universitycs.AIcode
Dropping Rather Than Rewriting Context Cuts Long-Horizon Agent Costs
CliffCompaction reduces cost by up to 50% while maintaining or improving performance on coding benchmarks and enabling efficient test-time scaling and continual learning.
Carnegie Mellon University, Bosch Center for AI · Sept 2026
- Chinese Techcs.CL
Documents with long-range dependencies improve language models’ context training
Selecting long documents by their key token density improves long-context model performance more than random selection or generic quality filters.
Hunyuan Team, Tencent · Oct 2026
- Academiccs.LG
KV-Surgeon optimizes LLM cache compaction by jointly selecting and compensating for deletions
Offline KV-cache compaction improves when deletions are scored after surviving entries compensate for them; KV-Surgeon does this and beats prior methods at every tested ratio.
Zuse Institute Berlin, Technische Universität Berlin · Oct 2026
- Chinese Techcs.RO
Context scheduling improves long-horizon robot video prediction
Reorganizing inference context by preserving initial anchor and recent blocks improves long-horizon robot video world model prediction and efficiency.
The Hong Kong University of Science and Technology (Guangzhou), North China Electric Power University · Oct 2026
- Top Universitycs.CV
Weight updates carry video context, cutting prefill cost in frozen video LLMs
Temporary low-rank weight updates, generated per video and question, let a frozen video language model run on far fewer visual tokens without losing task-relevant video information.
Tel Aviv University, Ben-Gurion University of the Negev · Oct 2026
- Big Techcs.CLcode
Persistent context graphs cut agent memory costs without extra model calls
Storing attention-derived importance and dependency links in a lightweight persistent context graph reduces memory compaction latency by approximately 95%.
University of California, Santa Barbara, Microsoft · Oct 2026
- Academiccs.CL
Visual encoding lets language models answer questions with 16 tokens instead of thousands
OpticalRAG compresses retrieved documents into 16 visual tokens using rendered page images, improving accuracy while drastically reducing token usage.
Renmin University of China, ComindX · Nov 2026
- Independentcs.AI
Latent token compression cuts AI agent token use by up to 89% and improves performance
Language-model agents can replace verbose tool outputs with compact learned representations that preserve next decisions, cutting token use and runtime while improving web-search task performance.
Nov 2026
- Chinese Techcs.CL
AI agents can improve accuracy by discarding cluttered task histories
CORAL uses a self-managed working memory toolset to improve LLM agent accuracy on long-horizon tasks while using 6–7× fewer input tokens.
The Chinese University of Hong Kong, Tencent · Oct 2026
- Big Techcs.CV
Compact reusable memory improves question answering over hour-long videos
Video-EMem encodes long videos once into compact time-anchored text and sparse images, then retrieves evidence per query, improving accuracy and cutting latency.
Zhejiang University, Microsoft Research Asia · Oct 2026
- Chinese Techcs.LG
Asymmetric compute allocation improves looped Mixture-of-Experts models
Compressing the first loop visit and spending the saved compute on hidden width lowers validation loss in looped mixture-of-experts models across budget sizes.
SJTU, Shanghai AI Lab · Oct 2026
- Independentcs.CR
Adversarial images and prompts steer models after being removed from context
Adversarial inputs can persist through the KV cache, continuing to influence a model after being removed from the context.
Oct 2026
- Big Techcs.CL
One LLM mechanism handles both retrieval and long-context evidence selection
A single frozen LLM with fewer than 500K trainable parameters handles both corpus retrieval and long-context evidence selection.
NVIDIA, Technion · Oct 2026
- Top Universitycs.MA
LLM orchestrator persistently coordinates robot teams in dynamic disasters
A framework using Markovian summaries, partial delegation, and staleness-aware reprompting rescues 98% of civilians in continuous search-and-rescue with fewer tokens.
University of California, Berkeley, University of Pennsylvania · Oct 2026
- Chinese Techcs.CL
New RL method trains AI agents to handle multiple sessions effectively
Mosaic uses hierarchical advantage optimization to outperform broadcasting in multi-session agentic RL on BrowseComp by 10.1% and with fewer sessions.
HKUST (Guangzhou), Huawei · Oct 2026
- Academiccs.LG
Language models train faster than Transformers while improving recall
Muir linear attention uses sensitivity-allocated low-rank gating and matched-filter readout to reduce perplexity and improve long-context recall over Gated DeltaNet-2 and Transformer.
University of Texas at Austin · Nov 2026
- Research Labcs.AI
Hippocam enables LLM agents to learn from experience without parameter updates by structuring memory as nested intents and consolidating unused history.
An LLM agent can consolidate completed intents into abstract summaries, preserve originals in a tree, and recall details on demand, enabling continual learning without parameter updates.
Institute of Information Engineering, Chinese Academy of Sciences, University of Chinese Academy of Sciences · Oct 2026
- Chinese Techcs.CVcode
Simple clustering preserves video understanding with far fewer visual tokens
Simple clustering of visual tokens by position-aware cross-frame features preserves structure and matches or beats complex compression methods.
Central South University, SenseTime Research · Oct 2026
- Chinese Techcs.CL
Selecting evidence before summarizing improves long-context reasoning efficiency
Highlighting and summarizing relevant evidence before answering improves long-context reasoning and allows more compact output.
Peking University, Baidu Inc. · Sept 2026
- Chinese Techcs.CV
CoVisco compresses long videos inside the vision encoder
CoVisco uses abstract tokens and segmented attention to compress visual tokens, enabling 400-token video understanding that matches or exceeds OneVision-Encoder.
ERNIE Team, Baidu Inc., The Hong Kong University of Science and Technology · Oct 2026
- Top Universitycs.AI
Compressing old tool outputs cuts coding-agent context with modest accuracy loss
Compressing older tool observations into soft tokens with anchored distillation reduces context per call by up to 57% with minor performance loss.
Peking University · Sept 2026
- Big Techcs.AI
LAM Cuts Agent Memory While Bounding Retrieval Score Errors
LAM trims 22.47% of agent memory tokens with 99.984% evidence retention and predicts up to 91.6x speedup by scheduling compaction before prefill.
Argonne National Laboratory, University of Houston · Sept 2026
- Academiccs.AI
Coding-agent harness choices should match model skill and context budget
Coding harness components are conditional: context management matters as context shrinks, planning helps weak models at accuracy and strong models at cost, and bash-only suits capable models.
UMass Amherst, Zoom Video Communications · Sept 2026
- Industrycs.AI
Typed trace folding helps agents and observers manage long runs
A single incremental fold of a live agent trace serves both agent and observer with higher accuracy and lower cost than raw trace reading.
Salesforce AI Research · Sept 2026
- Top Universitycs.AI
Markdown interfaces cut agent context costs without reducing task success
String provides an operating system for LLM agents where every app is a Markdown file, reducing token consumption and errors.
Seoul National University, H1R.AI · Sept 2026
- Chinese Techcs.CV
Streaming video memory works better when internalized as evolving latent tokens
LatentStream converts streaming video memory from store-and-retrieve to retrieve-and-internalize, improving streaming video understanding.
Nanjing University of Science and Technology, Ant Group · Sept 2026
- Top Universitycs.LG
RL with context compaction trains long-horizon agents
Reinforcement learning with trainable context compaction lets long-horizon agentic LLMs train beyond fixed context limits and improves coding benchmark pass rates.
Tsinghua University · July 2026
- Big Techcs.CLcode
Letting language models decide when to compact their context windows
SelfCompact lets models adaptively compact their context, improving math accuracy by up to 18.1 points and search by 5-9 points.
Johns Hopkins University, Apple · June 2026
- Independentcs.AI
Pruning context to recent tool calls improves agent reliability and efficiency
Selective retention of recent tool interactions with summarization outperforms full conversation history for enterprise LLM agents.
June 2026
- Academiccs.AI
Short agent memories fail mainly by dropping facts too early
Fixed-size LLM agent memory fails mainly because writers discard future-relevant facts, and reader-loss training reduces this regret only over short delays.
Independent Researcher, Kean University · Sept 2026
- Top Universitycs.CR
Retained Tool Outputs Can Repeatedly Inflate LLM Agent Costs
Persistent billable state from tool returns enables Denial-of-Wallet attacks; the paper defines and defends with pre-reingestion controls.
Institute of Information Engineering, Chinese Academy of Sciences, University of Chinese Academy of Sciences · Sept 2026
- Big Techcs.AI
Separating agent checks from reasoning improves weaker models’ reliability
DeReAct improves AI agent reliability by moving action approval and task completion checks out of the main reasoning policy.
Amazon, Apple · Oct 2026
- Chinese Techcs.CL
Agents learn to reset noisy context during long web searches
A rubric-driven search agent with self-managed memory and answer verification reaches 72.83 on BrowseComp and improves across several other search tasks.
State Key Laboratory of Multimedia Information Processing, Peking University · Oct 2026
- Chinese Techcs.AIcode
C3M preserves multimodal evidence across sessions within fixed memory budgets
C3M maintains a bounded active index over persistent text-image evidence with relation-aware updates and budgeted routing, improving accuracy on cross-session long-horizon tasks.
Huzhou Normal University, Alibaba Group · Sept 2026
- Big Techcs.AI
Recursive harness search cuts coding-agent token use nearly in half
SoL-Pi reduces token traffic by 44.7-49.0% and API cost by about one third while matching Pi's performance on EdgeBench.
NVIDIA, NTU · Sept 2026
- Independentcs.AI
Smarter merging and packing improve LLM memory under tight budgets
An online clustering method achieves 83% of full-context quality using only 32% of the tokens at a 4k budget.
Sept 2026
- Independentcs.AI
Structured agent memories withstand model upgrades better than compressed notes
Fixed-schema knowledge graphs transfer across model upgrades without accuracy loss, while compressed natural-language notes lose up to 13 percentage points.
Sept 2026
- Research Labcs.AI
Hierarchical memory trees improve long-context reasoning without model training
ConvMem uses hierarchical convolution with strides, skip connections, and multi-kernel decomposition for parallel, training-free long-context reasoning.
Institute of Automation, Chinese Academy of Sciences · Sept 2026
- Top Universitycs.IRcode
VikingRAG Cuts Token Use for Retrieval Over Structured Documents
VikingRAG matches state-of-the-art RAG accuracy while consuming 11.6% to 51.9% of prior tokens, dropping to 5.1% to 32.5% with trace reuse and adaptive escalation.
Renmin University of China, Independent Researcher · Sept 2026
- Chinese Techcs.AI
Full-context drafters help compressed agent models retain accuracy
AsymSpec uses an asymmetric drafter and verifier to recover full-context accuracy at compressed inference cost.
Huawei Technologies Co., Ltd., University of Science and Technology of China · Aug 2026
- Big Techcs.AI
Graph memory keeps continual LLM adaptation efficient as experience accumulates
GraphMemory stores reusable strategies as a graph and retrieves only relevant subgraphs, keeping memory-context length constant and reducing token usage.
Rice University, IBM Research · Oct 2026
- Top Universitycs.AI
Trajectory shortcut trees improve agents without outcome labels or annotations
DENSE organizes agent trajectories into nested shortcut trees to improve task success without external rewards.
Fudan University, Meituan Longcat Team · Sept 2026
- Top Universitycs.RO
Saliency-driven workspace tokens give robots lightweight task memory
A lightweight latent memory, the workspace token, can replace VLM-in-the-loop history reasoning in robot policies, improving speed and task performance.
Massachusetts Institute of Technology, Carnegie Mellon University · Sept 2026
- Chinese Techcs.CL
Similarity-aware context windows improve model routing across multi-turn conversations
SWRouter improves multi-turn LLM routing accuracy by 16.26% over the best individual LLM.
Shanghai Jiao Tong University, Baidu Inc. · Sept 2026
- Independentcs.CL
LLM agents do not reliably improve from their own experience
LLMs can self-improve via self-testing and self-judging, but efficacy depends on pathway and task.
Sept 2026
- Chinese Techcs.CL
Agents learn to manage long contexts through fine-grained reinforcement learning
ContextPilot uses fine-grained RL and an expanded toolset to proactively manage context, outperforming existing methods.
Tsinghua University, Tencent Youtu Lab · Sept 2026
- Chinese Techcs.SE
A two-agent system finds bugs better than one by splitting search and inspection
NINJA uses a navigator and inspectors to balance file-level and function-level search for better issue localization.
Zhejiang University, DAMO Academy, Alibaba Group · Nov 2026
- Big Techcs.AI
Governing memory lifecycle, not just retrieval, boosts LLM agent reuse
Lifecycle-controlled memory improves coding-agent retrieval, bug resolution, and cost by structuring experience, gating detailed recall on struggle, and evicting details after use.
Amazon, Yale University · Oct 2026
- Research Labcs.SEcode
Recovered design docs guide agents to rebuild original module structure, not test results.
Recovered requirements and architecture preserve original module structure better during agentic rebuilds, but do not significantly improve functional correctness.
IDSIA (SUPSI), DFKI · Oct 2026
- Chinese Techcs.AI
Artifact-grounded RL trains a general frontend development agent
WebCoder uses artifact-grounded reinforcement learning to outperform proprietary models on composed frontend development tasks.
Tsinghua University, Zhipu AI · Oct 2026
- Academiccs.LG
Self-Credit rescales self-assigned credit to improve long-horizon agentic RL
Self-Credit improves long-horizon agentic RL by using model-cited critical turns rescaled across rollouts for dense credit assignment.
Meta, Duke University · Oct 2026
- Chinese Techcs.CV
Preserving Retrieved Images Improves Long-Term Multimodal Agent Memory
For multimodal memory agents, how retrieved evidence is presented (delivery) affects accuracy more than retrieval perfection.
Huawei Technologies Ltd., Huawei Pisa Research Center · Sept 2026
- Big Techcs.AI
Terminal-only control improves digital agents across web, desktop and CAD
A terminal-only harness using bash commands outperforms GUI harnesses across web, desktop, and CAD tasks.
Microsoft Research, National University of Singapore · Oct 2026
- Big Techcs.CV
Compressing Video Tokens Across Space and Time Speeds Vision-Language Models
VETO compresses video tokens with hierarchical intra-frame and inter-frame merging, achieving up to 45% faster inference in VLMs while preserving accuracy.
National Taiwan University, NVIDIA · Oct 2026
- Top Universitycs.AI
Compressed routing instances provide fast, strong starts for large solvers
Compressing routing instances before optimization produces refinement-friendly starts that match or beat leading solution quality at far lower computational cost.
Beihang University · Sept 2026
- Top Universitycs.AI
Coding Agents Need Semantic Measures of Working Memory Performance
Semantic heterogeneity in coding-agent working memory requires evaluation beyond nominal token budgets.
Argonne National Laboratory, Columbia University · Sept 2026
- Big Techcs.LG
A lightweight PyTorch-native framework matches Megatron-based agentic RL training performance.
Molt provides scalable PyTorch-native agentic RL training in 9.2K lines, with trillion-parameter support, asynchronous execution, and distributed experience storage.
NVIDIA · July 2026
- Big Techcs.AI
Memory as state management instead of semantic retrieval improves long-horizon agents
MAGE improves task success rate by 7.8–20.4 percentage points and reduces token consumption by 55.1% on MemoryArena.
University of Science and Technology of China, Microsoft · June 2026
- Independentcs.LG
Language models can start answering up to 1.6 times faster
RidgeFill speeds prefill by predicting late-layer inputs from early-layer states with a regression fit once from calibration text.
Independent researcher · Nov 2026
- Big Techcs.CL
Language models retrieve overlooked context better without deleting input text
QGPM uses query-guided attention to reshape position encoding, reducing lost-in-the-middle by pulling relevant tokens closer to the query.
University of Southern California, Amazon Web Services · Nov 2026
- Academiccs.AI
Coding harnesses change token costs more reliably than success rates
Swapping a coding agent's harness moves pass rate no more than rerunning the same harness.
Shandong University · Oct 2026
- Chinese Techcs.CL
Event-centric memory with query-aware graph augmentation boosts long-term dialogue reasoning
QGMem stores long dialogue histories as event-indexed memory units and builds query-specific local graphs, improving retrieval, multi-hop reasoning, and conflict resolution across six benchmarks.
Chinese Academy of Sciences, University of Chinese Academy of Sciences · Oct 2026
- Chinese Techcs.CL
Temporal structure improves long-term memory retrieval for multi-party LLM agents
Temporal structure, used for evidence recovery and state-transition reconstruction, improves long-term multi-party conversational memory.
Beihang University, Alibaba Group · Oct 2026
- Big Techcs.CV
Self-distillation helps vision-language models reason with far fewer visual tokens
Visual token pruning degrades VLM performance primarily due to unreliable use of remaining visual evidence, not irreversible information loss.
University of Toronto, Vector Institute · Oct 2026
- Big Techcs.LG
Compressed LLM memories can preserve skills beyond their source documents
Cartridges++ retains off-context abilities in compressed KV caches with negligible cost.
Apple · Oct 2026
- Big Techcs.LG
Periodic context resets help research agents escape unproductive solution paths
Periodic forking and flushing of chat context helps long-running autoresearch agents escape idea basins and achieve higher scores.
Microsoft Research · Oct 2026
- Chinese Techcs.LG
Joint token-feature KV cache compression speeds long-context LLMs
SlimKV jointly compresses tokens and features in KV cache, achieving high compression with reconstruction-free attention and speedups.
University of Science and Technology of China, Nanyang Technological University · Oct 2026
- Big Techcs.AI
Receiver-specific cache sharing cuts multi-agent costs while improving accuracy
Receiver-conditioned KV-cache filtering cuts multi-agent communication state while improving accuracy and latency over text messaging across several model architectures.
Columbia University, Amazon Web Services · Sept 2026
- Academiccs.AI
Distilled repository skills improve agents conducting machine-learning research
Distilling GitHub repositories into reusable skills boosts autonomous ML research agent performance on four benchmarks.
Beijing Academy of Artificial Intelligence, University of Science and Technology of China · Sept 2026
Concepts are extracted from each paper and reused across the corpus, so this page grows on its own as the desk reads.