acceptodds
Under review as a conference paper at ICLR 2027

Co-Harness: Co-Evolving Harnesses and Models for Agent Post-Training

Abstract

Post-training tool-using agents involves both learning model parameters and designing the runtime harness that generates their interaction trajectories. When the harness remains fixed, model updates can change agent behavior without corresponding adjustments to prompts, tools, skills, middleware, and memory. We introduce Co-Harness, a framework that alternates harness optimization with model post-training. An LLM-based HarnessCritic analyzes failed trajectories and proposes local harness edits, which are retained after validation. The model is then fine-tuned on quality-filtered trajectories collected under the updated harness, and the resulting model guides the next round of harness search. We evaluate Co-Harness on repository-level coding benchmarks SWE-bench Verified and SWE-bench Pro, and on tool-integrated mathematical reasoning benchmarks AIME24, AIME25, and HMMT25. Performance improves over two joint rounds across the evaluated model–benchmark pairs. A separate 200+ hour case study with model weights fixed documents automated runtime repair, execution-efficiency changes, and ensemble exploration. Co-Harness incorporates adaptation of the trajectory-generating runtime into the model-training process.

Primary area:
foundation or frontier models, including LLMs
Keywords:
AI agents, agent post-training, harness optimization, large language models

Reviews

Among:
Shape:
1234this paper, Top 15%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 3.00 over 3 reviews, above 85% of the others.
Reviewer_SZRFOpenReview ↗
Rating
3(+1)
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

Co-Harness alternates between optimizing the agent harness and the model weights. In each round, an LLM-based HarnessCritic diagnoses failed trajectories and proposes local harness edits, which are accepted only after validation. Quality-filtered trajectories collected under the new harness are then used for SFT, and the updated model seeds the next harness search. The method is evaluated on SWE-bench Verified/Pro and on tool-integrated mathematical reasoning. The headline result is that Qwen3-32B improves from 12.9% to 61.8% on SWE-bench Verified .

Critical strengths
  1. A natural and timely idea, with a transparent optimization log. Treating the harness and the weights as jointly optimized components is a sensible systems view of agent training. The main text shows the full harness evolution including degraded candidates and rollbacks.
Critical weaknesses
  1. Harness selection and evaluation do not appear to be separated. The harness is searched directly on SWE-bench Verified and AIME24, and the selected configuration is then used to report results on the same benchmarks. The paper says final performance is measured on held-out tasks, but it never specifies which tasks are used for search, SFT data collection, validation, and final evaluation. Without this, part of the reported gain may come from selection on the test set rather than from the method itself.
  2. The SFT data is not described. It is unclear which tasks or repositories the trajectories come from, how many trajectories were collected, and how many remain after filtering. SWE-bench covers only a small number of repositories, so overlap between training and evaluation repositories is a real risk. Given that two rounds of SFT raise performance from 12.9% to 61.8%, this information is essential.
  3. Key ablations are missing. There is no "fixed best harness + SFT" baseline, so it is impossible to tell how much co-evolution adds over plain SFT. The critic model is also not specified, so part of the improvement may come from distillation from a stronger model.
  4. It is unclear whether the evolved harness contains benchmark-specific shortcuts. The paper does not analyze what the discovered harness changes actually do. Some of them may exploit properties of the benchmark (e.g., test-file patterns, answer formats, or evaluation-script behavior) rather than improve general agent capability. Could the authors list the concrete harness modifications and discuss whether any of them amount to benchmark hacking?
Questions for authors
  1. What are the training, selection, and evaluation splits for each benchmark? On which split were the 28 Verified configurations in §5.3 selected, and how is non-overlap with the data behind Table 2 guaranteed?
  2. For each SFT round, which tasks and repositories were used, and how many trajectories? Were the evaluation repositories excluded?
  3. Which model is used as the HarnessCritic, and what is its computational cost?
  4. Re-select the harness on an independent validation split, and add compute-matched ablations: harness-only, SFT-only (fixed best harness + SFT), and joint optimization.
  5. Describe the initial code harness, and quantify how much of the TIR gain comes from backend/cleanup fixes versus the proposed loop itself
6 comments
AuthorsOpenReview ↗

Response to Reviewer SZRF Part (1/2)

Dear Reviewer SZRF,

Thank you for recognizing the value of the configuration history and for asking how we selected and evaluated the harnesses. We appreciate the opportunity to clarify the data protocol and report the additional comparisons.


Q1. Which split was used to select the 28 Verified configurations, and how was evaluation kept separate?

A1. Thank you for raising this concern. We apologize that the figure did not clearly distinguish selection from reporting. Our coding training tasks come from both SWE-smith and R2E-Gym. Our TIR training problems come from the Nemotron-Math collection. Harness iteration and SFT use training tasks only, and final evaluation uses held-out tasks. Failure diagnosis uses failed training rollouts, candidate selection and regression checks use training-side outcomes, and SFT uses verified or quality-filtered training trajectories.

We selected among the 28 configurations using SWE-smith training tasks while keeping Qwen3-32B weights fixed. The displayed Verified scores were measured separately after selection and did not determine which configuration we retained. The selected R0 configuration scored 19.2% on Verified. Table 2 reports held-out evaluation, and its task outcomes were not used for selection. This is an instance-level protocol.


Q2. Where do the SFT trajectories come from and how are they filtered?

A2. Thank you for asking us to clarify the training data. Each SFT round uses trajectories generated by the current task model on the training sources described above. For coding, we verify patches using executable tests. For TIR, we verify the final answer.


Q3. How does Co-Harness compare with fixed-harness SFT and harness-first training?

A3. Thank you for suggesting these comparisons. We ran the requested fixed-R0 comparison on Qwen3-32B Verified. The control uses the R0 harness for both rounds and collects fresh trajectories for round two using its first-round SFT model.

Verified resolved (%)Co-Harness before SFTCo-Harness after SFTFixed R0 before SFTFixed R0 after SFT
Round 119.242.219.221.4
Round 246.861.821.422.8

Both arms used the same training task list and scored 19.2% on held-out Verified before the first SFT stage. The fixed-harness arm used the R0 harness for trajectory collection in both rounds. The gap was 20.8 percentage points after the first SFT stage and 39.0 points after the second. The second round therefore widened an existing gap by 18.2 points across the two schedules.

Starting from the same 19.2% R0 score, the harness-first schedule reaches 42.2% with initial weights and the final selected harness, then 56.4% after one SFT stage. Co-Harness finishes 5.4 points higher. Human to R0 measures the initial harness-only search (12.9% to 19.2%). The 28-configuration search already used training-side selection, as described in S1.


Q4. Which model serves as HarnessCritic, and how does it contribute?

A4. Thank you for asking us to clarify the critic’s role. We use GLM-5.3 as HarnessCritic and Qwen3-8B or Qwen3-32B as the task model. The critic reads failed traces and the harness configuration, then proposes diagnoses and local edits. The current Qwen3 model generates the SFT trajectories under the accepted harness.

The critic contributes through the harness edits that shape subsequent task-model rollouts. The 200+ hours reported for TIR cover the entire search case.


AuthorsOpenReview ↗

Response to Reviewer SZRF Part (2/2)

Q5. What changes did the harness search retain, and could they exploit benchmark shortcuts?

A5. Thank you for asking for concrete examples. In coding, edit reflection reaches 15.4% from 12.9%; combining stall handling and test-error analysis reaches 16.4%; the selected bundle adds submission gating, scope checks, and repetitive-probe detection, reaching 19.2%. Probe detection uses sequence similarity at least 0.85 and issues a soft hint after three similar probes. These are bundled configuration outcomes, not isolated effect sizes for each edit. Stacking the initial interventions instead scores 12.1%, showing that plausible changes need validation.

For TIR, the reported changes include inference-backend repair, replacing ThreadPool with ProcessPool and process cleanup, batching, restoring reasoning on follow-up turns, adjusting turn limits, and a separately reported voting ensemble. These mechanisms have ordinary runtime interpretations. The method explicitly places benchmark definitions and scoring logic outside the edit surface.

The editable surface excludes benchmark definitions and scoring logic. The retained coding changes address repeated probes, patch scope, and premature submission.


Q6. What does the initial coding harness do, and what did the TIR repairs change?

A6. Thank you for raising both points. The initial coding harness lets the agent navigate a repository, edit files, and execute shell commands. An executable test suite verifies the resulting patch.

For the extended TIR case, the initial 32-second crash has no accuracy score; the later failed run’s 22.5% is incomplete and cannot be used as a comparable baseline. The first completed configuration reaches 59.6% in 3.78 hours, and a later configuration reaches 61.5% in 1.11 hours: a 1.9-point difference and approximately 3.4× runtime ratio. That later configuration combines batching, follow-up reasoning, and changed turn limits, so neither difference isolates cleanup or batching alone. The six-trajectory voting ensemble reaches 63.3% in 2.29 hours under a different aggregation rule from main-table pass@1.


We sincerely hope that our clarifications can address your concerns. We appreciate your recognition of the value of the configuration history and your suggestions for strengthening the evaluation. The reviewer's suggestions can be easily and effectively addressed, and we genuinely hope that the reviewer can consider increasing the score. Thank you very much for your time and thoughtful feedback!

AuthorsOpenReview ↗

Summary of Response to Reviewer SZRF

Dear Reviewer SZRF, thank you for recognizing the value of the harness revision history and for asking us to clarify how we selected and evaluated the configurations. We clarified that the 28 coding configurations were selected on SWE-smith training tasks and scored separately on held-out SWE-bench Verified. We also added two comparisons on Qwen3-32B Verified: Co-Harness reached 61.8%, compared with 22.8% for two rounds of SFT with the R0 harness fixed and 56.4% for the harness-first schedule.

Your feedback helped us explain the evaluation protocol more clearly and show how Co-Harness compares with both training schedules. We sincerely hope these clarifications and additional results address your concerns, and we would be grateful if you would consider raising your score in light of this response. Thank you very much for your time and thoughtful feedback!

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

The paper introduces Co-Harness, which is a framework for jointly optimizing harness (tools and the whole software surrounding around LLM) and model weights. Failures are fixed through harness optimization and then the weights are updated with rejection sampling SFT on the data generated by the updated harness. Results show that method improves task performance on couple software engineering (coding) and mathematical (Tool-Integrated Reasoning TIR) benchmarks.

Critical strengths

The paper is touching on a very relevant and timely idea of treating model and harness as a single ML system and proposes a working recipe for training such setup.

Critical weaknesses

In my opinion contributions of specific parts of the recipe are not properly tested and isolated. The key missing ablation in my opinion is to show what part of gain and at which stage of training is coming from model vs harness updates as these procedures are interleaved. Also we don't know the benefits of alternating updates -- one might ask what if with the same compute budget we optimize the harness and only do model update with the trajectories coming from the final, optimized harness.

Questions for authors

Can you specify the task sets used for failure diagnosis, candidate selection, regression checks, and final evaluation? Were the AIME problems used to select configurations in the 200+ hour case study separate from those used to report its final accuracy?

Please also refer to question about the contributions of specific design choices from weaknesses (alternating updates and harness vs model updates). I think this work would highly benefit from these ablations and would become a strong submission overall.

2 comments
AuthorsOpenReview ↗

Response to Reviewer JGgP

Dear Reviewer JGgP,

Thank you for recognizing the potential of treating the model and harness as one system. We appreciate your suggestions on isolating the two updates and testing their order.


Q1. What does each harness and model update contribute?

A1. Thank you for asking for this breakdown. We apologize that the original presentation grouped these steps together. For Qwen3-32B on SWE-bench Verified, the Human baseline is 12.9%, and the initial harness-only search reaches 19.2% at R0. The first round remains at 19.2% before SFT and reaches 42.2% after SFT. The second round reaches 46.8% after harness search with R1 weights fixed, then 61.8% after SFT. The within-round changes are therefore +0.0 and +23.0 percentage points in round one, and +4.6 and +15.0 in round two, in harness-then-SFT order.


Q2. What happens if you finish harness search before doing one SFT stage?

A2. Thank you for proposing this comparison. We evaluated the harness-first schedule on Qwen3-32B Verified. Starting from R0, we kept the initial model weights fixed while completing harness search, collected trajectories with the final selected harness, and then performed one SFT stage.

Verified resolved (%)Co-HarnessHarness-first, one SFT stage
Shared R019.219.2
Immediately before final SFT46.842.2
After final SFT61.856.4

The pre-SFT checkpoints have different histories. Co-Harness has already completed one SFT stage at 46.8%, while the harness-first model still uses its initial weights at 42.2%. Both schedules improve substantially over R0, and Co-Harness finishes 5.4 percentage points ahead in this setting.

Our initial harness search targeted common runtime failures. The first trajectory collection stage focused on difficult but potentially solvable tasks and recovered successful traces on some tasks that earlier rollouts missed. One hypothesis is that training on those traces before resuming harness search changes which tasks the model can solve and which failures the search sees next.


Q3. Which tasks were used for diagnosis, selection, regression checks, and evaluation? Was AIME24 separate?

A3. Thank you for raising the split question. We apologize that the case-study protocol was unclear. Our coding training tasks come from both SWE-smith and R2E-Gym. Our TIR training problems come from the Nemotron-Math collection. Harness iteration and SFT use training tasks only, and final evaluation uses held-out tasks. Failure diagnosis uses failed training rollouts, candidate selection and regression checks use training-side outcomes, and SFT uses verified or quality-filtered training trajectories.

In the separate 200+ hour case study, we selected configurations on Nemotron-Math training tasks and used AIME24 to report evaluation accuracy. AIME24 evaluation scores did not guide selection.


In light of these responses, we sincerely hope our rebuttal has addressed your comments. If you have any other comments, please do share them with us, and we will address them further. Thank you for your time and efforts!

Thank you for running the harness-first comparison and reporting the gains after each update. Result on SWE-bench Verified strengthens the case for alternating, and the clarification about AIME24 addresses my concern about the evaluation split.

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

The paper proposes Co-Harness, a framework for jointly improving an agent's model and its execution harness. Starting from a human-designed harness, it alternates between (i) improving the harness by diagnosing failed trajectories and validating proposed modifications, and (ii) supervised fine-tuning (SFT) of the model on successful trajectories generated using the improved harness. The authors evaluate Qwen3-8B and Qwen3-32B on two coding benchmarks (SWE-bench Verified and Pro) and three mathematical reasoning benchmarks (AIME24, AIME25, HMMT25), demonstrating substantial performance improvements over two rounds.

Critical strengths
  1. The method demonstrates large and consistent improvements across all five benchmarks and both model sizes. For example, Qwen3-32B improves from 12.9% to 61.8% on SWE-bench Verified and from 3.4% to 30.6% on SWE-bench Pro. The resulting models are competitive with strong existing open-weight baselines.

  2. The paper provides concrete examples of harness improvements, including failure detection, execution-control modifications, and validation-based rollback. The experiments include 28 harness configurations for a coding task and a 200+ hour harness optimization case study. These help substantiate the practical effectiveness of automated harness optimization.

Critical weaknesses

The main contribution of the paper is the alternating optimization of the harness and model. However, both harness optimization and SFT on successful trajectories have been studied independently in prior work. Combining these two established approaches through an alternating procedure appears relatively straightforward.

While the paper demonstrates substantial empirical improvements, it does not establish whether co-evolution provides significant benefits beyond those achievable by the individual methods. In particular, the improvements reported after each joint round combine harness optimization and SFT, making it difficult to attribute gains to either component or their interaction.

A comparison against repeated SFT with a fixed, initially optimized harness would be particularly valuable. Demonstrating substantial additional gains from alternating optimization would strengthen the paper's central contribution and significance

Questions for authors

Q1: Could the authors report the performance improvement after each individual step of the alternating procedure (harness optimization and SFT), rather than only after each complete round?

Q2: How does the proposed method compare against two rounds of SFT with the harness fixed after its initial optimization (R0), under comparable rollout, training-data, and compute budgets?

Q3: Could the authors report the number of successful training trajectories collected in each round and characterize how the updated harness changes the training data? In particular, how many additional successful trajectories are enabled by each harness update?

4 comments
AuthorsOpenReview ↗

Response to Reviewer NrG4

Dear Reviewer NrG4,

Thank you for recognizing the gains across model sizes and benchmarks and for asking us to separate the effects of harness search and SFT. Your questions helped us make the contribution and the new controls clearer.


Q1. How does Co-Harness differ from combining two established techniques?

A1. Thank you for raising this point. We agree that neither successful-trajectory SFT nor harness optimization is individually new. Our contribution is the coupling of the trajectory-generating runtime to model post-training: failures from the current model guide accepted runtime edits; that model generates the next SFT dataset under the revised runtime; the updated model then changes the failure distribution for the next search. “Alternating Optimization” specifies how the two updates exchange information through failures and successful trajectories.


Q2. Can you report performance after each harness update and each SFT stage?

A2. Thank you for asking for the intermediate scores. We apologize that the original stage labels made those changes difficult to distinguish. For Qwen3-32B on SWE-bench Verified, the Human baseline is 12.9%, and the initial harness-only search reaches 19.2% at R0. The first round remains at 19.2% before SFT and reaches 42.2% after SFT. The second round reaches 46.8% after harness search with R1 weights fixed, then 61.8% after SFT. The within-round changes are therefore +0.0 and +23.0 percentage points in round one, and +4.6 and +15.0 in round two, in harness-then-SFT order.


Q3. How does Co-Harness compare with two rounds of SFT using the fixed R0 harness?

A3. Thank you for suggesting this control. We ran the requested fixed-R0 comparison on Qwen3-32B Verified. The control uses the R0 harness for both rounds and collects fresh trajectories for round two using its first-round SFT model.

Verified resolved (%)Co-Harness before SFTCo-Harness after SFTFixed R0 before SFTFixed R0 after SFT
Round 119.242.219.221.4
Round 246.861.821.422.8

Both arms used the same training task list and scored 19.2% on held-out Verified before the first SFT stage. The fixed-harness arm used the R0 harness for trajectory collection in both rounds. The gap was 20.8 percentage points after the first SFT stage and 39.0 points after the second. The second round therefore widened an existing gap by 18.2 points across the two schedules.


Q4. How did the harness update change the training trajectories?

A4. Thank you for asking what changed during collection. In the first round, the reported training-side resolve rate was 10.2% during R0 harness iteration and 16.8% during pre-SFT trajectory collection. The task pools differed, so the 6.6-point difference describes the two stages and cannot isolate the effect of the harness. R0 search targeted failures common across tasks. First-round collection instead focused on difficult tasks the current model could plausibly solve and yielded verified SFT trajectories for some tasks that earlier rollouts had failed to solve.


We sincerely thank you for your thoughtful feedback and for recognizing the performance gains across model sizes and benchmarks. We hope the new stage-by-stage results and fixed-R0 comparison address your questions about the contributions of harness updates and SFT. We also believe your comments can also be easily addressed in the revision. In light of these additional results, we would be grateful if you would consider raising your score. Thank you again for your time and constructive suggestions!

AuthorsOpenReview ↗

Summary of Response to Reviewer NrG4

Dear Reviewer NrG4, thank you for recognizing the performance gains across model sizes and benchmarks and for asking us to clarify what drives those gains. We now report the SWE Verified scores before and after SFT in each round and compare Co-Harness with two rounds of SFT using the fixed R0 harness. Both arms used the same training task list, and their final scores were 61.8% and 22.8%, respectively.

Your questions helped us show when the two schedules began to diverge and clarify how the first collection stage recovered successful trajectories for previously unsolved tasks. We sincerely hope these results address your concerns. In light of the additional evidence, we would be grateful if you would consider raising your score. Thank you again for your time and thoughtful feedback!

AuthorsOpenReview ↗

A sincere and kind reminder to Reviewer NrG4

Dear Reviewer NrG4,

We greatly appreciate your time and the insightful comments provided during the review of our paper.

We have made extensive efforts to address all your comments and believe that they adequately address all your concerns. We believe that the reviewer's insightful comments can be easily and effectively addressed in the final version.

With the discussion phase ending soon, we would like to confirm whether there are any other clarifications they would like. If the reviewer's concerns are clarified, we would be grateful if the reviewer could increase the score.

AuthorsOpenReview ↗

Kind reminder to Reviewer NrG4

Dear Reviewer NrG4,

Thank you again for asking us to clarify what harness updates contribute beyond SFT. In the comparison we added, both schedules used the same training task list. After two rounds of SFT, Co-Harness reached 61.8% on held-out SWE-bench Verified, while the schedule that kept the R0 harness fixed for trajectory collection reached 22.8%.

With the discussion phase ending soon, we would like to confirm whether there are any other clarifications they would like. If the reviewer's concerns are clarified, we would be grateful if the reviewer could increase the score.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.