🚀NEW LABGetting Started with Claude AgentsStart lab
← All papers  /  Oct 5, 2026
Efficiency · Agents

Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations

First page
Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations
The curator’s take

Guanghui Min, Chen Chen and colleagues at the University of Virginia with Nokia study how repeated context compression hurts long-horizon agents and introduce PAIR, which locates the individual compressions that cause failures and rewrites the compression prompt around them.

Ask this paper

Key points
01

Reliability drops first. Compression lowers cross-run consistency before it lowers whether a task can be solved at all, and adds recovery steps.

02

Damage is localized. Using counterfactual continuations from the same agent state with and without a given compression, the authors find that most compressions add a few steps while large drops in success concentrate at a small number of compression events.

03

PAIR. Prompt Adaptation using Interventional Rollouts flags those harmful compressions, diagnoses what information they dropped, and revises the matching sections of a fixed compression template. The agent, compressor model and tools stay unchanged.

04

Results. On AppWorld, OfficeBench and tau-Bench Retail, PAIR gives the highest consistent task completion among compressed methods in every benchmark-scope combination, beats the strongest prompt-adaptation baseline, and approaches or sometimes exceeds uncompressed execution.

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.

Every Monday
Get next week’s papers.
Subscribe on Substack