Manuscript Offprint

arXiv:2609.37590

FOCUS: Training-Free Decision-Preserving Context Compression for LLM Agents

Shantanu Dixit, Anson Bastos, Xuchao Zhang, Chetan Bansal, Saravan Rajmohan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

LLM agents accumulate interaction histories that grow linearly with task length, causing quadratic inference cost scaling and performance degradation from attention dilution. Existing context-compression methods learn what to discard offline: by contrastively optimizing guidelines, distilling compressors, or training compression policies. This incurs a substantial cost. Further, the compression policy is learned a priori and is not dynamically conditioned on the evolving test-time trajectories. In this paper we ask a complementary question: Which past interactions causally shape the agent's future decisions? We recast context compression as a causal decision preservation problem over discrete interaction units and introduce FOCUS, a training-free context compression framework that operates entirely at test time. Our method requires no offline data collection or fine-tuning, and is architecture-agnostic, attaching to any closed-API frontier model as a modular compression layer. We evaluate FOCUS on diverse agentic benchmarks including API and tool-calling, QA, web domain and multi-turn dialogue. Our method establishes new state of the art performance, cutting peak context by up to 48% and dependency by 73% while improving task success by up to 8.9 percentage points over uncompressed execution.

1 Introduction

Recent advances in large language models (LLMs) have enabled long-horizon agents that solve complex tasks through iterative reasoning and interaction with external environments (Yao et al., 2022; Trivedi et al., 2024; Wang et al., 2024). As an agent acts, its context accumulates an ever-growing history of reasoning, actions, and observations. We refer to a single (reasoning, action, observation) tuple as a span. Because this history grows linearly with the task horizon, and self-attention is quadratic in sequence length, inference cost scales quadratically. Moreover, decision quality degrades as relevant evidence is diluted among accumulated context (Liu et al., 2024). Long-horizon agents therefore face a fundamental bottleneck of retaining the historical context needed for good decisions under a strict context budget.

Existing approaches to context compression largely treat the problem as one of redundancy reduction. Token-level methods (Jiang et al., 2023; 2024) drop tokens according to a language-model likelihood, and soft-prompt methods compress the context into summary vectors (Chevalier et al., 2023). More recent agent-specific methods (Kang et al., 2026; Yuksel, 2025) learn compression strategies offline. A complementary axis reduces cost at the attention level through KV-cache eviction (Zhang et al., 2023; Li et al., 2024). However, these approaches face two limitations: First, token and cache level filtering can corrupt structured interaction traces (tool calls, code, or execution logs), by discarding syntactically predictable but semantically critical elements. Second, methods that rely on offline supervision incur substantial optimization or distillation cost. As their compression policy is fixed before inference, they provide no mechanism to account for task-specific dependencies that emerge at inference time. Reinforcement-learning approaches (Sun et al., 2025) improve adaptivity but add optimization complexity and require open-weight access for training.

In contrast, we argue that context compression for agents is fundamentally not a redundancy reduction problem, but a causal decision-preservation problem. The central question we ask is: which past spans are causally necessary to preserve the agent's future decision trajectory? The relevance of a past interaction is therefore inherently forward-looking: a span should be retained if and only if it influences the agent's future decision trajectory. This perspective suggests that the goal of compression is not to faithfully summarize the past, but to preserve a sufficient statistic of the history required for future decision-making.

From an information-theoretic perspective, the objective, of compressing the history while preserving information relevant to future decisions, corresponds to an Information Bottleneck (IB) objective. Directly optimizing the Information Bottleneck objective is intractable because it requires both (i) searching over an exponentially large space of possible span subsets, and (ii) evaluating mutual information terms involving the distribution of future trajectories in closed form. Thus, instead of directly optimizing for selecting span subsets, we focus on the utility of each span for the task. For this, we seek to estimate the extent to which removing the span changes the agent's predicted future plans (counterfactual utility). We formally show connections between the IB objective and the counterfactual utility of each span. While this formulation is computationally tractable (though still expensive), it has the following caveat: the probability distribution over actions could be unavailable in an online setting. We avoid the need for computing the exact probability distributions over the action space and compute span-wise utility. Specifically we design an approximation based on Monte Carlo Rollouts of the future trajectory and propose FOCUS: Forward-looking Causal Utility Span Estimation, a training-free framework for context compression that operates entirely at test time.

FOCUS offers several advantages. First, it eliminates the need for offline data collection, synthetic trajectory generation, or task-specific fine-tuning, operating entirely through test-time reasoning. Second, it is architecture-agnostic and can be attached as a modular component to both open-weight and closed-API frontier models. Third, by operating over interaction spans rather than tokens, FOCUS preserves the structural integrity of agent trajectories, ensuring that local causal relationships are not disrupted. Fourth, it also eliminates the need to compute exact probability distributions over unknown future trajectories while keeping the computation tractable.

Through extensive experiments on benchmarks: OfficeBench, AppWorld, 8-QA, WebVoyager and τ2\tau^{2}-Bench, we demonstrate that FOCUS significantly reduces context footprint while improving task success rates relative to existing compression methods. Further we empirically show that the additional planning overhead is offset by reduced input-token consumption, yielding lower total token (up to 31%) usage while improving task success (Table 12). Our results highlight the importance of forward-looking, decision-aware compression and establish FOCUS as a simple, effective and practical solution for scalable agent deployment.

Contributions. We summarize our contributions as follows:

• We formulate context compression for agents as a causal decision-preservation problem, and connect it to an Information Bottleneck objective that minimizes retained history while preserving predictive information about future actions.

• We propose FOCUS, a training-free, test-time compression framework that approximates the information bottleneck optimization using Monte Carlo rollouts of future trajectories.

• We introduce a dual-objective strategy combining stochastic plan-based dependency estimation with a verification step that preserves critical, overlooked spans for safe and efficient compression.

• We empirically demonstrate that FOCUS achieves state-of-the-art performance on agent benchmarks, improving task success rates while significantly reducing context usage.

References (23)