acceptodds
Under review as a conference paper at ICLR 2027

StateComp: Learning When to Compress History in Long Horizon Agents

Abstract

Long horizon agents continuously accumulate interaction history during task execution, yet the importance of past interactions changes as the agent state evolves. Existing context management methods largely compress history based on fixed windows, periodic schedules, or current relevance, overlooking a more fundamental question: when has a past interaction become safe to replace? Premature compression may remove information still needed for future actions, while overly conservative retention leads to substantial context overhead. To address this, we propose State Conditioned Compression (STATECOMP), a framework that determines when historical interactions can be safely compressed according to the current agent state. STATECOMP constructs KEEP and READY supervision through a two stage annotation procedure and trains an imbalance aware router on hidden representations from a frozen language model. A bounded state representation further reduces the cost of evaluating long histories, while adjacent READY interactions are grouped into continuous spans and replaced with compact summaries during execution. Across four domains of long horizon agent tasks, STATECOMP reduces total agent and summarization tokens by 52.27% while maintaining task performance, and achieves a 12.67× speedup in representation extraction.

Primary area:
foundation or frontier models, including LLMs
Keywords:
Long-horizon agents, context compression, adaptive context management, hidden-state representations, state-conditioned compression, language model agents

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_BysiOpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

This paper introduces StateComp, which uses a router to decide which historical interactions to retain in full or summarize based on the current agent state. The motivation is that the need for the original details of past interactions changes as a task progresses. The authors construct LLM-assisted annotations and train a router on representations from a frozen language model to predict whether an interaction can be compressed. On WorkBuddyBench, StateComp marginally improves task performance while reducing agent and summarization tokens relative to the no-compression baseline. The comparison with diverse compression methods in Table 3 shows the highest mean task reward among the evaluated methods, together with lower token usage than the no-compression baseline.

Critical strengths
  • The idea of predicting which past interactions can be compressed based on the current agent state is interesting.
Critical weaknesses
  • I have serious concerns about the reliability and generalizability of the supervision described in Section 3. The KEEP/READY labels and earliest safe compression boundaries are derived through an annotation procedure involving an LLM. Although the authors state that they reviewed the procedure and resulting labels, it remains unclear whether these judgments transfer reliably to other long-horizon agent tasks beyond those evaluated. The annotation model is not disclosed, and the paper does not establish how the choice of annotating LLM affects label quality or the performance of the trained router.

  • The empirical evidence is insufficient to establish broader generalizability and practical efficiency. Although the paper evaluates StateComp against no compression on 260 tasks, the comparisons with diverse existing methods in Table 3 are limited to 40 tasks. This restricts the strength of the comparative evidence. The implementation and evaluation settings for these baselines are also insufficiently explained. In addition, although representation-extraction runtime and GPU memory are reported separately, the full deployment cost of the representation model and router is not quantified end to end. The reported token savings therefore do not establish the overall efficiency gain once this computation is included.

Questions for authors
  • Approximately 93.6% of interaction-state pairs in the supervision data are labeled KEEP. How do the KEEP/READY proportions change during online evaluation? Please report these proportions, the fraction of interactions actually summarized, and the corresponding token volumes to clarify where the reported token savings come from.

  • KEEP and READY are used in the Introduction before they are defined. Could the authors define these labels when they first appear?

7 comments
AuthorsOpenReview ↗

Supervision Reliability and Generalization

Dear Reviewer,

Thank you sincerely for your careful review and recognition of state-conditioned history compression. Your comments helped us refine supervision, evaluation, costs, and compression reporting. We address your two weaknesses and two questions below.

Weakness 1: Reliability and generalizability of LLM supervision

I am seriously concerned about the LLM-derived KEEP/READY labels and earliest safe compression boundaries in Section 3. Despite author review of the process and labels, transfer to other long-horizon tasks is unclear. The annotation model is undisclosed, and the effects of choosing another annotating LLM on label quality or the trained Router are not established.

Section 3.3 and Appendix A.2 describe the two-stage process, but model disclosure was insufficient. We apologize and provide the details below.

1.1 Annotation model and objective

GPT-6 Sol annotated the 244,526 interaction-state pairs. Each interaction is assessed in its current state: whether original details remain necessary or existing history supports replacement by an accurate summary.

We will disclose the model's full name, version, and inference settings, release both stages' full prompts, label rules, and boundary-review procedure, and reference the appendix.

1.2 Two-stage annotation

Stage 1: Independent checkpoint annotation. Historical interactions are assessed using task progress, observation complexity, anticipated next-subtask needs, remaining interaction value, and evidence already in the history prefix.

Records include rationales, evidence locations, initial KEEP/READY labels, and dependencies preventing compression. Checkpoints are judged independently without inheriting READY labels.

READY requires evidence already in the current prefix. Later interactions may reveal information loss and invalidate an earlier candidate boundary, but future information cannot establish that earlier compression was safe.

Stage 2: Cross-checkpoint boundary review. Initial judgments and original evidence for each interaction are reviewed jointly to identify the earliest boundary supported by existing history. Insufficient or uncertain evidence yields KEEP, rather than propagating the first READY judgment.

For interaction SiS_i with boundary ti∗t_i^{\ast}:

yi,k={0,k<ti∗1,k≥ti∗y_{i,k}=\begin{cases}0, & k < t_i^{\ast} \\\\ 1, & k \geq t_i^{\ast}\end{cases}

Without a supported boundary, ti∗=∞t_i^{\ast}=\infty and the interaction remains KEEP. READY depends on the current state and available evidence, rather than being a fixed interaction property.

1.3 Annotation cost and cross-model agreement

The 244,526-pair supervision set cost approximately USD 2,000, mainly for long-context inputs and two-stage annotation. This offline construction cost will be reported separately from online system costs.

We compared GPT-6 Sol and DeepSeek-V4.1-Flash annotations on 29,182 interaction-state pairs and 829 historical interactions from 30 trajectories. Pair-level agreement and Cohen’s κ were computed on pooled pairs; per-trajectory agreement was macro-averaged, and boundary agreement aggregated by interaction.

MetricResult
Sampled trajectories30
Pair-level Agreement92.18%
Cohen's Kappa0.786
KEEP Agreement94.37%
READY Agreement84.62%

Agreement on the earliest compressible boundary:

MetricResult
Boundary Exact Agreement78.41%
Boundary Agreement within ±1 Checkpoint94.21%
Boundary Agreement within ±2 Checkpoints96.38%

These quantify cross-model label and boundary agreement. We will specify metric definitions, full prompts, label conditions, and boundary review to improve transparency and reproducibility.

1.4 Evaluation across task environments

Three external benchmarks cover software repair, interactive tool use, and terminal operations, each with its native execution protocol.

BenchmarkTasks NBase RewardSTATECOMP RewardBase Combined tokens/taskSTATECOMP Combined tokens/taskToken savings
SWE-bench Verified10084/10086/1001,364,732839,798.5838.46%
τ-bench165113/165112/16597,70190,971.736.89%
Terminal-Bench 2.08948/8952/891,010,511573,879.8143.21%

SWE-bench and Terminal-Bench show higher Reward and lower token usage. τ-bench generally has shorter interactions and less replaceable history, showing smaller savings and a quality–usage trade-off.

Annotation comparisons assess cross-model consistency; benchmarks assess cross-task execution. We will distinguish these to clarify how supervision relates to task performance. Thank you for your helpful suggestions.

AuthorsOpenReview ↗

Evaluation, Costs, and Offline Router Results

Weakness 2: Baselines, evaluation scope, and deployment efficiency

Evidence for broader generalizability and practical efficiency is insufficient. The 260-task evaluation compares against no compression, but Table 3's multi-method comparison covers only 40 tasks, with insufficient baseline implementation and evaluation details. Representation-model and Router deployment costs are not quantified end to end, so token savings alone do not establish overall efficiency.

Thank you for identifying these gaps. The revision will distinguish Full260 evaluation, Eval40 controls, and external benchmarks, and document baseline implementation sources, adaptations, evaluation settings, and token accounting.

2.1 Three seeds on fixed Eval40

Each seed uses the same 40 tasks, giving 120 complete runs per method.

SeedBase Rewardτ=0.60 RewardBase tokens M/taskτ=0.60 tokens M/task
170.68190.72151.82861.0744
310.66800.70851.93461.1278
530.67110.71811.89081.0864
Mean0.67370.71601.88471.0962

All three seeds show higher mean Reward and lower Combined Tokens, adding repeatability evidence on fixed tasks. Full260 and the external benchmarks separately provide broader task coverage.

2.2 End-to-end latency including auxiliary computation

Mean complete-task latency in the same Eval40 evaluation:

MethodE2E sec/task
Baseline910.22
STATECOMP892.13

STATECOMP's E2E time includes Agent execution, summarization, local Qwen3.5-9B feature extraction, and Router forward computation. Combined Tokens count Agent and summary Input + Output; local computation is reported through latency and memory.

2.3 Feature extraction and local resources

STATECOMP uses a frozen feature model and lightweight classification head without autoregressively generating READY/KEEP judgments. It incurs no additional generative Router API bill, but uses local GPU compute, memory, and model-residency resources.

Paired measurements from Appendix C.3:

MetricFull historyBounded representation
Paired feature-extraction time76.40 sec6.03 sec
Mean latency/state10.914 sec0.861 sec
Peak GPU memory29.426 GiB18.620 GiB
Forward workspace11.867 GiB1.062 GiB
Throughput0.0916 states/s1.1611 states/s

Bounded representations provide a 12.67× extraction speedup, 36.72% lower peak memory, and 91.05% less forward workspace. This speedup concerns feature extraction; E2E latency is reported separately above.

Local feature-computation times on external benchmarks:

BenchmarkValid timing NMean 9B CUDA sec/task
SWE-bench Verified10013.2817
τ-bench1652.2544
Terminal-Bench 2.08910.6537

CUDA times measure active local computation. Bounded representations, non-autoregressive classification, and execution gates control auxiliary overhead. Thank you for helping us separately report offline annotation cost, online token usage, local computation, and complete-task latency.

Question 1: How do 93.6% KEEP, online READY, and actual compression relate?

Approximately 93.6% of supervision interaction-state pairs are KEEP. How do online KEEP/READY proportions change? Please report these proportions, the fraction of interactions summarized, and corresponding token volumes to explain the savings.

Thank you for requesting clearer accounting. The original supervision is approximately 93.6% KEEP and 6.4% READY. Offline pairs, online interactions, and committed spans use different counting units; we report them separately.

3.1 Independent offline threshold evaluation

The final Router uses Weighted BCE (w1=10w_1=10) and frozen Qwen3.5-9B Layer 32 features. Its independent test set contains 110 trajectories and 3,732 interaction-state pairs.

This set deliberately samples trajectories with more READY opportunities to examine READY recognition. Its label distribution does not represent the original 244,526-pair supervision set.

ThresholdTest pairs NPrecisionRecallPredicted READY
0.353,73270.2368%79.9401%71.3023%
0.403,73272.7184%63.7297%54.9035%
0.503,73280.7420%39.0932%30.3323%
0.553,73283.5821%28.7425%21.5434%
0.603,73285.4130%20.7870%15.2465%
0.653,73287.9177%14.6279%10.4234%
0.703,73290.1099%10.5218%7.3151%
0.753,73292.7273%6.5441%4.4212%
0.803,73295.0617%3.2934%2.1704%

The 15.2465% is the offline test-set prediction rate, not the online READY proportion.

AuthorsOpenReview ↗

Online Compression and Terminology

3.2 Online READY predictions and successful commitments

Online READY steps count distinct historical interactions predicted READY at least once anywhere in a complete trajectory. An interaction predicted READY at multiple checkpoints is counted once.

Run (τ=0.60)Tasks NMean READY steps/taskMean committed spans/task
SWE-bench10023.800.86
τ-bench16512.590.5273
Terminal-Bench8935.601.0787
Full26026026.151.2308

READY candidates must also pass contiguous-span, minimum-source-token, and summary-validity gates, so candidate and commitment counts differ. Although τ-bench histories are generally shorter, some contain eligible intervals and are compressed.

In Full260, approximately 35.51% of online READY candidate interactions enter successfully committed compression spans. The denominator is READY candidates, rather than all historical interactions.

3.3 Commitments and token volumes by domain

DomainTasks NSuccessful eventsMean events/taskPreviously counted content/tool direct reductionSummary Input + Output
Code80881.1036,94377,381
Office50230.4623,86843,653
Security601181.97174,299267,966
Web70911.30103,243165,664
Overall2603201.2308338,353554,664

Compression-event distribution per task:

DomainTasks N0 events1 event2 events≥3 eventsTotal committed spans
Code804020101088
Office5034113223
Security6020151015118
Web70351581291
Overall260129613139320

The earlier 338,353-token count incompletely covered separate reasoning fields. Including them gives:

Supplementary itemFull260 totalPer-task mean
Previously counted content/tool direct reduction338,3531,301.36
Reasoning-field tokens20,038,72077,072.00
Complete-history direct removal20,377,07378,373.36
Summary Input + Output554,6642,133.32

Memory replacement also reduces repeated input in subsequent requests, so one-time removal and cumulative complete-task savings are different quantities. The revision will distinguish supervision labels, offline predictions, online candidates, commitments, direct removal, and cumulative usage. Thank you for helping us clarify these relationships.

Question 2: Define KEEP and READY at their first appearance

KEEP and READY appear in the Introduction before being defined. Could you define them at their first appearance?

Thank you for identifying this issue so carefully. The manuscript was written by the authors themselves and was not generated by AI. We are firmly committed to not using AI to directly generate papers. Nevertheless, during writing and proofreading, we overlooked defining these terms at their first appearance, increasing the reader's burden. We sincerely apologize. We will add the definitions immediately upon first use in the Introduction and check terminology and cross-references throughout. Thank you for your careful review and professional guidance in improving the paper's clarity and rigor.

The first-use definitions will be:

  • KEEP: At the current checkpoint, the historical interaction still requires its original details and is not yet ready for replacement by a summary.
  • READY: At the current checkpoint, the history prefix contains sufficient supporting evidence to replace the interaction's original details with an accurate summary while retaining information needed for subsequent execution.

We will immediately clarify that READY does not mean immediate summarization. Commitment additionally requires a sufficiently long contiguous span, minimum source length, summary validity, and a shorter resulting history.

Thank you sincerely for recognizing the research idea and for your specific guidance on supervision reliability, evaluation scope, system cost, and accounting. Your careful review helped us identify and improve reporting gaps and clarify the evidence and scope of the method. We deeply appreciate the time and care you have devoted to understanding and strengthening this work.

Reviewer_XFaZOpenReview ↗
Rating
3(+1)
Confidence
3(−1)
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper studies context compression for long-horizon agents. The main point is that whether a past step can be summarized depends on the agent's current status and progress in a task. For example, an error log matter while the agent is debugging, but not after the bug is found. The authors use an LLM to label each past step at each later point in time; this label says whether it can be safely summarized at that point. Then they train a small classifier on hidden states of a frozen LLM to predict these labels during the run. When enough neighboring steps are predicted safe, they are replaced by one summary. The results are pretty good. For example, on WorkBuddyBench, the paper reports about half the tokens used with similar task reward and similar gains with other models.

Critical strengths

+ very timely research question in the domain of AI agents: whether context should be compressed or not

+ the design is reasonable (LLM-based labeler + training a small classifier for prediction) and is easy to follow

+ one insight from the paper that is quite solid: whether certain context can be compressed depends a lot on timing; some context can be important now but not later; i appreciate the authors bringing this up and using it as a design motivation

+ end-to-end results are good especially table 3

Critical weaknesses

- i am not sure if the reported gains are from the method itself: to be specific, the method summarizes a few thousand tokens per task, but the token saving report averages to more than a million per task? (one example is table A7) i think there is something deeper here: maybe the agent is able to execute the task better with a different path (that is also more token-efficient) after compression, which yields more gain? it is unclear to me what is the true source of end-to-end token saving.

- significance-related issue: very commonly seen in agent research. for the authors' experiments, each setting is run once. it is also unclear if Eval40 is a legit and statistically significant subset that can endorse the design choices.

- i don't quite get the motivation of the router: it seems quite heavy in terms of compute, but does not improve the system much if we look at 5.2?

Questions for authors

See "weaknesses". I am always ready to be convinced.

6 comments
AuthorsOpenReview ↗

Response to Reviewer XFaZ (1/3): Sources of Token Savings

Dear Reviewer,

Thank you sincerely for your time and careful review, and for recognizing the practical value of our research question, state-conditioned design, and end-to-end evaluation. Your comments on token attribution, repeatability, and Router necessity helped us refine the accounting, add controls, and clarify the scope of our conclusions. We respond point by point below.

Weakness 1: Why do small summaries correspond to million-token cumulative savings?

I am unsure whether the reported gains come from the method itself. Only a few thousand tokens are summarized per task, yet the reported savings exceed one million tokens per task, e.g., in Table A7. Does compression lead the agent to a different execution path that improves performance while using fewer tokens? The source of the end-to-end savings is unclear.

Thank you for identifying this key issue. Our audit found that the earlier direct-reduction count covered message content and tool-interaction fields but incompletely included separate reasoning and reasoning_content fields. A successful Memory commit replaces the entire original message interval, so these reasoning fields also leave the subsequent effective history. We have supplemented the accounting and distinguish the following effects.

1.1 Complete-history removal and reduced repeated input

Full260 contains 320 successful compression events, averaging 62,621 reasoning tokens per event, or 20,038,720 in total. Adding the previously counted 338,353 tokens gives 20,377,073 tokens of one-time complete-history removal.

ItemFull260 totalPer-task mean
Previously counted direct reduction in content/tool fields338,3531,301.36
Reasoning-field tokens20,038,72077,072.00
Complete-history direct removal20,377,07378,373.36
Summary Input + Output tokens554,6642,133.32

These figures measure one-time removal at commitment. Memory continues to replace the original history in later requests, reducing repeated input; cumulative savings can therefore exceed the immediate reduction.

To examine this mechanism, we replayed fixed action trajectories for four Code tasks. We matched each Memory to its original source by message identity, expanded only that source, kept all other messages and observed actions unchanged, and counted serialized tokens with the frozen Qwen tokenizer.

MetricTasks NQwen-serialized tokens/task
Immediate reduction at commitment46,991.00
Repeated input avoided in later requests451,292.25
Cumulative avoidance along the same observed action trajectory458,283.25
Summarized source span49,523.00
Inserted Memory42,532.00

With the action trajectory fixed, the mean immediate reduction was 6,991 tokens and cumulative avoidance was 58,283.25 tokens; approximately 88.01% came from reduced repetition in subsequent requests. This validates the accumulation mechanism. Its contribution to Full260 still requires event-level accounting using the corresponding request logs.

1.2 Potential changes to ReAct execution paths

Updating history may also affect later decisions. We do more than shorten history: we assess which interactions are ready for compression, preserve useful evidence, and remove details no longer needed while consolidating the retained information into a summary. This reduces context occupancy while keeping information needed later. Examples include lengthy contents of irrelevant files and unnecessary details of earlier trial-and-error attempts.

For example, an agent may fail with approach A, then identify the cause through approach B and tool feedback. Some exploratory details can then be summarized while retaining the failure cause, key feedback, and confirmed conclusions. This may affect tool selection, error recovery, repeated exploration, interaction counts, and termination.

We therefore evaluate context savings along fixed action trajectories separately from behavioral changes in closed-loop execution. The four-task replay examines the former; Full260 reports complete-task outcomes. Their respective contributions to Full260 have not yet been independently quantified. Thank you for helping us clarify the relationship between local history replacement and cumulative token changes.

AuthorsOpenReview ↗

Response to Reviewer XFaZ (2/3): Repeated Runs and Router Controls

Weakness 2: Single runs and insufficient statistical support from Eval40

Statistical significance is a concern. Each setting was run only once, and it is unclear whether Eval40 is a reasonable subset with sufficient statistical support for the design choices.

Thank you for highlighting experimental reliability. We added three independent seeds on the fixed Eval40 set. Each seed uses the same 40 tasks, giving 120 complete runs per method.

2.1 Three-seed results

SeedBase Rewardτ=0.60 RewardBase tokens M/taskτ=0.60 tokens M/task
170.68190.72151.82861.0744
310.66800.70851.93461.1278
530.67110.71811.89081.0864
Mean0.67370.71601.88471.0962

All three seeds show higher mean Reward and lower Combined Tokens. The revision will clarify that Eval40 supports component and design comparisons on fixed tasks, while Full260 and external benchmarks assess performance across broader task settings.

2.2 External benchmarks

BenchmarkTasks NBase RewardSTATECOMP RewardBase Combined tokens/taskSTATECOMP Combined tokens/taskToken savings
SWE-bench Verified10084/10086/1001,364,732839,798.5838.46%
τ-bench165113/165112/16597,70190,971.736.89%
Terminal-Bench 2.08948/8952/891,010,511573,879.8143.21%

SWE-bench and Terminal-Bench show both higher Reward and lower token usage; τ-bench shows a quality–usage trade-off.

These differences relate to interaction length, history accumulation, and tool-use patterns. Software repair and terminal tasks involve repeated reading, editing, testing, or debugging, with long histories carried into later requests. τ-bench interactions are typically shorter, leaving less replaceable history; some tasks may also fail to meet the contiguous-span or minimum-token gates.

Savings therefore depend jointly on READY predictions, eligible compression intervals, and subsequent history reuse. The supplementary results indicate greater savings opportunities in long-horizon, tool-intensive tasks and more limited gains in shorter tasks.

Weakness 3: Router necessity and computational cost

I do not fully understand the motivation for the Router. Its computational overhead seems substantial, while the improvements in Section 5.2 appear limited.

Thank you for this helpful suggestion. The Router judges whether history can be replaced by a summary at the current execution state. Older history may still contain essential constraints, whereas completed exploration may no longer need to be retained in full. Learned predictions select candidates, and execution gates determine whether a summary is committed.

3.1 Controlled comparisons with simple rules

All methods use the same tasks, acting model, and tool protocol. Recency and Random operate under comparable compression-commit budgets.

MethodRouterContiguous-span gateMinimum-token gatePurpose
BaselineNoneOffOffNo-compression reference
Full STATECOMPLearnedOnOnComplete method
Recency RouterTemporal heuristicOnOnLearned Router contribution
Random RouterRandom selection under a comparable commit budgetOnOnHistory-selection contribution
w/o Span GateLearnedOffOnContiguous merging contribution
w/o Token GateLearnedOnOffMinimum source-length contribution

The full configuration uses frozen Qwen3.5-9B Layer 32 features, Weighted BCE (w₁=10), and an online threshold of τ=0.60. A contiguous span must contain at least four complete interactions and 1,000 source tokens. Recency selects by temporal position; Random samples eligible candidates. Other gates remain identical.

Combined Tokens include Agent and summary Input + Output. E2E time additionally includes local feature extraction and Router forward computation. The outcome tables and cost measurements follow in Part 3.

AuthorsOpenReview ↗

Response to Reviewer XFaZ (3/3): Router Results and Computational Cost

3.1 Controlled comparisons: results

MethodReward (Mean±SD)Combined tokens (M/task, Mean±SD)Token savingsE2E sec/task
Baseline0.6737±0.20901.8847±2.2164—910.22
Full STATECOMP0.7160±0.24591.0962±1.100141.84%892.13
Recency Router0.6957±0.23761.1752±1.156737.64%914.68
Random Router0.6840±0.25271.1665±1.147838.11%915.21
w/o Span Gate0.6828±0.27350.9782±1.163948.10%928.44
w/o Token Gate0.7065±0.25341.0821±1.001242.58%912.50

Reward by domain:

MethodCodeOfficeSecurityWebOverall
Baseline0.74740.82240.47970.64510.6737
Full STATECOMP0.78050.85000.51560.71800.7160
Recency Router0.75510.83180.49270.70320.6957
Random Router0.74080.81900.46610.71010.6840
w/o Span Gate0.74450.81340.43980.73350.6828
w/o Token Gate0.77330.84050.50020.71200.7065

Full STATECOMP achieves higher mean Reward and lower Combined Tokens than Recency and Random, supporting the practical value of learned history selection. Removing the Span Gate further reduces tokens but lowers Reward and increases latency. Removing the Token Gate slightly reduces tokens, but additional summary calls may offset part of the efficiency benefit. These results support evaluating history selection and execution gates together.

3.2 Feature extraction and local computation

STATECOMP combines a frozen feature extractor with a lightweight decision head: Qwen3.5-9B Layer 32 provides 12,288-dimensional features, and a head with hidden width 2,048 outputs READY probabilities without generating natural-language judgments.

Paired measurements of bounded history representations are:

MetricFull historyBounded representation
Paired feature-extraction time76.40 sec6.03 sec
Mean latency/state10.914 sec0.861 sec
Peak GPU memory29.426 GiB18.620 GiB
Forward workspace11.867 GiB1.062 GiB
Throughput0.0916 states/s1.1611 states/s

Bounded representations provide a 12.67× feature-extraction speedup, reduce peak memory by 36.72%, and reduce forward workspace by 91.05%. This speedup concerns feature extraction; complete-system latency is reported separately through E2E measurements above.

The model can remain resident on a local GPU and be reused across states, without online training or token-by-token decoding. The Router incurs no additional generative API bill, but consumes GPU compute, memory, and residency resources, which are represented in the local and E2E measurements. The measured 18.620 GiB peak memory also provides a deployment resource reference.

Online commitment additionally requires that the READY score meet the threshold, adjacent candidates form a contiguous span of at least four interactions, the source contain at least 1,000 tokens, and summarization succeed with a shorter resulting history. Memory is committed only when all conditions hold; otherwise, the original history is retained. Committed Memory can be reused in later requests.

Thus, bounded representations, lightweight classification, and execution gates jointly control overhead. STATECOMP integrates as an external context-management module without accessing or modifying acting-model weights. The Router selects replaceable history according to the current state, reducing repeated input while retaining information needed for the task.

Thank you again for your careful review and professional guidance. Your comments prompted us to improve token accounting, add repeated runs, and use controlled comparisons to clarify the Router’s benefits and costs. We sincerely appreciate the time and care you have devoted to understanding and improving this work.

Reviewer_MWckOpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes STATECOMP, a state-conditioned framework for deciding when historical interactions in a long-horizon agent can be safely replaced by summaries. Rather than relying on fixed windows, periodic schedules, or the relevance of an interaction in isolation, STATECOMP predicts whether each historical interaction is still needed in its original form given the current agent state. The method constructs KEEP/READY supervision using a two-stage annotation procedure, trains an imbalance-aware router on hidden representations from a frozen language model, and uses a bounded state representation to reduce the cost of evaluating long histories. Adjacent READY interactions are grouped into spans and summarized only when execution gates indicate that the rewrite is worthwhile. On WorkBuddyBench's 260 tasks, the method reduces agent-plus-summary tokens from 698.17M to 333.24M (52.27%) while mean reward changes from 0.6987 to 0.7026. Additional Eval40 and cross-model experiments investigate the quality/cost trade-off.

Critical strengths
  1. The paper identifies a useful decision point in context management. Selecting information to compress and deciding when it has become safe to replace are related but distinct problems. Conditioning readiness on the current agent state is a reasonable formulation, particularly for histories in which the significance of an interaction changes as a task progresses.
  2. The system considers the cost of actually executing compression. The router does not automatically trigger a summary for every positive prediction: span-size and token gates help avoid spending more tokens on summarization than the rewrite saves. The bounded representation also directly addresses the overhead of scoring long histories.
  3. The reported token reduction is substantial on the main benchmark. On WorkBuddyBench, STATECOMP cuts total agent and summary tokens by 52.27% while keeping aggregate reward close to the baseline. The paper reports results across Code, Office, Security, and Web rather than relying on a single task category.
  4. The paper reports useful implementation details and cross-model tests. The grouped trajectory split helps avoid leakage between pairs from the same trajectory, and the runtime/memory measurements make the representation-efficiency claim more concrete.
Critical weaknesses
  1. The readiness router appears to operate at a very conservative point, and the practical implications are not fully characterized. The paper reports 72.22% external precision at only 0.11% recall for one selective configuration. This may be an intentional choice to avoid destructive compression, but it raises a central question: how much of the observed 52.27% token reduction is attributable to the learned router versus span aggregation, execution thresholds, or other parts of the pipeline? The paper would be stronger with a more complete precision–recall–cost curve and end-to-end results across operating points.
  2. The strongest end-to-end evidence is concentrated in one benchmark and one acting model. WorkBuddyBench provides useful domain diversity, but the headline 260-task result uses DeepSeek-V4-Flash. Eval40 and cross-model results help, yet they are smaller fixed subsets. It remains unclear how robust the gains are across longer trajectories, different interaction protocols, and independently developed agent systems.
  3. The quality gains are small and domain-dependent. The average reward rises from 0.6987 to 0.7026, with Security slightly decreasing. The paper appropriately emphasizes efficiency, but the evidence supports “maintains task performance while reducing tokens” more clearly than a general claim that state-conditioned compression improves task quality. Uncertainty estimates or repeated runs would help determine whether small reward differences are meaningful.
  4. The annotation procedure and its transferability deserve more analysis. KEEP/READY labels are central to training the router. The paper describes a two-stage procedure, but the review would benefit from a clearer account of annotation cost, inter-annotator or judge consistency (if applicable), and sensitivity to the labeling rules. Since the target is semantic replaceability rather than ordinary relevance, errors in the annotation protocol could directly limit generalization.
  5. Token savings are not equivalent to total serving-cost or latency savings. The paper separately reports representation-extraction runtime, but the end-to-end cost also includes router inference, summary generation, cache effects, and the consequences of changed agent trajectories. A consolidated deployment accounting would make the practical claim more convincing.
Questions for authors
  1. Can you report end-to-end token and reward results over a range of router thresholds, including the corresponding precision, recall, number of committed spans, and summarization overhead?
  2. How much of the token reduction remains if the router is replaced by a simple heuristic or oracle readiness selector, and how much is due to the span/token execution gates?
  3. Can you provide repeated-run confidence intervals or significance tests for the WorkBuddyBench and Eval40 reward differences, particularly for the Security domain?
  4. What is the cost and reliability of constructing KEEP/READY supervision, and how sensitive are the results to alternative annotation or labeling rules?
  5. Can you report total end-to-end latency and monetary cost—including representation extraction, routing, summary calls, and cache effects—under a realistic serving configuration?
  6. How well does the router transfer to a new acting model or task domain without relabeling or retraining?
8 comments
AuthorsOpenReview ↗

Router and compression statistics

Dear Reviewer,

We sincerely thank you for the time and care you devoted to reviewing our work. We especially appreciate your recognition of state-conditioned readiness, execution gates, and bounded representations. Your thoughtful suggestions on operating points, component contributions, statistical reliability, supervision, and system costs have helped us improve our analysis and reporting. We respond to the five weaknesses first, followed by the six questions.

Weakness 1: The router appears conservative, and compression frequency and token-savings attribution are insufficiently characterized.

Thank you for identifying this issue. The previously reported precision of 72.222% and recall of 0.111% came from an early weighted-BCE configuration (w1=5w_1=5). We apologize for insufficiently distinguishing it from the final online controller, which uses w1=10w_1=10:

ItemSetting
Representation modelFrozen Qwen3.5-9B
Feature layerLayer 32
Router objectiveWeighted BCE
READY positive weightw1=10w_1=10
Router input dimension12,288
Hidden width2,048
Online threshold τ\tau0.60
Span threshold κ\kappa3; at least 4 complete interactions
Minimum source length Bmin⁡B_{\min}1,000 tokens

Adjacent READY interactions are grouped into contiguous spans. KEEP interactions, protected messages, and committed summaries interrupt candidate spans. After satisfying the span and token thresholds, a replacement must also preserve request-protocol validity and actually shorten the effective history before commitment.

Offline results for the final controller.

The evaluation contains 110 independent test trajectories and 3,732 interaction-state pairs. It deliberately includes more opportunities for READY judgments to assess READY recognition; its label distribution is reported separately from the original supervision set. The latter contains 244,526 pairs, including 15,633 READY pairs (6.3932%).

ThresholdTest pairsPrecisionRecallPredicted READY
0.353,73270.2368%79.9401%71.3023%
0.403,73272.7184%63.7297%54.9035%
0.503,73280.7420%39.0932%30.3323%
0.553,73283.5821%28.7425%21.5434%
0.603,73285.4130%20.7870%15.2465%
0.653,73287.9177%14.6279%10.4234%
0.703,73290.1099%10.5218%7.3151%
0.753,73292.7273%6.5441%4.4212%
0.803,73295.0617%3.2934%2.1704%

At the default threshold, precision is 85.4130% and recall is 20.7870%. Higher thresholds select histories with stronger READY evidence, increasing precision while reducing recall. The default setting combines this operating point with execution gates to balance compression coverage and information retention.

Online predictions and actual commitments.

We count distinct historical interactions predicted READY at least once during a complete trajectory; repeated predictions for the same interaction count once. All settings below use τ=0.60\tau=0.60.

EvaluationTasksDistinct interactions ever READY/taskCommitted spans/task
SWE-bench Verified10023.800.86
τ-bench16512.590.5273
Terminal-Bench 2.08935.601.0787
Full26026026.151.2308

READY predictions pass through span aggregation, token thresholds, and summary checks before commitment. In Full260, approximately 35.51% of online READY candidate interactions enter committed spans.

The domain-level statistics are:

DomainTasksCompression eventsEvents/taskContent/tool tokens directly removedSummary input + output tokens
Code80881.1036,94377,381
Office50230.4623,86843,653
Security601181.97174,299267,966
Web70911.30103,243165,664
Overall2603201.2308338,353554,664

The earlier count of 338,353 directly removed tokens covered content and tool fields. Including the separate reasoning fields gives:

MeasureFull260 totalMean/task
Content/tool tokens directly removed338,3531,301.36
Reasoning-field tokens removed20,038,72077,072.00
Complete-history tokens directly removed20,377,07378,373.36
Summary input + output tokens554,6642,133.32

The 320 events involve a reported mean of 62,621 reasoning tokens per event, totaling 20,038,720. Complete-history removal measures the one-time change at commitment; savings from repeated inputs in later requests are analyzed separately.

AuthorsOpenReview ↗

Compression distribution and Weaknesses 2–5

Weakness 1 (continued): compression-count distribution.

The distribution of compression counts per task is:

DomainTasks0 compressions123 or moreTotal committed spans
Code804020101088
Office5034113223
Security6020151015118
Web70351581291
Overall260129613139320
MeasureResult
No compression129/260 (49.62%)
At least one compression131/260 (50.38%)
Exactly one61/260 (23.46%)
Exactly two31/260 (11.92%)
Three or more39/260 (15.00%)
Total committed spans320
Mean compressions/task1.2308
Mean among tasks with compression2.4427

These results show that compression opportunities depend on task state: some tasks retain the original history throughout, while others undergo one or more replacements. End-to-end operating points, savings mechanisms, and component ablations are detailed in Questions 1 and 2.

Weakness 2: The strongest evidence is concentrated in one benchmark and acting model, leaving transfer to other environments unclear.

Thank you for highlighting the evaluation scope. We extended evaluation to software repair, interactive tool use, and terminal operations:

BenchmarkTasksBase outcomeSTATECOMP outcomeBase combined tokens/taskSTATECOMP combined tokens/taskSavings
SWE-bench Verified10084/10086/1001,364,732839,798.5838.46%
τ-bench165113/165112/16597,70190,971.736.89%
Terminal-Bench 2.08948/8952/891,010,511573,879.8143.21%

All three benchmarks directly reuse the same final w1=10w_1=10 router checkpoint, without relabeling or retraining, and follow their native execution protocols.

SWE-bench and Terminal-Bench show improved task outcomes and reduced tokens. On τ-bench, token savings are smaller and one fewer task succeeds; we report these differences explicitly.

Software repair and terminal operations often involve repeated inspection, execution, and lengthy tool feedback, creating opportunities to avoid repeated historical inputs. History accumulation is more limited in our τ-bench evaluation, and some candidates do not satisfy the span and source-token gates. These task characteristics offer a possible explanation for the differences and motivate evaluating benefits in their context.

Weakness 3: Reward changes are small and domain-dependent, requiring uncertainty estimates or repeated runs.

Thank you for this suggestion. We provide paired task-bootstrap intervals for the single-seed Full260 and historical Eval40 records in Question 3.

The Full260 mean reward difference is +0.0039, while Security is −0.0045; both intervals cross zero. The revision will report token usage, mean performance, and domain differences, while distinguishing uncertainty across tasks from variation across independent runs.

Weakness 4: Annotation cost, consistency, and sensitivity to labeling rules require clarification.

Thank you for your careful attention to supervision reliability. We report an annotation cost of approximately USD 2,000 for 244,526 pairs, together with agreement between GPT-6 Sol and DeepSeek-V4.1-Flash on 30 sampled trajectories; details appear in Question 4.

We will also release the complete prompts for both stages, label-decision rules, and boundary-review procedure to clarify the supervision target of semantic replaceability and its reproducibility conditions.

Weakness 5: Token savings alone do not establish total deployment-cost or latency benefits.

Thank you for emphasizing this distinction. System costs include agent execution, summary calls, local representation extraction, router computation, and cache effects. We report end-to-end time and account for API usage and local GPU resources in Questions 2 and 5.

The frozen extractor and router perform forward computation without autoregressive text generation. Their costs primarily involve GPU computation, memory, and model residency. Bounded representations, model reuse, and execution gates reduce these overheads; a unified monetary total requires actual billing and deployment conditions.

AuthorsOpenReview ↗

Question 1—Operating points and interventions

Question 1: Can you report end-to-end tokens and reward across router thresholds, together with precision, recall, committed spans, and summarization overhead?

Thank you for suggesting that predictive performance be evaluated together with execution costs. Offline precision, recall, and predicted READY rates appear under Weakness 1.

Each threshold and component-ablation setting uses the fixed Eval40 task list with three independent seeds, totaling 120 task runs per setting, with the same acting model, tool environment, and scoring rules. Combined tokens include agent and summary input/output tokens. E2E time includes local representation computation.

SettingReward ± SDCombined M/taskSavingsSpans/taskE2E s/task
Baseline0.6737 ± 0.20901.8847—0910.22
τ = 0.500.7021 ± 0.29321.044244.60%1.208878.83
τ = 0.600.7160 ± 0.24591.096241.84%1.033892.13
τ = 0.700.7053 ± 0.28971.252033.57%0.708903.03
τ = 0.800.6889 ± 0.23401.460522.51%0.342924.26

Domain-level results at the default threshold are:

DomainBase rewardτ = 0.60 rewardBase M/taskτ = 0.60 M/taskSavings
Code0.74740.78051.44141.005530.24%
Office0.82240.85001.05040.680335.23%
Security0.47970.51563.97171.712356.89%
Web0.64510.71801.07520.98668.24%
Overall0.67370.71601.88471.096241.84%

Higher thresholds reduce committed spans and token savings. Among these operating points, τ=0.60\tau=0.60 has the highest mean reward; τ=0.50\tau=0.50 saves more tokens, while τ=0.80\tau=0.80 is slightly slower than the baseline. Operating points therefore need to be assessed jointly through performance, compression volume, and auxiliary overhead.

Complete-task tokens and summarization overhead.

Full260 separates agent and summary usage as follows:

MethodTasksAgent tokens/taskSummary tokens/taskCombined tokens/task
Baseline2602,685,258.5802,685,258.58
STATECOMP2601,279,556.552,133.321,281,689.87

Combined tokens decrease by 1,403,568.71 per task (52.2694%). Total summary overhead is 554,664 tokens. Summarization is included in the combined counts across thresholds; the Full260 accounting additionally provides its separate contribution.

How history replacement produces cumulative savings.

A replacement removes the original interactions from subsequent effective histories, so savings can accumulate across later requests. On four Code tasks, we replayed fixed observed action sequences, matched memory entries to their source text by message identity, and kept other messages and observed actions unchanged. Counts use the frozen Qwen tokenizer:

MeasureTasksQwen-serialized tokens/task
Immediate reduction at commitment46,991.00
Avoided repetition in later requests451,292.25
Cumulative avoidance on the same observed action sequence458,283.25
Source spans summarized49,523.00
Inserted memory42,532.00

For these four tasks, approximately 88.01% of cumulative avoided tokens come from reduced repetition in later requests. This directly supports the memory-reuse mechanism within these four fixed action sequences.

Paired compression interventions from the same state.

We additionally sampled 10 tasks per domain, totaling 40. For each task, we saved the same environment state and history, launched compression and no-compression branches, and continued both to completion:

DomainNo-compression rewardCompression rewardNo-compression M/taskCompression M/task
Code0.77540.79301.33471.1065
Office0.83880.82880.74960.6708
Security0.49590.50142.33591.8356
Web0.71020.72701.33881.2347
Overall0.70510.71261.43981.2119

This intervention captures both history shortening and subsequent execution-path changes. Compression may affect tool selection, error recovery, repeated exploration, interaction counts, and termination. Summaries retain established conclusions, failure causes, and useful tool feedback so that this information remains available to later decisions.

Comments on the paper

1 comment

We would like to express our heartfelt appreciation to all three reviewers for their thorough evaluations, insightful comments, and constructive recommendations. We are also sincerely grateful to the Area Chair and Senior Area Chairs for the valuable time, attention, and dedication they have devoted to overseeing the review process.

Motivated by the reviewers' valuable feedback, we have substantially expanded our experimental evaluation, including router-threshold sensitivity analyses, controlled component ablations, repeated trials with statistical assessments, annotation consistency studies, evaluations on additional benchmarks, and more detailed accounting of system-level costs. In addition to addressing the specific concerns raised, we have undertaken further same-state compression experiments and fixed-trajectory analyses to better understand historical information reuse. We have also provided more detailed examinations of online READY decisions, committed compression spans, and accumulated token savings over complete task trajectories. These additional experiments and analyses have not only allowed us to address the reviewers' questions more thoroughly and in greater depth, but have also provided further empirical evidence to strengthen our findings. Through these supplementary investigations, we hope to offer the reviewers and Area Chair a clearer, more transparent, and more comprehensive understanding of StateComp's research motivation, methodological design, operational mechanisms, and practical implications for long-horizon agents.

We are deeply thankful for the considerable effort, careful consideration, and academic expertise invested by everyone involved in reviewing our submission. Your thoughtful feedback has been invaluable in strengthening our experimental validation, refining the presentation of our findings, and helping us better understand the strengths and limitations of our approach. We greatly appreciate your generosity in sharing your time and expertise, and we will incorporate these valuable suggestions into the revised paper with great care.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.