Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations

📅 2026-09-28
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the challenge that long-context compression for AI agents is constrained by downstream execution, where existing methods struggle to isolate individual compression errors and remain susceptible to stochastic interference. We propose PAIR, a framework that leverages counterfactual continuation and interventional rollouts to precisely pinpoint isolated compression events responsible for reliability degradation, while adaptively optimizing structured compression prompts. Our analysis reveals that compression primarily compromises reliability rather than solvability. Experimental results demonstrate that PAIR achieves state-of-the-art cross-run stability across all evaluated benchmarks, with performance closely approaching or even surpassing uncompressed baselines without requiring any modifications to downstream agents.
📝 Abstract
Long-horizon agents require context compression to manage growing interaction histories. Compression quality, however, is ultimately determined by downstream execution. Existing prompt-adaptation methods infer compression errors by comparing full-context and compressed trajectories. Such comparisons cannot isolate individual compressions and are confounded by agent stochasticity. We first find that compression degrades reliability before solvability. Using matched counterfactual continuations that compare execution from the same agent state with versus without compression, we further show that severe degradation concentrates at isolated compression events. Motivated by this finding, we propose PAIR (Prompt Adaptation using Interventional Rollouts) for adapting structured compression prompts. PAIR identifies individual compressions that degrade subsequent execution, diagnoses their effects, and revises the relevant sections of a fixed compression template. PAIR achieves the strongest cross-run reliability among compressed methods in every main benchmark-scope combination, consistently exceeding the competing prompt-adaptation baseline. Without modifying the downstream agent, PAIR brings compressed execution close to the no-compression baseline and sometimes numerically exceeds it.
Problem

Research questions and friction points this paper is trying to address.

context compression
long-horizon agents
prompt adaptation
compression reliability
counterfactual continuations
Innovation

Methods, ideas, or system contributions that make the work stand out.

Context Compression
Long-Horizon Agents
Counterfactual Continuations
Prompt Adaptation
Interventional Rollouts
🔎 Similar Papers
No similar papers found.