acceptodds
Under review as a conference paper at ICLR 2027

Beyond Skill Evolution: Self-Evolving Context Management Policies for Long-Horizon Agent Harnesses

Abstract

Harness evolution improves LLM agents by learning from execution trajectories, but existing experience- and skill-based methods are less effective on long-horizon tasks. As interactions grow, useful evidence can be buried by redundant or outdated context, making context management itself a key bottleneck. We introduce ContextEvo, a framework that learns a context policy from long-horizon trajectories. ContextEvo reconstructs the model-visible context at key decision points, identifies context-related failures, and applies targeted policy updates. Starting from the open-source Pi-agent harness, ContextEvo improves performance across three long-horizon task benchmarks, achieving results comparable to or better than several prominent agent harnesses, including Codex, OpenCode, and OpenClaw. Additional analyses show that fixed or locally evolved context strategies can fall short under long-horizon information pressure, while our methods adapt to the information demands of each environment.

Primary area:
foundation or frontier models, including LLMs
Keywords:
Self-evolving agents, Long-horizon agents, Context engineering, Agent harnesses, Recursive Self-Improvement

Reviews

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

The paper argues that skill evolution is less effective for long-horizon tasks, where useful evidence is buried in long contexts. It proposes ContextEvo, which keeps the model fixed and instead evolves the harness's context policy across input assembly, history maintenance and context orchestration. Each round reconstructs evidence from held-in trajectories, attributes failures through cross-case screening and decision-point counterfactual replay, and applies constrained edits to the policy. The authors start from the Pi-agent harness and run two iterations on LHTB, DeepSWE and a hard BrowseComp-Plus subset, with DeepSeek-V4-Flash and GPT-5.6-Luna as backbones. They report improvements of 3.1–4.4 pp on full-benchmark scores and performance competitive with OpenCode, Codex and OpenClaw.

Critical strengths

S1. The paper addresses an important problem with a useful abstraction. Treating context management as an evolvable policy over the whole information lifecycle is a meaningful step beyond evolving prompts or skills. The analysis of why skill evolution struggles in long-horizon settings, including invocation gaps and local goal drift (Sec. 6.1), is insightful.

S2. The evolution pipeline is concrete and well documented. Case-card extraction, paginated review, explicit screening thresholds, bounded counterfactual replay and the constrained editor are all specified in App. B. The accompanying prompts are included, which supports reproducibility.

S3. The experiments are broad, and the claims are carefully worded. The paper covers three benchmarks, two backbones and four harnesses, together with compression baselines, ablations and transfer experiments. It also distinguishes observed, local and causal evidence, and acknowledges that decision-point replay does not establish task-level causality.

Critical weaknesses

W1. The headline numbers include training tasks, and the held-out gains are mixed. The abstract and introduction emphasize the All column, which includes the held-in tasks used for evolution. On held-out tasks alone (Table 2), the picture is weaker. DeepSeek on BrowseComp-Plus drops by 1.0 pp at iteration 1 despite a 9.2 pp held-in gain, Luna on DeepSWE falls from 18.5 to 15.4 and then 13.8, and Luna on BrowseComp-Plus drops by 6.1 pp at iteration 1. Several of the positive changes amount to only one to three tasks. Held-out performance should be the primary metric throughout.

W2. All results come from single runs without variance estimates. Each task is attempted once (A.2), on held-out sets of 26, 65 and 98 tasks. The ablations suggest substantial noise. If "w/o Context-Policy Update" leaves the native policy unchanged, it should match Native, yet the two differ by about 10.7 pp on held-in tasks (32.57 vs. 43.30; Table 6). Please define each ablation precisely and report at least three runs with confidence intervals.

W3. The comparison with established harnesses is overstated. Under GPT-5.6-Luna, Codex clearly outperforms ContextEvo, scoring 44.3 vs. 14.2 on DeepSWE and 60.1 vs. 42.0 on BrowseComp-Plus. The large gaps between backbones suggest integration issues rather than context pressure: Pi-agent, for instance, scores 64.6 on DeepSWE with DeepSeek but only 13.3 with Luna. The 26.4 pp cross-harness gain on OpenClaw also needs care. It is computed on all 174 questions, including the held-in ones. It also uses Qwen3.8-27B as the judge, which conflicts with the same-model setup described in Sec. 4.

W4. The closest baselines and the cost of evolution are missing. Meta-Harness, Agentic Harness Engineering and ACE are cited but not compared under a matched budget. Without such a comparison, the specific value of restricting edits to context-policy surfaces remains unclear. The cost of evolution, in analysis and editing tokens, replay calls and wall-clock time, is also not reported.

W5. The presentation and layout need polishing. Figures 1 and 2 contain numerous typos (e.g., "Lifetcyle", "Decsion", "Couterfactual"). Some cross-references are broken ("Table 3.2", "Table 5.1"), and Tables 3 and 4 duplicate each other. In addition, the wrapped tables at the bottom of p. 7 leave noticeable white space. This carries over to the top of p. 8, where two half-width lines are followed by an empty column. I would kindly suggest revising the layout, for example by removing the duplicate table, to improve readability.

Questions for authors

Please see the Weaknesses section.

3 comments

Thank you for your careful review and constructive suggestions, which help us improve both the experimental setup and the presentation of our results.

We have made the following revisions to the paper:

  1. Added results addressing held-out evaluation, statistical reliability, budget comparisons with existing harness evolution methods, and evolution cost.
  2. Clarified the differences between our method and existing approaches and added controlled comparisons and ablations.
  3. Improved the presentation and layout and corrected typographical errors.

Here are our detailed responses to your concerns.

 

Weaknesses 1 and 2: Held-out regressions and result stability

W1. The headline numbers include training tasks, and the held-out gains are mixed. The abstract and introduction emphasize the All column, which includes the held-in tasks used for evolution.

W2. All results come from single runs without variance estimates. Each task is attempted once (A.2), on held-out sets of 26, 65 and 98 tasks. The ablations suggest substantial noise.

Thank you for these suggestions. We agree that held-out performance should be the primary metric.

Our case analysis identified two sources of variability: (1) long-horizon executions can enter loops, run for extended periods, and time out; and (2) binary per-task scoring in the benchmarks can produce substantial changes in aggregate scores when only a few task outcomes change. These factors contribute to variability in held-out performance. We therefore removed the execution time limit and repeated the ContextEvo procedure three times. The held-out means and standard deviations are reported below:

ModelBenchmarkPi-agent (Base)OursΔ
GPT-5.6-LunaLHTB29.2034.23 ± 1.01+5.03
BrowseComp-Plus39.8040.82 ± 0.00+1.02
DeepSWE18.5018.97 ± 2.35+0.47
DeepSeek-V4-FlashLHTB40.4044.62 ± 2.52+4.22
DeepSWE72.3076.41 ± 2.35+4.11
BrowseComp-Plus82.7086.05 ± 2.57+3.35

The mean score across three rollouts improves over the baseline in every benchmark setting, supporting the effectiveness of our method on held-out tasks.

 

Besides, thank you also for identifying the ambiguity in “w/o Context-Policy Update.” This was a labeling error: the intended variant is “w/o Constrained Policy Editing.” It removes the safety constraints described in Section 4.3, which validate and reject updates that could cause harness failures. The ablation therefore measures performance without this constraint mechanism.

Weakness 3: Comparison with existing harnesses

W3. The comparison with established harnesses is overstated. Under GPT-5.6-Luna, Codex clearly outperforms ContextEvo, scoring 44.3 vs. 14.2 on DeepSWE and 60.1 vs. 42.0 on BrowseComp-Plus.

We understand this concern. ContextEvo is designed as an external component applicable to different harnesses. Our main experiments use Pi-agent as the base harness, and Appendix C.8 and Table 18 report its effects on other harnesses. Our central claim is that ContextEvo can improve the adaptive context-management capabilities of an existing harness. Because the Codex harness used in our comparison was not open source, we could not integrate ContextEvo into it to test whether it could further improve its performance.

We interpret your concern about “integration issues” as a question about the effects of model capability and model–harness compatibility on evaluation. Our main controlled comparison isolates the contribution of ContextEvo by holding the harness and base model fixed and changing only whether ContextEvo is applied.

For OpenClaw and OpenCode, we additionally provide the held-in and held-out scores below. Qwen3.8-27B was used only for benchmark scoring and did not participate in policy evolution.

HarnessMethodHeld-in (76)Held-out (98)All (174)
OpenCodeBase35.53 (27/76)34.69 (34/98)35.06 (61/174)
OpenCodeContextEvo42.11 (32/76)39.80 (39/98)40.80 (71/174)
OpenClawBase22.37 (17/76)16.33 (16/98)18.97 (33/174)
OpenClawContextEvo46.05 (35/76)44.90 (44/98)45.40 (79/174)

 

Weakness 4: Baseline comparisons, budgets, and evolution cost

W4. The closest baselines and the cost of evolution are missing. Meta-Harness, Agentic Harness Engineering and ACE are cited but not compared under a matched budget. Without such a comparison, the specific value of restricting edits to context-policy surfaces remains unclear.

Thank you for this suggestion. We have added the following comparisons and cost measurements.

1. ContextEvo achieves the strongest performance in our long-horizon comparison with Meta-Harness and Self-Harness. We reproduced both baselines on LHTB. ContextEvo achieves the best overall performance while requiring fewer tokens per task and lower evolution cost.

MethodHeld-in ↑Held-out ↑Overall ↑Execution Cost ↓Evolution Cost ↓
Pi-agent (Base)43.3040.4041.708.57—
ContextEvo47.10 ± 2.8544.62 ± 2.5245.70 ± 0.647.52114.74
Self-Harness45.5341.9343.498.951,213.45
Meta-Harness46.2443.1544.499.191,101.01

Note. Execution Cost is the average token consumption(M tokens/task), while Evolution Cost is the total token consumption required to obtain the evolved harness (M tokens).

 

2. ACE's evolution mechanism faces limitations in this long-horizon setting. We reproduced its complete Generator → Reflector → Curator → playbook update pipeline on LHTB. This setting places substantial pressure on the real-time handling of incoming information from the environment, including tool observations. ACE's approach to evolving history and context maintenance was less effective in this setting:

CandidateTraindevChoiceHeld-out ↑
Empty playbook55.5658.64Selected40.48
ACE playbook v155.5638.33Rejected20.17
ACE playbook v239.2246.74Rejected28.58

 

3. We report the model-token consumption of each evolution stage. The table below reports costs in millions of tokens. The largest cost comes from validating the proposed changes through counterfactual replay.

BenchmarkReviewAttributionReconstructionPolicy UpdateReplayTotal
LHTB0.350.370.281.08112.66114.74
DeepSWE0.300.211.290.96460.21462.96
BCP0.200.180.930.79138.34140.44

Note. Review: paginated trajectory review; Attribution: failure attribution; Reconstruction: model-visible context reconstruction; Policy Update: policy editing; Replay: counterfactual replay. All values are in millions of tokens (M).

 

Weakness 5: Presentation and layout

Thank you for pointing out these issues. We have corrected them in the revision version.

 

We sincerely thank the reviewer for the careful review and constructive suggestions. Your feedback has helped us strengthen our work through additional experiments and analyses, which have been incorporated into the revised manuscript. We greatly appreciate your time and consideration.

Thank you for the authors’ response. However, I still do not believe that the paper meets the standard for acceptance at this conference, and I will therefore retain my current score.

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

This paper introduces CONTEXTEVO, a framework that automatically evolves full-lifecycle context management policies—encompassing input assembly, history maintenance, and context orchestration—based on long-horizon execution trajectories, all while keeping the underlying foundation model frozen. Addressing the challenge where traditional "skill evolution" methods in long-horizon tasks often become overwhelmed by redundant context, CONTEXTEVO employs a process involving paged trajectory review, counterfactual replay attribution, and constrained policy updates. Across three long-horizon benchmarks, it achieves superior performance compared to both traditional skill evolution approaches and mainstream agent frameworks, while requiring lower token consumption.

Critical strengths

This paper identifies that the core bottleneck for current intelligent agents in long-horizon tasks lies not merely in a lack of skills, but in context degradation caused by the accumulation of redundant information. Consequently, the authors model context management as an evolvable strategy encompassing "Input Assembly", "History Maintenance", and "Context Orchestration". By integrating diagnostic mechanisms—specifically "Paginated Trajectory Review" and "Counterfactual Replay"—the approach effectively addresses the challenges of attributing failures and pinpointing targets for modification within long-horizon trajectories.

Critical weaknesses
  1. Performance degradation across iterations on held-out sets: Although the paper claims that iter-2 consistently outperforms iter-1 across the full task sets, performance on the held-out sets—which better reflect true generalization—frequently plateaus or even degrades across multiple settings. For instance, under DeepSeek-V4-Flash, the LHTB held-out score drops from 43.1% in iter-1 to 41.8% in iter-2; under GPT-5.6-Luna, the BrowseComp-Plus held-out score decreases from 46.1% in iter-1 to 43.4% in iter-2. Furthermore, on DeepSWE under GPT-5.6-Luna, the held-out scores across both evolution iterations (15.4% and 13.8%) remain consistently lower than the un-evolved Pi-agent baseline (18.5%). This suggests that policy updates induced from small held-in sets (20 tasks for LHTB and 48 for DeepSWE) carry a risk of overfitting to specific trajectories, which undermines the core claim that multi-round evolution yields stable generalization gains.

  2. Unquantified computational overhead of the self-evolution pipeline and limited cross-environment generalization: The evolution loop of CONTEXTEVO is highly complex, involving trajectory scanning, paginated semantic review, an agentic attribution judge running for up to 30 turns, and a policy editor invoked for up to 30 turns. Meanwhile, experiments show that the evolved policies do not transfer reliably across environments. This implies that the entire evolution pipeline must be re-executed from scratch for every new task environment. However, the paper only reports per-run token savings during the evaluation stage without quantifying the total token consumption, API costs, or wall-clock time incurred during the evolution phase itself, making it difficult to assess the net cost-effectiveness of deploying this method in practice.

Questions for authors
  1. Regarding the performance regression observed at iter-2 on the aforementioned held-out test set, as well as the sub-baseline performance of GPT-5.6-Luna on the DeepSWE held-out set, please analyze the specific causes of this negative transfer. In real-world scenarios where a held-out validation set is unavailable, how can one determine the optimal point to halt the evolutionary iterations to prevent overfitting to the held-in trajectories?

  2. Please provide the offline evolutionary cost for running one full cycle of CONTEXTEVO across benchmarks, including the specific computational overhead for each stage. Based on the number of tokens saved per task during the evaluation phase, how many task executions would be required to offset the initial computational cost incurred during strategy evolution?

  3. Does the failure in cross-environment transfer suggest that the method has merely learned benchmark-specific heuristics rather than generalizable principles for context management? Have the authors explored evolving the strategy across multiple environments simultaneously?

3 comments

We sincerely thank the reviewer for the thoughtful and insightful comments. We agree that held-out generalization, evolution stopping criteria, and offline evolution cost need further reporting and discussion. These comments have helped us better clarify the scope and limitations of our approach.

We have additionally reported the evolution costs from our experiments in the appendix to provide a more comprehensive assessment of the computational efficiency of our method.

 

Question 1 and Weakness 1: Held-out regressions and stopping criteria

Please analyze the specific causes of this negative transfer.

When a held-out validation set is unavailable, how can one determine the optimal point to halt the evolutionary iterations to prevent overfitting to the held-in trajectories?

We would first like to respectfully clarify two possible misreadings of Table 2:

  • LHTB + DeepSeek-V4-Flash: the held-out scores are 43.1% at iter-1 and 45.0% at iter-2 (+1.9 pp). The value 41.8% is the held-in score of Codex, rather than the held-out score of ContextEvo.
  • BrowseComp-Plus + GPT-5.6-Luna: the held-out scores are 33.7% at iter-1 and 40.8% at iter-2 (+7.1 pp). The change from 46.1% to 43.4% concerns the held-in scores, rather than the held-out scores.

Nevertheless, we acknowledge the genuine negative transfer in DeepSWE + GPT-5.6-Luna, where held-out performance decreases from 18.5% (Pi-agent) to 15.4% (iter-1) and 13.8% (iter-2), while held-in performance improves from 6.3% to 14.6% and full-set performance increases from 13.3% to 14.2%.

Regarding the causes of negative transfer, ContextEvo identifies lengthy tool outputs as a potential source of distraction and introduces selective presentation that preserves the beginning, end, and key state information. However, intermediate outputs may contain task-critical configuration details or constraints, whose reduced visibility could negatively affect subsequent decisions. More generally, when a diagnosed issue also frequently appears in successful trajectories, its relevance to failure becomes less certain, and the potential gains from corresponding interventions may be marginal. Furthermore, fluctuations during long-horizon execution could lead to performance degradation on held-out data.

To further examine this phenomenon, we repeated the ContextEvo procedure three times and report the held-out mean ± standard deviation below. Scores are percentages; Δ denotes the percentage-point change relative to Pi-agent (Base). These results further indicate that the observed held-out regressions stem from stochastic variation rather than an inherent issue with our method.

ModelBenchmarkBaseOursΔ
GPT-5.6-LunaLHTB29.2034.23 ± 1.01+5.03
BrowseComp+39.8040.82 ± 0.00+1.02
DeepSWE18.5018.97 ± 2.35+0.47
DeepSeek-V4-FlashLHTB40.4044.62 ± 2.52+4.22
DeepSWE72.3076.41 ± 2.35+4.11
BrowseComp+82.7086.05 ± 2.57+3.35

Base = Pi-agent without ContextEvo; Δ = absolute performance improvement over Base. Ours reports mean ± standard deviation.

 

This observation also suggests a practical stopping criterion without held-out validation: when subsequent diagnoses lack sufficiently failure-specific evidence to justify further interventions, evolution can be stopped to reduce the risk of overfitting to held-in trajectories. While this cannot guarantee the optimal stopping point, it provides a conservative safeguard against unnecessary modifications.

Question 2 and Weakness 2: Evolution Cost

Please provide the offline evolutionary cost for running one full cycle of CONTEXTEVO across benchmarks.

How many task executions would be required to offset the initial computational cost incurred during strategy evolution?

We report the complete token cost of evolution below, in millions of tokens (M tokens), covering paginated trajectory review, failure attribution, model-visible context reconstruction, policy editing, and counterfactual replay. The largest cost comes from validating the proposed changes through counterfactual replay.

BenchmarkReviewAttributionReconstructionPolicy UpdateReplayTotal
LHTB0.350.370.281.08112.66114.74
DeepSWE0.300.211.290.96460.21462.96
BCP0.200.180.930.79138.34140.44

Note. Review: paginated trajectory review; Attribution: failure attribution; Reconstruction: model-visible context reconstruction; Policy Update: policy editing; Replay: counterfactual replay. All values are in millions of tokens (M).

 

We also conduct the break-even analysis , as shown below. Execution cost denotes the average token consumption per downstream task. While strategy evolution incurs an upfront computational cost, the evolved strategy reduces token consumption during subsequent executions. These per-task savings accumulate with repeated use, potentially offsetting the initial evolution cost in large-scale deployments.

BenchmarkBase (M/task)Ours (M/task)Savings (M/task)Break-even (# tasks)
LHTB8.577.521.05109.3
DeepSWE6.114.072.04226.9
BCP1.881.590.29484.3

Note. Base denotes Pi-agent, and Ours denotes ContextEvo. Savings is the reduction in average token consumption per downstream task. Break-even is computed as total evolution cost divided by per-task token savings. All costs are measured in tokens.

 

To further illustrate this cost advantage, we compare ContextEvo with Self-Harness and Meta-Harness on LHTB under the matched evaluation setting. ContextEvo achieves the highest held-out and overall performance while requiring both the lowest downstream execution cost and substantially lower evolution cost. Execution Cost denotes the average token consumption per downstream task after evolution; Evolution Cost denotes the total token consumption required to obtain the evolved harness or policy.

MethodHeld-in ↑Held-out ↑Overall ↑Execution Cost ↓Evolution Cost ↓
Pi-agent (Base)43.3040.4041.708.57—
ContextEvo47.10 ± 2.8544.62 ± 2.5245.70 ± 0.647.52114.74
Self-Harness45.5341.9343.498.951,213.45
Meta-Harness46.2443.1544.499.191,101.01

Note. Execution Cost is the average token consumption per downstream task (M tokens/task), while Evolution Cost is the total offline token consumption required to obtain the evolved harness or policy (M tokens). Higher performance and lower cost are better.

Question 3: Cross-environment transfer

Does the failure in cross-environment transfer suggest that the method has merely learned benchmark-specific heuristics rather than generalizable principles for context management? Have the authors explored evolving the strategy across multiple environments simultaneously?

As discussed in Appendix C.9, different task environments have different context characteristics. ContextEvo aims to adaptively identify the context-management policy best suited to a given environment.

This does not imply that generalizable principles for context management do not exist. The guiding principle of ContextEvo is that, at each decision point, the model-visible context should contain the information needed for that decision and organize it in a form that the model can use effectively. The realization of this principle, however, depends on the environment's context characteristics. DeepSWE requires continuity of task specifications, the evidence supporting code changes, test results, and outstanding verification obligations. BrowseComp-Plus requires preservation of the relationships among candidate answers, source documents, supporting passages, and conflicting evidence. These are environment-specific realizations of the same principle.

 

Following your suggestion, we added joint evolution experiments with DeepSeek-V4-Flash that pool held-in trajectories from different environments and evaluate the resulting policy on their held-out sets. We observe that:

  • Joint evolution over environments with more compatible context pressures, namely LHTB and DeepSWE, improves generalization and achieves higher held-out scores.
  • Joint evolution over environments with more heterogeneous context pressures, namely DeepSWE and BCP, still improves over the baseline, but yields smaller gains.
BenchmarkBaseSingle-envJoint (LHTB+DeepSWE)Joint (DeepSWE+BCP)
LHTB40.4045.0046.60—
DeepSWE72.3075.4076.9273.85
BCP82.7085.70—83.67

Note. Single-env uses only the target environment’s held-in trajectories; Joint uses pooled held-in trajectories to evolve one shared policy. Each frozen policy is evaluated separately on each environment’s held-out set; held-out tasks are excluded from evolution.

 

We sincerely thank the reviewer again for the constructive feedback and valuable suggestions. Your comments have motivated us to conduct additional experiments, provide a more comprehensive analysis of generalization and computational costs, and better clarify the scope and limitations of ContextEvo. We believe these additions have substantially strengthened the empirical evidence and improved the clarity of our work. We greatly appreciate the reviewer's time and thoughtful consideration.

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

This paper proposes ContextEvo, a framework that evolves the context-management policy of an LLM agent harness (built on Pi-agent) while keeping the base model fixed. The policy covers three dimensions: how incoming information is assembled, how history is maintained, and how context is orchestrated across subagents. Evolution runs in three stages. An LLM first scans and pages through held-in trajectories to reconstruct what the model actually saw. An analysis agent then attributes failures to a policy dimension using cross-case comparison and single-decision-point counterfactual replay. Finally, an LLM editor commits a constrained code or prompt update. The authors evaluate on three benchmarks (Long-Horizon-Terminal-Bench, DeepSWE, and BrowseComp-Plus) with DeepSeek-V4-Flash and GPT-5.6-Luna. They report full-benchmark gains of roughly 3–4 pp over Pi-agent, results competitive with OpenCode, Codex and OpenClaw, and better performance than a skill-evolution baseline and compression baselines.

Critical strengths
  1. The paper addresses an important limitation of long-horizon agents by treating context management as an evolvable harness component. I appreciate that the framework can modify multiple aspects of the harness, such as subagent communication, rather than simply optimizing prompts or summaries.

  2. The paper evaluates multiple benchmarks, models, and harnesses, with additional ablations and comparisons against existing context-management methods. The cross-environment transfer results are particularly interesting, showing that context policies can be environment-specific rather than universally beneficial.

Critical weaknesses

My main concern would be limited novelty and insufficient differentiation from existing harness evolution methods. There has been substantial recent work on automatically improving agent harnesses through trajectory analysis and iterative modifications, including Self-Harness, Meta-Harness, and ACE, etc. For instance, Self-Harness already follows a similar high-level process of identifying failures, proposing harness modifications, and validating the changes. While ContextEvo focuses specifically on context management and includes comparisons with several existing methods, it remains unclear what fundamentally new methodology it introduces.

A major difficulty is that agent harnesses contain many interacting components, making comparisons across different systems difficult to interpret. Performance differences may arise from the editable components, underlying harness, or uncontrolled budget rather than the proposed method itself. I think the authors need to either conduct a more comprehensive and controlled comparison with existing self-evolving harness approaches, or clearly identify a narrower, concrete methodological contribution and provide convincing experiments that isolate and validate it. Without either, it is difficult to assess the novelty and significance of ContextEvo beyond existing harness evolution research.

Questions for authors

1: How accurately does the method identify context-management failures? Can the authors validate a subset of diagnoses? Additionally, what is the total computational/token cost of evolution?

2: What is the key methodological novelty of ContextEvo? Is it the context-specific failure attribution, the broader editable policy space, or the evolution procedure itself? How does the proposed approach fundamentally differ from applying existing harness evolution methods specifically to context-management components?

3 comments

Thank you for your careful review and constructive suggestions, which help us improve the completeness and clarity of our paper. We have clarified the differences between ContextEvo and existing methods and added experimental results and statistics to support its effectiveness.

We have made the following revisions to the paper:

  1. Clarified the positioning of our method, with particular attention to its methodological differences from existing harness evolution methods.
  2. Added more fine-grained ablations and controlled comparisons to clarify the specific methodological contribution of ContextEvo.

Here are our detailed responses to your concerns.

Weaknesses and Question 2: Methodological novelty and comparison with harness evolution methods

There has been substantial recent work on automatically improving agent harnesses through trajectory analysis and iterative modifications, including Self-Harness, Meta-Harness, and ACE, etc, ... it remains unclear what fundamentally new methodology it introduces.

What is the key methodological novelty of ContextEvo? Is it the context-specific failure attribution, the broader editable policy space, or the evolution procedure itself? How does the proposed approach fundamentally differ from applying existing harness evolution methods specifically to context-management components?

Thank you for raising this important question. As you point out, there is a significant number of papers focusing on harness evolution. However, these approaches may be less well suited to long-horizon settings. Existing evolution methods are often failure-driven: they identify weaknesses in the agent's observed performance and directly refine the corresponding components. Context management, however, often influences task outcomes implicitly, making this relationship difficult for existing harness evolution methods to identify.

1. Long-horizon settings require more specific failure attribution. To examine this distinction in a controlled setting, we reproduced Self-Harness and Meta-Harness on LHTB:

  • Existing methods have difficulty identifying deficiencies in context-management mechanisms from trajectories. Of the eight harness updates proposed by Self-Harness, only one concerned a context-management mechanism; the others focused on skills and tool use. Three of the eight updates proposed by Meta-Harness were indirectly related to context management, but all concerned truncating tool outputs and did not identify deeper context-management issues.
  • ContextEvo more effectively identifies the underlying context-policy issues while reducing both per-task token consumption and evolution cost. As shown below, ContextEvo uses counterfactual replay and related analyses to trace how key information becomes available and subsequently buried, and to examine whether a better model-visible context can improve decisions at relevant points. This supports more fine-grained diagnosis and more targeted policy updates.

We provide a concrete comparison of the resulting update directions in the human evaluation and case study below.

Method   Held-in ↑      Held-out ↑      Overall ↑     Exec. ↓    Evol. ↓  
Base43.3040.4041.708.57—
ContextEvo47.10 ± 2.8544.62 ± 2.5245.70 ± 0.647.52114.74
Self-Harness45.5341.9343.498.951,213.45
Meta-Harness46.2443.1544.499.191,101.01

Scores are percentages. Exec. = execution cost (M tokens/task); Evol. = evolution cost (M tokens). ContextEvo scores are mean ± reported standard deviation.

 

2. Context management requires a broader editable policy space. We also reproduced ACE and evaluated its complete Generator → Reflector → Curator → playbook update pipeline on LHTB. Its performance in this long-horizon setting was less favorable:

CandidateTrainDevChoiceHeld-out ↑
Empty playbook55.5658.64Selected40.48
ACE playbook v155.5638.33Rejected20.17
ACE playbook v239.2246.74Rejected28.58

LHTB places pressure on both the handling of incoming information from the environment and the maintenance of the agent's internal history over long executions. ACE focuses more on how the agent maintains its own context. ContextEvo takes a broader view by defining an editable context policy along three dimensions: Input Assembly, which governs how incoming information is incorporated into the model-visible context; History Maintenance, which governs how historical information is maintained; and Context Orchestration, which governs how information is accessed and shared across agents and subtasks. Together, these dimensions cover the context-management requirements of different environments.

Question 1: Diagnosis quality and evolution cost

How accurately does the method identify context-management failures? Can the authors validate a subset of diagnoses? Additionally, what is the total computational/token cost of evolution?

We designed a blind-review evaluation using a web-based annotation interface. For each method, we sampled 20 trajectories and obtained failure diagnoses using ContextEvo, Self-Harness, and Meta-Harness. Human experts were given the trajectories and diagnoses and asked to select their preferred diagnosis within each group and judge whether each diagnosis was reasonable.

Each comparison group contains the diagnoses compared by the human annotators. Preferred Alone and Preferred in a Tie count the groups in which a method was selected as the sole or joint top choice, respectively. Human Preference summarizes both sole and tied preferences; Diagnoses Rated Reasonable reports the percentage of diagnoses judged reasonable by the annotators.

MethodPreferred (n)Ties (n)Human pref. (%)Reasonable (%)
ContextEvo10255%85%
Self-Harness3220%35%
Meta-Harness5025%50%

Win = preferred alone; Tie = preferred in a tie; Pref. = human preference rate; Reasonable = diagnoses rated reasonable.

 

ContextEvo tends to propose repairs that address deeper context-management mechanisms. For example, in the task of solving multi-level Sokoban puzzles in LHTB, ContextEvo identified that experience could be shared across levels, while context specific to the implementation of an individual solution did not need to be shared. It therefore proposed context orchestration in which a parent agent coordinates the task and subagents solve individual levels. The other methods proposed changes at the skill or compaction-prompt level without addressing the underlying issue.

We also report the computational/token cost of evolution below. All values are in millions of tokens.

BenchmarkPi-agent (Base)ContextEvo (Ours)Total Evolution Cost
LHTB1,182.661,037.76114.74
DeepSWE2,071.181,380.62462.96
BCP981.36830.05140.44

The design of ContextEvo keeps evolution cost relatively low. As shown in the first comparison table above, its partial replay and validation mechanisms substantially reduce evolution cost relative to Self-Harness and Meta-Harness.

 

Thank you again for these suggestions. Our earlier presentation emphasized ContextEvo as a new harness evolution method and compared it primarily with other harness evolution approaches. The primary focus of this work, however, is context management itself: does an agent's context management need to adapt, and how can a reliable evaluation and diagnosis procedure systematically identify and repair deficiencies in context-management mechanisms? By addressing these questions, we aim to provide insights into context management for long-horizon agents.

We further clarify this methodological positioning in revisions and include additional controlled comparisons and ablations, including those described above, to strengthen the evidence for our contribution.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.