Source-linked AI summary
Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations
Guanghui Min, Liang Wu, Mingjia Shi, Yinhan He, Mayank Darbari, Liangjie Hong, Chen Chen
TL;DR
Long-horizon agents need context compression as interaction histories grow, but trajectory comparisons cannot isolate individual compression effects and are confounded by agent stochasticity. PAIR uses matched counterfactual continuations to diagnose harmful compression boundaries and adapt structured prompts. It delivers the strongest cross-run reliability among compressed methods across the main benchmark-scope combinations, while bringing compressed execution close to uncompressed performance.
Problem
Long-horizon agents need context compression as histories grow, but trajectory-level comparisons cannot reliably isolate individual compression effects because trajectories contain multiple boundaries and rollouts are stochastic.
Source: §1 · pp. 1–2Method
PAIR compares continuations from the same environment state with and without individual compressions, then uses the resulting boundary-level evidence to diagnose errors and revise a fixed compression prompt.
Source: §1 · p. 2Results
PAIR achieves the highest Pass3 among compressed methods across all benchmarks and both compression scopes, outperforming the best ACON variant by 2.1%–10.0%, while approaching or sometimes exceeding uncompressed execution.
Source: §5.2 · p. 8Takeaways & Limitations
Localized boundary-level evidence can guide context compression for long-horizon agents while keeping the downstream agent fixed.
Source: §7 · p. 10PAIR’s offline counterfactual evaluation requires restorable environment states and terminal continuations from pre- and post-compression contexts, making it most directly applicable to checkpointable or simulated environments.
Source: A LIMITATIONS AND FUTURE WORK · p. 14
Abstract
from arXiv · showhide
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.
1 INTRODUCTION
Long-horizon agents need compression as interaction histories grow, but trajectory-level feedback cannot isolate which compression changed later execution. PAIR uses same-state counterfactual continuations to diagnose boundary-level effects and adapt fixed compression prompts, with strong cross-run results across benchmarks.
1 INTRODUCTION
- Long-horizon tasks involve repeated tool use that continually expands interaction histories, while finite context windows and growing inference costs make retaining the full history impractical.Source: §1 · p. 1
- Prior prompt-compression methods target static contexts, while agent-trajectory methods such as ReSum and SUPO adapt the agent to compressed histories and require modifying it.General prompt-compression approaches preserve semantic content or downstream utility under a reduced context budget.Source: §1 · p. 1
- For settings with a fixed agent, structured compression prompts specify what to preserve, and ACON adapts such prompts using successful full-context and failed compressed trajectories.ACON’s trajectory-level feedback does not identify which individual compression should drive a revision.Source: §1 · p. 2
- Trajectory-level outcomes cannot reliably isolate an individual compression’s effect because a long trajectory may contain multiple compression events and independent rollouts may diverge stochastically.The paper calls each replacement of accumulated history by a compressed representation a compression boundary.Source: §1 · p. 2
- PAIR compares repeated continuations from the same environment state with and without compression, then uses boundary-level evidence to diagnose errors and revise a fixed compression prompt.The agent, compressor model, tools, and decoding configuration remain fixed.Source: §1 · p. 2
- Across AppWorld, OfficeBench, and τ 2-Bench Retail, PAIR achieves the highest rate of consistent task completion across runs under both compression scopes, exceeding the competing prompt-adaptation baseline and approaching or sometimes exceeding uncompressed execution.Source: §1 · p. 2
2 PRELIMINARY
The preliminary section formalizes context compression for a fixed agent and shows that shrinking compression windows harms reliability more than solvability. Its problem definition evaluates compressors by their downstream effect on task performance.
2 PRELIMINARY
- The setup treats the agent and environment as fixed, defines the agent-visible context and interaction history, and uses full-context execution when the context equals that complete history.Source: §2 · p. 2
- As compression windows shrink, Pass3 declines faster than Pass@3, while compressed runs require more interaction steps than full-context execution.Pass3 measures tasks solved in all three runs; Pass@3 measures tasks solved at least once.Source: Figure 1 · p. 3
2.1 PROBLEM DEFINITION
- A compressor replaces an overlength context with a representation within budget B, which becomes the only historical record available to the frozen agent and later compression steps.Source: §2.1 · p. 3
- Compressor adaptation is framed around downstream task performance rather than history reconstruction fidelity, with prompts adjusted according to their effects on subsequent agent behavior.The rollout distribution is induced by the frozen agent, environment, compressor, and recursive context transition.Source: §2.1 · p. 3
3 DIAGNOSING COMPRESSION-INDUCED INSTABILITY
Recurrent compression reduces execution reliability and increases interaction burden, while matched counterfactual continuations isolate the effects of individual compression boundaries. The analysis finds that severe degradation is concentrated at a small number of boundaries.
3.1 COMPRESSION DEGRADES RELIABILITY BEFORE SOLVABILITY
- Pass3 declines faster than Pass@3 as compressed runs require more interaction steps, turning consistently solved tasks into intermittently solved and less efficient ones.Persistent AppWorld state lets some rollouts recover information removed from context, while others fail.Source: §3.1 · p. 4
3.2 COUNTERFACTUAL EVALUATION AT COMPRESSION BOUNDARIES
- At each realized boundary, the protocol restores the same environment state, compares pre- and post-compression contexts, and disables further compression during continuation.Repeated continuations reduce stochastic rollout noise, and disabling later compression isolates the current context replacement.Source: §3.2 · p. 4
- The expected cumulative outcome hazard equals the gap to no-compression execution; interaction burden separately diagnoses recovery steps that consume execution budget.Additional recovery steps can use up the remaining budget even when continuation still succeeds.Source: §3.2 · p. 5
3.3 COMPRESSION BURDEN IS COMMON, BUT SEVERE EFFECTS ARE SPARSE
- 151 of 197 boundaries increased continuation length, but only 12 added more than five steps and 11 reduced continuation success by more than 0.5.Severe outcome degradation and large execution-length increases were localized; the qualitative pattern also appeared in OfficeBench and τ 2-Bench.Source: §3.3 · p. 5, Figure 2 · p. 5
4 COUNTERFACTUAL CONTINUATION-GUIDED PROMPT ADAPTATION
PAIR adapts a structured compression prompt using localized counterfactual evidence about harmful boundaries. It diagnoses those effects, revises prompt guidance, and selects a candidate through end-to-end validation.
4 COUNTERFACTUAL CONTINUATION-GUIDED PROMPT ADAPTATION
- PAIR uses paired counterfactual continuations to localize harmful boundaries, revises relevant prompt sections, and selects the adapted policy through end-to-end validation.The downstream model parameters remain fixed; only the prompt is adapted.Source: §4 · p. 5, Figure 3 · p. 6
- PAIR retains every realized compression boundary from initial-prompt trajectories, including boundaries in successful executions.Successful trajectories may still contain outcome-degrading boundaries, and interaction burden occurs in successful and failed executions.Source: §4 · pp. 5–6
- Three-round successive halving starts each boundary with one PRE/POST pair, allocates further pairs to the top half, and retains boundaries meeting either harm threshold.At most three pairs are used per boundary; retained evidence includes the pre-compression context, summary, and counterfactual traces.Source: §4 · p. 6
- An optimizer diagnoses how summaries alter subsequent execution and aggregates localized diagnoses to revise the original prompt guidance.PAIR preserves the template's section structure, required fields, compression scope, and output format, revising only guidance within each section.Source: §4 · p. 6
- PAIR evaluates candidate prompts end-to-end on training tasks with the most baseline compression events, selecting by pass rate and then mean interaction steps.The selected prompt is used for held-out evaluation without further adaptation.Source: §4 · p. 6
5 EXPERIMENTS
Across benchmarks and compression scopes, PAIR improves cross-run reliability over compressed baselines and can approach or exceed uncompressed performance. Its adapted guidance also transfers to MiniMax-M3, while reliability gains generally do not require greater token use.
5.1 EXPERIMENTAL SETUP
- The evaluation covers AppWorld, OfficeBench, and τ 2-Bench Retail over three independent runs, reporting accuracy, Pass3, interaction steps, peak input length, and cumulative tokens.Baselines include No Compression, FIFO, LLMLingua-2, Prompting, and ACON variants; prompting methods are tested with history-only and prefix-conditioned scopes.Source: §5.1 · p. 7
5.2 MAIN RESULTS
- PAIR achieves the highest Pass3 among compressed methods across benchmarks and both scopes, exceeding the best ACON variant by 2.1%–10.0%.Neither history-only nor prefix-conditioned compression dominates across benchmarks, but PAIR improves reliability under both.Source: §5.2 · p. 8
- History-only PAIR reaches 84.7% accuracy and 79.8% Pass3 on AppWorld, exceeding the uncompressed results of 84.1% and 78.6%.On OfficeBench, both variants exceed 81% accuracy versus 82.1% without compression, while using substantially shorter contexts; a larger gap remains on τ 2-Bench Retail.Source: §5.2 · p. 8, Table 2 · p. 8
- PAIR improves task performance without substantial extra interaction: on τ 2-Bench Retail, it adds 0.5 and 0.2 steps while improving Pass3 by 7.5% and 5.0%, respectively.On OfficeBench, peak input length falls from 7.02K tokens without compression to 3.89K and 4.03K.Source: §5.2 · p. 8
5.3 CROSS-MODEL TRANSFER
- Without further adaptation, transferred PAIR improves accuracy and Pass3 under both scopes on AppWorld with MiniMax-M3 as agent and compressor.Under prefix-conditioned compression, accuracy rises from 79.6% to 84.1% and Pass3 from 65.5% to 73.2%, approaching no-compression results of 85.3% and 73.8%.Source: Figure 4 · p. 8, §5.3 · p. 8
5.4 DEPLOYMENT EFFICIENCY
- PAIR improves Pass3 in all six comparisons with Prompting by 5.0%–11.3%, using fewer tokens in four.On OfficeBench with prefix-conditioned compression, Pass3 rises from 66.3% to 72.6% as token use falls from 62.8K to 48.6K; Figure 5 compares Pass3 with total per-task tokens.Source: Figure 5 · p. 9, §5.4 · p. 9
- After compressor overhead is included, PAIR matches or improves the best ACON Pass3 in all six benchmark–scope combinations and uses fewer tokens in five.Relative to no compression, PAIR uses essentially the same tokens on AppWorld and 15%–19% fewer on OfficeBench, but about 12% more on τ 2-Bench while remaining below uncompressed reliability.Source: §5.4 · p. 9
6 RELATED WORK
Prior context-compression work often targets a fixed input, while long-horizon agents need recurrent compression whose outputs shape later actions. Related agent methods differ in whether they update the agent or adapt compression guidance.
General-purpose context compression
- General-purpose compression uses token selection, rewriting, or latent representations, including Selective Context, LLMLingua, TACO–RL, RECOMP, AutoCompressor, Gist tokens, and ICAE.The cited works are Selective Context and LLMLingua [Li et al., 2023; Jiang et al., 2023; 2024; Pan et al., 2024], TACO–RL, RECOMP, and AutoCompressor, Gist tokens, and ICAE.Source: §6 · p. 9
- These general-purpose methods generally compress a fixed input once, unlike long-horizon agents’ recurrent compression, which shapes subsequent actions and later compressions.Source: §6 · p. 9
Context management for long-horizon agents
- ReSum and SUPO adapt agents through post-training, whereas ACON keeps the agent fixed and adapts compression guidelines from full-context and compressed trajectories; PAIR instead uses counterfactual continuations at individual boundaries.The cited systems include OpenClaw and Hermes Agent [OpenClaw Contributors, 2026a;b; Nous Research, 2026], ReSum and SUPO [Wu et al., 2025; Lu et al., 2025], and ACON.Source: §6 · p. 9
7 CONCLUSION
The paper studies recurrent compression for frozen long-horizon agents, using paired counterfactual continuations to attribute downstream changes to individual compressions. It concludes that severe degradation is localized at a few boundaries and that this evidence can guide structured-prompt adaptation.
7 CONCLUSION
- Paired counterfactual continuations from the same environment state attribute downstream behavioral changes to individual compressions while reducing confounding from prior compression and rollout variability.Source: §7 · pp. 9–10
- Severe compression-induced degradation concentrates at a few harmful boundaries rather than accumulating uniformly across the trajectory.Source: §7 · p. 10
- PAIR uses harmful boundaries and their downstream consequences to diagnose compression errors and adapt a structured compression prompt; across benchmarks, it improves task performance and cross-run reliability with the downstream agent fixed.Source: §7 · p. 10
A LIMITATIONS AND FUTURE WORK
PAIR is designed for offline adaptation and relies on counterfactual evaluation from restorable environment states. Its attribution cost grows with the number of compression boundaries and remaining execution horizon, and substantial task, tool, or environment shifts may call for readaptation.
A LIMITATIONS AND FUTURE WORK
- PAIR’s counterfactual evaluation requires restorable states and terminal continuations from both pre- and post-compression contexts, making it most directly applicable to checkpointable or simulated environments.Attribution cost grows with the number of compression boundaries and remaining execution horizon; every realized boundary receives at least one PRE/POST pair.Source: A LIMITATIONS AND FUTURE WORK · p. 14
- Substantial shifts in tasks, tools, or execution environments may require new boundary-level evidence and prompt readaptation.After the compression prompt is selected, PAIR requires no additional model calls beyond standard deployment-time compression.Source: A LIMITATIONS AND FUTURE WORK · p. 14
B NOTATIONS AND SYMBOLS
- Table 3 summarizes the mathematical notations used throughout the paper.Source: B NOTATIONS AND SYMBOLS · p. 14, Table 3 · p. 14
C.1 PROOF OF THEOREM 3.2
Theorem 3.2 connects cumulative boundary harm to the compressor’s objective; the appendix also specifies the models, splits, and context budgets used in experiments.
C.1 PROOF OF THEOREM 3.2
- Minimizing expected cumulative boundary hazard is equivalent to maximizing the objective in Problem 1.Theorem 3.2 establishes this boundary performance-difference identity for any compressor.Source: §C.1 · p. 15
- The proof decomposes a rollout at ordered compression boundaries and uses the no-compression continuation value after each compressed state.Before the first boundary, compressed and uncompressed execution are identical; between boundaries, execution follows the no-compression continuation.Source: §C.1 · pp. 15–16
D.1 EXTRA EXPERIMENTAL SETTINGS
- Main experiments use GPT-5.6-LUNA for the agent, compressor, and PAIR optimizer; transfer experiments use MiniMax-M3.Each reported number averages three seeded runs; benchmark-specific tools and output limits are also specified.Source: §D.1 · p. 16
- Official train/test splits are used for AppWorld and τ 2-Bench Retail, with repository-provided stratified splits for OfficeBench and 8-objective QA.Budgets are 4,096 tokens for AppWorld and 8-objective QA, and 2,048 for OfficeBench and τ 2-Bench Retail.Source: §D.1 · p. 16
D.2 BOUNDARY EFFECTS ON ADDITIONAL BENCHMARKS
Across OfficeBench and τ 2-Bench Retail, most compression boundaries leave continuation success unchanged, while severe success or interaction-cost effects are localized. On OfficeBench, PAIR’s gains are largest on workflows spanning more applications.
D.2 BOUNDARY EFFECTS ON ADDITIONAL BENCHMARKS
- 184 of 211 OfficeBench boundaries and 141 of 200 τ 2-Bench Retail boundaries leave continuation success unchanged; severe effects cluster at a few boundaries.The figures show all failed trajectories and the ten highest-hazard and fifteen highest-burden trajectories; colors distinguish degradation, improvement, and absent boundaries.Source: §D.2 · p. 16, Figure 6 · p. 17, Figure 7 · p. 17
- Compression increases continuation length at 109 OfficeBench and 95 τ 2-Bench Retail boundaries, but only seven and two boundaries, respectively, add at least five steps.Thus, smaller interaction costs are broader than severe burden or outcome degradation.Source: §D.2 · p. 17
- Outcome hazard and interaction burden are weakly correlated: Spearman correlations are 0.004 on AppWorld, 0.102 on OfficeBench, and −0.054 on τ 2-Bench Retail.The weak coupling motivates assessing both signals.Source: §D.2 · p. 17
D.3 BREAKDOWN ON OFFICEBENCH
- On 3-APP OfficeBench tasks, prefix-conditioned PAIR raises accuracy from 62.4% to 65.6% and Pass3 from 48.4% to 54.8%, while reducing Steps from 19.3 to 16.7.The uncompressed reference is 67.7% accuracy, 58.1% Pass3, and 16.2 Steps; compression effects grow as workflows span more applications.Source: §D.3 · p. 17, Table 4 · p. 18
D.4 EXTRA EXPERIMENT ON 8-OBJECTIVE QA
On 8-objective QA, PAIR produces larger answer-quality gains than ACON-UT, while ACON-UT reduces execution steps more. In a template-controlled AppWorld comparison, PAIR retains an advantage over locked ACON-UT.
D.4 EXTRA EXPERIMENT ON 8-OBJECTIVE QA
- PAIR rules preserve user goals and constraints, update summaries against new results, distinguish supported from unresolved work, and retain continuation-relevant literals.These rules target construction of the compressed state rather than a separate task-solving procedure.Source: §D.4 · p. 19
- PAIR’s guideline focuses on representing task and evidence state, whereas ACON-UT explicitly directs downstream search and stopping behavior.ACON-UT’s retry limit and completion condition provide routes to shorter execution; PAIR preserves unresolved outcomes without imposing those rules.Source: §D.4 · pp. 19–20
- Across both compression scopes on 8-objective QA, PAIR achieves larger gains than ACON-UT in EM, EM3, and F1, and attains the highest values on all three metrics.The table reports results aggregated over three runs.Source: Table 5 · p. 18, §D.4 · p. 19
- On 8-objective QA, ACON-UT uses fewer steps than PAIR under both scopes: 19.6 versus 27.0 for history-only and 17.6 versus 20.9 for prefix-conditioned compression.The results characterize a quality–control trade-off: ACON-UT’s larger step reductions accompany behavioral retry and stopping rules, while PAIR leads on answer-quality metrics.Source: §D.4 · p. 20
D.5 TEMPLATE-CONTROLLED COMPARISON WITH ACON-UT
- With the AppWorld template locked, ACON-UT’s prefix-conditioned Pass3 rises from 72.6% to 78.0%, while history-only Pass3 remains 70.8%.Locking changes the candidate instructions within the existing OpenClaw sections; the table reports three-run results.Source: §D.5 · p. 21, Table 6 · p. 21
- Under the matched interface, history-only PAIR reaches 84.7% accuracy and 79.8% Pass3 versus locked ACON-UT’s 79.4% and 70.8%; prefix-conditioned results are 85.9% and 80.4% versus 83.5% and 78.0%.The methods require the same 16.6 interaction steps in the history-only setting; PAIR uses slightly fewer steps and a shorter peak context in the prefix-conditioned setting.Source: §D.5 · p. 21, Table 6 · p. 21
- The controlled comparison attributes the methods’ substantive distinction to adaptation evidence: trajectory-level successful/failed traces for ACON-UT versus paired, boundary-level diagnosis for PAIR.The reported results are consistent with localized evidence producing more targeted state-preservation rules, especially under history-only compression.Source: §D.5 · p. 21
- Template locking shows that structural flexibility is neither required for ACON-UT’s effectiveness nor sufficient to explain PAIR’s gains.The ablation does not establish that checkpoint structure is universally irrelevant.Source: §D.5 · p. 21
D.6 SENSITIVITY OF BOUNDARY EVALUATION
PAIR’s paired task-level comparison favors PAIR in all six benchmark–scope settings, though individual significance is limited to the two AppWorld settings. Sensitivity analyses assess boundary selection, adaptation cost, and transfer to MiniMax-M3.
D.6 SENSITIVITY OF BOUNDARY EVALUATION
- With three continuations per condition, rank correlations are 0.69–0.76 for outcome hazard and 0.81–0.89 for interaction burden; boundary-selection overlap is 0.57–0.68.Five continuations improve these ranges but increase fixed evaluation cost from six to ten continuations per boundary; PAIR therefore caps evaluation at three pairs and uses successive halving.Source: §D.6 · p. 22, Figure 8 · p. 22
- Successive halving yields 0.82 recall and 0.66 precision against the nine-draw reference, while reducing average evaluation from six to approximately 3.5 continuations per boundary.Rule-support coverage is essentially unchanged, and adaptation with the resulting evidence preserves downstream performance.Source: §D.6 · p. 22
- Under fixed three-pair diagnostics, the default thresholds select 34 AppWorld, 12 OfficeBench, and 22 τ 2-Bench boundaries; threshold variations retain 0.56–0.83 Jaccard overlap.The same selection thresholds are used across all three benchmarks without benchmark-specific tuning.Source: §D.6 · pp. 22–23, Figure 9 · p. 22
D.7 COST OF BOUNDARY-LEVEL ADAPTATION
- Across six adaptation settings, PAIR’s offline cost falls from 511.24M to 357.32M tokens, a 30.1% reduction; adaptation costs range from 39.6M to 90.8M tokens.Successive halving reduces boundary-evaluation tokens by 30.2%–44.5% versus uniform three-pair evaluation; this is a one-time offline cost.Source: §D.7 · p. 23, Table 7 · p. 23
- PAIR’s offline adaptation costs 39.6–90.8M tokens across settings, compared with 11.8–27.9M for ACON-UT and 7.3–19.6M for ACON-UTCO; deployment adds no model calls.PAIR’s higher cost reflects explicit evaluation of individual compression boundaries.Source: §D.7 · p. 23
D.8 CROSS-AGENT TRANSFER
- On MiniMax-M3, history-only transfer improves AppWorld accuracy from 71.2% to 73.6% and Pass3 from 50.0% to 51.8%; prefix-conditioned results approach uncompressed performance.On OfficeBench, history-only Pass3 rises from 68.4% to 72.6%, while prefix-conditioned Pass3 remains 67.4%.Source: Figure 10 · p. 24, §D.8 · p. 24
D.9 PAIRED SIGNIFICANCE TESTS AGAINST ACON
- The paired protocol resamples tasks for bootstrap intervals and uses an exact two-sided sign test on discordant Pass3 outcomes; Pass3 changes by one task when a run flips.Three-run Pass3 differences of a few points can therefore lie within run-to-run noise.Source: §D.9 · p. 24
- All six paired ΔPass3 estimates favor PAIR, which wins more discordant tasks in every setting; the advantage is significant at 95% in both AppWorld settings.The pooled descriptive count is 75 wins to 34 losses; the other intervals include zero, reflecting limited Pass3 resolution across three runs.Source: §D.9 · p. 24, Table 8 · p. 25
D.10 BOUNDARY-LEVEL CASE STUDIES
This section presents boundary-level case studies that hold agent and environment state fixed to examine how context replacement affects outcomes or execution burden, and describes how PAIR turns that evidence into compressor-facing revisions. It also covers boundary verification, full-context and compression baselines, and structured-summary and ACON prompt-optimization variants adapted with the downstream agent and compressor fixed.
D.10 BOUNDARY-LEVEL CASE STUDIES
- 3/3 adapted continuations preserve the coworker filter and answer 786, while fresh initial-prompt recompressions fail 3/3; another broadened-request case improves from 1/3 to 3/3.The original coworker case had two of three POST continuations answer 1,676 incorrectly; the second case involved a task restricted to requests from coworkers and friends.Source: §D.10 · pp. 26–27
- 5.0 additional steps on average burdened POST continuations in the usable-state case, while PAIR reduced mean length from 14.7 to 10.7 steps with 3/3 success.PRE averaged 9.0 steps; all conditions ultimately succeeded, so the lost execution state increased interaction burden without changing task success.Source: §D.10 · pp. 27–28
- PAIR localizes compression effects at a fixed boundary and revises what the compressor preserves, whereas ACON’s trajectory contrast can yield new execution-policy guidance.On test-normal traces, explicit tokens appear in 69% of PAIR summaries versus none for ACON; executable keyword-argument API calls appear in 80% versus 48%, and PAIR uses fewer documentation calls and steps to the next mutation or completion.Source: §D.10 · pp. 28–29
- 3.2% mean success improvement, 2.15 fewer execution steps, and 12.6% lower total token use distinguish prefix-conditioned PAIR from matched ACON-UT.The paired 95% intervals are [0.4%, 6.0%], [−2.88, −1.45] steps, and [−17.2%, −7.7%], respectively; Pass3 is +3.6% with interval [−1.8%, 8.9%].Source: §D.10 · p. 29
- Three outcome defects did not recur under fresh initial-prompt samples, and one boundary remained unsuccessful under PAIR, so replay evidence does not guarantee prompt-level generalization.Three outcome boundaries and one burden boundary met the full replay criterion; end-to-end selection remains necessary to test whether aggregated revisions improve the global compression policy.Source: §D.10 · p. 29
E BOUNDARY-VERIFICATION ALGORITHM
- Successive halving starts each realized boundary with one PRE/POST pair, allocates more pairs to the higher-scoring half, and retains qualifying boundaries after three rounds.Retention depends on estimated outcome hazard or interaction burden exceeding its selection threshold.Source: E BOUNDARY-VERIFICATION ALGORITHM · p. 29
F.1 FULL-CONTEXT REFERENCE
- The full-context reference bypasses compression and retains the complete interaction history, serving as a behavior-preservation and token-cost reference.It does not separately consume the task instruction, which is already included in the agent context.Source: §F.1 · p. 30
F.2 TOKEN PRUNING AND TRUNCATION BASELINES
- FIFO discards oldest complete turns, while LLMLingua-2 selects history tokens up to budget; both preserve the latest turn, and LLMLingua-2 tests token salience for execution-state retention.The baselines use the shared compression trigger and downstream context slot.Source: §F.2 · pp. 30–31, F DETAILS OF BASELINES · p. 30
F.3 STRUCTURED-SUMMARY COMPRESSION BASELINES
- The structured-summary baselines preserve their original schemas and prompts in a recurrent-compression harness, using an auxiliary LLM to produce Markdown checkpoints.They preserve the most recent interaction turn and iteratively fold new turns into the existing checkpoint; OpenClaw uses separate first-compaction and update prompts.Source: §F.3 · p. 31
F.4 ACON PROMPT BASELINES
- ACON prompt baselines adapt compression guidelines: ACON-UT targets task failures after compression, while ACON-UTCO additionally removes redundancy from successful compressed trajectories.ACON-UT compares tasks that succeed with full context but fail under compression to infer lost or distorted information. ACON-UTCO then analyzes successful compressed trajectories to shorten contexts while preserving utility; both keep the downstream agent and compressor fixed.Source: §F.4 · p. 33
G PROMPTS AND QUALITATIVE ANALYSIS
This section analyzes ACON-UT and PAIR’s prompts and adaptation behavior in AppWorld, contrasting their evidence and revision scopes: PAIR uses localized boundary-level evidence to preserve task and planning state within a fixed template, while ACON-UT compares full-context and compressed trajectories and may rewrite the framework to encode general execution policies. Across both compression scopes, AppWorld results favor PAIR.
G PROMPTS AND QUALITATIVE ANALYSIS
- PAIR adapts instructions within a fixed OpenClaw template using localized counterfactual evidence at harmful compression boundaries, unlike ACON-UT’s full-framework rewriting.Both methods start from the same OpenClaw compression prompt and use the same AppWorld adaptation trajectories; ACON-UT contrasts successful full-context with failed compressed trajectories.Source: G PROMPTS AND QUALITATIVE ANALYSIS · p. 33
Attribution and planning rules
- ACON-UT’s trajectory-level contrast conflates information lost to compression with stochastic differences in planning, so it can turn successful procedural choices into general rules.Those rules can steer execution regardless of whether they are placed in a newly created ledger or fixed OpenClaw sections.Source: G PROMPTS AND QUALITATIVE ANALYSIS · pp. 38–39
Runtime-state example
- ACON-UT’s runtime-reconstruction rule mistakes lost variable knowledge for lost environment state, potentially prompting needless initialization, authentication, or repeated calls.AppWorld preserves variables across code blocks; the compression correction should retain the relevant variable binding, not instruct the agent to recreate it.Source: G PROMPTS AND QUALITATIVE ANALYSIS · p. 39
PAIR’s adaptation strategy
- PAIR’s boundary-level comparisons isolate context replacement while holding environment state fixed, directing revisions toward missing task facts rather than a new task-solving policy.PAIR preserves the current plan and continuation-critical state, while leaving the frozen downstream agent responsible for adapting its plan as new observations arrive.Source: G PROMPTS AND QUALITATIVE ANALYSIS · pp. 39–41
AppWorld performance
- AppWorld PAIR vs ACON-UT: history-only accuracy/Pass3 84.7%/79.8% vs 81.2%/70.8% (16.6 vs 18.9 steps); prefix-conditioned, 85.9%/80.4% vs 81.3%/72.6% (15.2 vs 17.3).PAIR has higher accuracy and Pass3 and uses fewer interaction steps under both scopes.Source: G PROMPTS AND QUALITATIVE ANALYSIS · p. 40
Template-controlled comparison
- With the same OpenClaw structure, PAIR still exceeds ACON-UT in accuracy and Pass3 under both scopes, showing that schema flexibility does not explain the performance gap.The controlled prompts also have comparable interaction lengths and peak context sizes.Source: G PROMPTS AND QUALITATIVE ANALYSIS · pp. 37, 40