What Does Context Compression Cost an Agent? Interaction Costs Unrevealed by Task-Completion Metrics
Organizations: Chongqing University of Science and Technology
Abstract
Task completion is the standard metric for evaluating context compression, yet it is incomplete: compression can increase an agent's interaction cost by forcing it to reacquire dropped state while leaving completion statistically unchanged. We introduce a controlled runtime measurement protocol for reacquisition cost in a bounded-horizon tool-using agent. The agent acts in a deterministic planning environment under a fixed 24-turn horizon. We vary compression severity, compare a dropping operator with a fact-preserving operator, restore dropped state through controlled oracle interventions, and decompose tool calls into retrieval and execution. We evaluate three models across two task regimes. Retrieval calls increase in all six model-regime comparisons and account for almost all added interaction; five of six remain significant after Holm correction. At the prespecified 5x comparison point, completion changes are not significant in any cell. DeepSeek shows a significant completion drop only at 10x compression. GPT-5.5 is the clearest case: completion changes from 80% to 85% (p = 1.0) while retrieval increases from 21.0 to 63.9 calls (p = .002). Retention interventions further separate state quantity, state type, and content validity. Random selection is comparable to an offline hindsight oracle, while replacing retained D-state with semantically irrelevant content increases retrieval by 57% (p < .001) without a significant completion change. In a second environment, ALFWorld, sliding compression produces no retrieval surge, showing that the reacquisition signature is environment-dependent rather than intrinsic to shortening context. Overall, compression can impose hidden interaction costs when execution-relevant state becomes absent and must be reacquired, while completion alone may not expose those costs.
Figures & tables
| Work | Measures | Manipulates | Decomposes | What completion can miss | Our difference |
|---|---|---|---|---|---|
| CostBench | cost-optimal planning; cost gaps | tool costs & availability (blocking events) | cost by event type | cost-suboptimal but valid plans | intact context; we price reacquiring dropped state |
| CompressAgent | reliability & success vs compression | compression retention level | failures: tool-execution vs reasoning | tool failures precede success collapse | no causal state manipulation; we add oracle attribution |
| Token Red. Cost | billed cost; token vs cost deltas | token-reduction strategies | cost by billing component (cache 87%) | token savings cost savings | provider-specific billing; we use a model-agnostic budget |
| Tool-Use Tax | accuracy tax of the tool protocol | tool availability (no-op / oracle probes) | accuracy gap: cmp + frc + sty | protocol tax swamps tool gains | accuracy over intact context; we meter cost of lost state |
| Condition | Context |
|---|---|
| Full | the complete trajectory (baseline) |
| Sliding | a token budget of the trajectory ( , , , ); greedily keep the most recent turns within budget; drop early turns outright |
| Summary | the same budget, but dropped early turns are replaced by a deterministic fact digest [Summary of earlier trajectory --- observed facts] (extractive; keeps observed state facts, discards the model’s reasoning text); zero extra LLM calls |
| Oracle | Full or Sliding context with a specific state string injected as a trailing message (same position in every condition) |
| Intervention | Selection rule |
|---|---|
| Sliding | recency baseline; no digest (recent turns only) |
| RAR-D | retain D-type atoms only |
| RAR-R | retain R-type atoms only |
| RAR-All | retain all atoms in observation order ( Summary control) |
| RAR-TypeAware | retain all atoms, R-first (recoverability-prioritized) |
| Random | random subset of atoms (seeded) |
| ratio | completion | tools | retrieval | execute | turns |
|---|---|---|---|---|---|
| (Full) | 83% | 39.5 | 22.2 | 17.3 | 22.9 |
| 87% | 42.7 | 25.4 | 17.3 | 23.3 | |
| 81% | 49.7 | 33.3 | 16.4 | 22.8 | |
| 72% | 71.4 | 55.1 | 16.3 | 23.1 | |
| 66% | 77.1 | 63.2 | 13.9 | 23.6 |
| condition ( , High) | completion | tools | retrieval |
|---|---|---|---|
| Full | 80% | 37.4 | 19.0 |
| Sliding | 72% | 71.4 | 55.1 |
| Extractive Summary | 83% | 39.0 | 19.5 |
| condition ( , High) | completion | tools | tools vs sliding |
|---|---|---|---|
| Full | 86% | 38.8 | — |
| Sliding | 66% | 72.9 | — |
| Sliding + | 78% | 69.0 | |
| Sliding + | 80% | 35.8 | |
| Full + (sanity) | 85% | 32.1 | — |
| Model | regime | completion Full | (p) | tools Full | retrieval (p) | execute |
|---|---|---|---|---|---|---|
| DeepSeek | High | 83 72 | (0.25) | 39 71 | +32.9 (.002) † | |
| Qwen | High | 75 66 | (0.13) | 34 37 | +2.9 (.088) | |
| GPT-5.5 | High | 80 85 | +5 (1.0) | 39 82 | +42.9 (.002) † | |
| DeepSeek | Low | 100 100 | 0 | 33 55 | +22.6 (.004) † | +0.1 |
| Qwen | Low | 100 94 | (0.25) | 28 36 | +5.3 (.023) † | +2.7 |
| GPT-5.5 | Low | 100 100 | 0 | 26 49 | +22.4 (.002) † | +0.7 |
| policy ( ) | vs Sliding | p |
|---|---|---|
| RAR-All | 0.001 | |
| RAR-TypeAware | 0.001 | |
| Hindsight | 0.001 | |
| Random | 0.001 | |
| Recent | 0.002 | |
| RAR-D | 0.002 |
| metric | TypeAware (real D) | D-Irrelevant | 95% CI | p | |
|---|---|---|---|---|---|
| (retrieval) | 20.4 | 31.9 | +11.5 | [9.2, 13.9] | 0.001 |
| tools | 37.6 | 48.2 | +10.7 | [8.1, 13.4] | 0.001 |
| execute | 17.2 | 16.4 | n.s. | ||
| Q (completion) | 75.0 | 81.0 | +6.0 pp | 0.41 |
| Environment | Compression | retrieval-like actions | completion |
|---|---|---|---|
| IRBench (this work) | Sliding | large positive (2–3 ) | model / regime dependent |
| ALFWorld | Sliding | 0 (paired, symmetric) | small / ceiling-bound |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Model | Regime | p | 95% bootstrap CI | |
|---|---|---|---|---|
| DeepSeek | High | .25 | ||
| DeepSeek | Low | — | — | completion invariant across seeds |
| Qwen | High | .37 | ||
| Qwen | Low | .67 | — | |
| GPT-5.5 | High | .045 | ||
| GPT-5.5 | Low | — | — | completion invariant across seeds |
Context Compression
Context compression reduces the information or memory a model must carry while preserving what it needs to answer questions and act.
See all 90 papers