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.

Keywords

Publication details

Journal
Not available
Open access
Green open access

Cite this article

APA 7

Min, G., Wu, L., Shi, M., He, Y., Darbari, M., Hong, L., & Chen, C. (2026). Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations. https://omanscience.com/en/articles/adapting-context-compression-for-long-horizon-agents-with-counterfactual-continuations

MLA 9

Min, Guanghui, et al. "Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations." https://omanscience.com/en/articles/adapting-context-compression-for-long-horizon-agents-with-counterfactual-continuations.

Chicago (author–date)

Min, Guanghui, Liang Wu, Mingjia Shi, Yinhan He, Mayank Darbari, Liangjie Hong, and Chen Chen. 2026. "Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations." https://omanscience.com/en/articles/adapting-context-compression-for-long-horizon-agents-with-counterfactual-continuations.

Harvard

Min, G., Wu, L., Shi, M., He, Y., Darbari, M., Hong, L. and Chen, C. (2026) 'Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations', Available at: https://omanscience.com/en/articles/adapting-context-compression-for-long-horizon-agents-with-counterfactual-continuations.

Vancouver

Min G, Wu L, Shi M, He Y, Darbari M, Hong L, et al. Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations. https://omanscience.com/en/articles/adapting-context-compression-for-long-horizon-agents-with-counterfactual-continuations

IEEE

G. Min, L. Wu, M. Shi, Y. He, M. Darbari, L. Hong, and C. Chen, "Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations," https://omanscience.com/en/articles/adapting-context-compression-for-long-horizon-agents-with-counterfactual-continuations.