Model training · Model–Harness co-evolution

Learning from tasks. Improving agents.

InferenceNet challenges reveal capabilities that agents need to develop: understanding research requirements, interpreting data and constructing justified analyses. We explore model training and model–harness co-evolution as two routes to improvement. The three detailed harness methods and the current InferenceNet experiments keep model weights fixed.

Research directions

What should agents learn from these challenges?

The task demonstrations across econometric replication and business analysis lead to four questions about the capabilities behind reliable agent work.

Well-specified tasks provide the background and data clues needed for these judgments. Ambiguous variable definitions and rubric edge cases also inform improvements to task design and evaluation.

Two paths for developing these capabilities

01 / Model training

Learn from verified analyses and execution traces

Study how supervised fine-tuning, distillation and reinforcement learning can teach models to interpret data, plan analyses, use tools and verify their work. Use verified training tasks and evaluate the learned capabilities on held-out tasks.

02 / Model–Harness co-evolution

Improve model capabilities and harness behavior together

Explore alternating model updates with improvements to planning, tools, context and evidence checks. Compare model-only, harness-only and joint changes on held-out tasks under the same evaluation conditions.

Where our harness work stands — and what changes next

Phase 1 · Completed on Econometric Replication

From submission recovery and audit guidance to executable diagnostics

Our current four-harness Dev100 comparison and the ModularRSI study below were conducted in Phase 1 on econometric replication tasks in InferenceNet’s run_python sandbox. ModularRSI evolved submission-policy hooks and statistical-audit feedback in LangGraph’s ToolNode, raising strict replication from 64% to 67% with GPT-5.6 Sol. The next step for Subtrack 1 is upgrading static text guidance to executable diagnostic hooks that automatically inspect sample attrition, collinearity drops, cluster granularity and unit scaling before final submission.

Phase 2 · Planned for Finance & HR (Harbor + Claude Code)

Adapting harness checks and evolution to Harbor

Subtrack 2 (Business Analysis & Deliverables) has not yet undergone harness optimization. Its tasks currently run on the Harbor (0.20.0) evaluation framework driving Claude Code (2.1.114), where pilot errors stemmed from missing Excel formulas, cross-file count mismatches and rubric misclassifications. We plan to adapt our modular harness hooks and evolution loop to the Harbor + Claude Code workflow—adding pre-submission readback checks for spreadsheet formulas (.xlsx), report-to-workbook consistency (.docx/.xlsx) and source-evidence indexing.

These are research directions. The InferenceNet ModularRSI study below evolves the harness on econometric replication tasks while keeping model weights fixed.

01 / Concept

What self-evolution changes, and what it leaves alone

Harness self-evolution, also called automatic harness optimization, means proposing, testing and keeping harness versions on the basis of feedback from the harness’s own runs. The three methods detailed on this page do this in offline rounds: an outer loop edits the harness between evaluations, and the model’s weights do not change. That is how these three work, not a limit of the idea. Other methods change the harness across a stream of tasks, during a single run or for each task instance, and some also train the weights; the research map below places them.

The editable boundary must be recorded per method and release. All results below retain their original task split, budget caps and selection policy.

The six terms follow the Harness page, which also explains how harnesses such as DeepAgents and DeepSeek Harness, and extensions such as Superpowers, are built. This page is about improving a harness once it exists.

Research map · 2025–2026

When the harness changes, and what decides

Methods in the four lanes below run an agent, read feedback from those runs, edit part of the harness and keep some of the edits. They differ in when that happens: between rounds on a task set, across a stream of new tasks, within one continuing run, or once per task instance. The lanes are alternatives, not stages of a history. Around them sit routes that change or describe something else: a branch that also trains model weights, systems that compose several harnessed agents, the representation a harness is written in, and the evaluation that scores it.

CompositionAbove the harness · coordinates several harnessed agents

Harness-of-Harness

Runs existing harness–model pairs, such as Codex, OpenCode and Pi, through rounds of planning, coding and independent testing, with a versioned project history. What improves is the software project, not the harness code.

arXiv 2609.01481v1 1 Sep 2026Code

Raven

A host agent turns a goal into a task graph and assigns each step to a model–harness specialist: Raven’s own, or third-party agents such as Claude Code and Codex. Memory and skills carry experience across tasks, and Raven’s own evolution component revises specialist harnesses, testing candidates with a frozen task model.

arXiv 2609.33439v1 27 Sep 2026

Representation and runtimeBelow the harness · what an editable harness is written in

NLAH + IHR

Natural-Language Agent Harnesses write run-level policy, such as stages, roles, state, checks, recovery and stopping, as an editable document; a shared runtime executes it through child-agent calls, and scripts keep exact operations such as tests. A representation and runtime, not an optimizer.

arXiv 2603.25723v1 26 Mar 2026 · v2 18 May 2026

Edit surfaces in the lanes above

Optimizers need such surfaces too: AHE edits component files on NexAU, Self-Harness edits declared parts of a DeepAgents harness, and SoL-Pi uses Pi’s public extension interface.

  • Harness edited
  • One task attempt
  • One continuing run
  • Frozen for use
A map of mechanisms, not a timeline or a ranking: each lane is one answer to when the harness changes. The weight-training branch, composition and representation sit outside the lanes; Raven, a composition system, also evolves the harnesses it coordinates. Method names link to their rows in the table below or, for the three detailed methods, to section 03.
Mechanisms and sources, one row per method
Grouped by when the harness changes across the four optimization regimes
MethodWhat changesFeedbackWho editsHow a change is keptHeld fixed
Between rounds on a task set
ModularRSI · Self-Harness · Meta-HarnessDetailed in sections 03 and 04One module; declared surfaces; whole program, respectivelySame-task contrasts; failure clusters; all earlier traces, respectivelyThe agent’s own model; a separate coding agent for Meta-HarnessThree gates; no regression on two splits; score frontier, respectivelyModel weights, environment, evaluator
AHEAgentic Harness EngineeringarXiv 2604.25850v1 28 Apr 2026 · v4 18 May 2026CodeSeven component types, kept as filesLayered evidence distilled from trajectoriesAn evolve agent on the same fixed base modelPredicted effect checked next round; misses reverted per fileBase model
AutoHarnessarXiv 2603.03329v1 submitted 10 Feb 2026Harness code: a move checker and proposer, or the whole policyIllegal moves and code errors; reward for the policyGemini-2.5-Flash, in a Thompson-sampling tree searchSearch runs until every move is legal or time runs outModel weights; TextArena games as the benchmark
HARBORarXiv 2604.20938v1 22 Apr 2026A finite set of harness feature flagsTask reward from repeated runs, adjusted for cold startA constrained, cost-aware Bayesian optimizerReward model plus a probabilistic safety conditionModel and task set; one production case study
RRSIarXiv 2609.24972v1 21 Sep 2026 · v3 4 Oct 2026CodePrompts, control flow, tools, memory, contextScores on its evolution split; the full edit historyA proposer with a shrinking edit budgetA critic screens benchmark-specific edits; a pruner drops weak onesThe backbone model
RHOarXiv 2606.05922v1 4 Jun 2026 · v3 29 Aug 2026CodeSkills, tools, workflows, instruction filesRe-solved past tasks, self-checked; no external gradesThe agent itself; no model is trainedPairwise self-preference, a proxy for correctnessModel weights
Harness-R1arXiv 2608.02276v1 3 Aug 2026CodeTyped Python patches at four lifecycle hooksA batch of the target’s failure trajectoriesA separately trained 9B engineer model, via SFT then RLValidated patches; in training, rerun success is the rewardTarget model weights during engineer training
SoL-PiarXiv 2609.20519v1 17 Sep 2026CodeOne Pi extension package with four opt-in mechanismsToken use and completed work over a growing pool of rolloutsAuto-research agent loopsSurviving mechanisms ship off by default; no self-rewritingPi itself, unpatched
Across a task stream
Evo-HarnessarXiv 2608.15071v1 15 Aug 2026 · v2 30 Aug 2026CodeGeneral and topic skillsEach one-shot execution contextA solver reflects; an evolver updates the harnessThe evolver keeps what transfers, before the next batchThe agent’s model, frozen
Within one run
Continual HarnessarXiv 2605.09998v1 11 May 2026Embodied agents, evaluated on Pokémon gamesPrompt, sub-agents, skills, memoryFailure signatures in the recent trajectoryA refiner played by the agent’s own modelApplied in place from the next step; no resetModel weights in the main setting
Per instance
Turbo HarnessarXiv 2609.40330v1 30 Sep 2026CodeOne patch to the global harness per instanceThe instance, plus a playbook from an earlier searchA separately trained editor, an RL-tuned Qwen3.5-9BOne editor call per instance; no per-instance searchThe execution model, untrained; the global harness
Separate branch: model weights change too
WHALEarXiv 2609.00196v1 31 Aug 2026CodeModel weights and harness code, in turnRollouts for the weights; search scores for the harnessRejection-sampling fine-tuning; Meta-Harness searchStages switch on a schedule or an adaptive patience ruleNot a fixed-weight method
Harness-ZeroarXiv 2609.24974v1 21 Sep 2026Model weights, distilled from an evolved harnessStudent turns corrected by a reviewer guided by that harnessSupervised fine-tuningThe distilled model runs under the fixed minimal harness; the evolved harness and reviewer are removedA minimal mini-SWE-agent harness with one Bash tool

Self-evolution

Run, record, select

Self-evolving methods wrap the run in an outer loop: what each round records becomes proposed harness edits, and only candidates that pass the check carry forward.

  1. L1

    Run

    The current harness version works through tasks and records every step.

    • Task stream
    • Current harness
  2. L2

    Record and propose

    Traces, scores and failures are collected, and a proposer writes candidate edits to the harness.

    • Traces
    • Scores
    • Candidate edits
  3. L3

    Check and select

    Candidates are evaluated, and the selected version becomes the harness for the next round.

    • Evaluation
    • Selected version

02 / Improvement loop

One loop behind all three methods

The methods differ in how much of the harness they open up, who writes a change and how a candidate is judged. Each iteration still has the same five steps, and the candidates evaluated so far, with their run evidence, inform the proposals of the next round.

An execution loop inside an optimization loop running a configuration is not choosing one Execution harness · version n runs its current configuration Model context in, reply out Tools act on the environment tool calls results The execution loop: build the context, call the model, run tool calls, feed the results back, stop on an answer or a limit. Some harnesses can swap plugins, skills or settings mid-run; that alone does not pick a better version. runs next Optimization loop · uses feedback mostly between runs 1 Run the harness on a set of tasks 2 Read the trajectories, failures and scores 3 Propose an edit to the harness: a module, a function or its code 4 Test it; the method’s rule decides what is kept Held fixed: the evaluator’s tasks, budget and scoring, and usually the model. Who proposes the edit and which test decides differ by method.
Two layers. The execution loop runs a harness configuration, which some harnesses can adjust while they run; the optimization loop proposes, tests and keeps harness versions using feedback. The three methods below run the optimization loop mostly offline. The parts they edit are the loop, tools, context and extension points, or the harness code itself.
  1. 1

    Run

    Run the current harness version on the search tasks with the fixed model.

  2. 2

    Record

    Keep the trajectories, meaning messages, tool calls and outputs, together with the evaluator’s scores.

  3. 3

    Propose

    A proposer reads selected evidence and writes a changed harness: one module function, a constrained edit or a whole program.

  4. 4

    Check

    Depending on the method: interface or execution checks, a review of the diff, or scores from the fixed evaluator. Section 04 lists each method’s gates.

  5. 5

    Select

    Each method keeps candidates its own way: ModularRSI and Self-Harness carry accepted changes into the next version, while Meta-Harness keeps every evaluated candidate in a population with no fixed parent.

Changes between iterations

The harness version, and nothing else

Held fixed

Model weights · environment · task split · evaluator · budgets

After the search

The chosen harness is frozen, then evaluated or used unchanged

A generic improvement loop distilled from the three papers in section 03. Each method fills the five steps in its own way; section 04 compares them.

In these three methods the search runs offline

In all three methods, versions are proposed and selected between evaluation rounds, and the result is frozen before it is evaluated or used. When an evaluation feeds tasks as a stream, as in Meta-Harness’s online text-classification setting, that describes how the application receives its inputs. It does not mean the harness edits itself while it runs.

Two methods on the research map differ on exactly this point: Evo-Harness updates its harness between the tasks of a stream, and Continual Harness edits it during a single run.

Six questions to ask of any method

  1. Which part of the harness may change?
  2. Who proposes the change?
  3. Which trajectories and feedback does the proposer see?
  4. How is a candidate accepted, merged or rejected?
  5. When does the search run, and is the result frozen before use?
  6. What stays fixed: model, environment, evaluator, tasks?

03 / Methods

Three offline methods in detail

ModularRSI, Self-Harness and Meta-Harness come from different groups and are separate methods. Each mechanism summary follows the paper and its official repository, tracing one iteration of the method’s improvement loop.

Method 1

ModularRSI

ModularRSI: Modular and Generalizable Recursive Harness Self-Improvement

Evolves a Terminus-2-based harness one module at a time. The agent’s own model contrasts passing and failing rollouts of the same task on evolution tasks curated apart from the evaluation benchmarks, then changes functions inside one of five modules: agent loop, tool use, observation management, context management and task completion detection. The evolved modules are integrated and frozen before any benchmark evaluation.

One iteration

  1. Roll out on evolution tasks

    Run the current harness K times on each task of a batch of evolution tasks. The paper curates 2,000 executable evolution tasks that do not overlap with the evaluation benchmarks and uses 240 of them in its main experiments. Each task’s own tests mark every rollout as passed or failed.

    Paper §3.3, §5.3
  2. Sort tasks by outcome

    Tasks with mixed results pair a passing with a failing rollout. Tasks that always fail look up an earlier success in a trajectory memory, or are diagnosed on their own. Tasks that always pass are checked for wasted steps.

    Paper §3.3, Eq. 1
  3. Diagnose against one module

    The Code-Modify Agent, run by the same model, reads the trajectories, finds where the passing and failing rollouts diverge and asks whether a change to the module under evolution would have changed the outcome.

    Paper §3.3; App. B, C.1
  4. Rank candidate changes

    Findings that target the same function are merged into one candidate, whose vote count is the number of distinct tasks supporting it. An evolution history of earlier changes helps avoid repeated or contradictory edits.

    Paper §3.4
  5. Write one scoped change

    The agent writes one change that has to hold for all supporting findings, by adding, modifying or replacing a function variant, and it may write only inside that module.

    Paper §3.4; App. C.2
  6. Pass three gates or roll back

    A program check of syntax, imports and protocol; a diff review that does not see rewards and rejects task-specific code; an execution check on two tasks sampled from the current batch. A change that fails any gate is rolled back, and one that passes becomes the next generation.

    Paper §3.5; App. C.3
  7. Integrate and freeze

    After three epochs per module, the five modules are combined and one integration epoch repairs cross-module conflicts; then the function library is frozen. Overlapping functions inside a module can be merged along the way.

    Paper §3.6–3.7; App. C.4

Method 2

Self-Harness

Self-Harness: Harnesses That Improve Themselves

Lets the agent’s own model improve its harness, without human engineers or a stronger external agent. Each round mines failure patterns from the held-in traces, has the same model propose several small edits to declared parts of the harness, and keeps an edit only if it passes regression tests on a held-in and a held-out split. The search starts from a minimal benchmark-specific harness built on LangChain DeepAgents; each later round continues from the version accepted so far, while every task runs in a fresh environment.

One round

  1. Evaluate the current harness

    Run the fixed model inside the current harness on the held-in and held-out splits with the fixed evaluator, two attempts per task, and record each trace and its verifier outcome.

    Paper v3 §3.1–3.2; Alg. 1
  2. Mine weaknesses

    Give each failed held-in run a failure signature: the verifier-level cause, whether the agent’s behavior caused it, and the mechanism involved. Failures with the same signature are grouped into evidence clusters.

    Paper v3 §3.2
  3. Propose minimal edits

    The same model, now as proposer, sees the editable surfaces, the failure clusters, passing behavior to preserve and summaries of earlier attempts, but no raw logs and no held-out evidence. It returns several distinct, minimal edits.

    Paper v3 §3.3
  4. Build the candidates

    Each edit is applied to the harness definition, such as its instructions, subagents, skills, middleware or runtime policy. An edit that changes nothing is invalid.

    Paper v3 §3.3–3.4, §4.1
  5. Regression-test each candidate

    A candidate is accepted only if its pass count drops on neither split and rises on at least one. Trade-offs between the two splits, and candidates that fail to run, are rejected.

    Paper v3 §3.4; Alg. 1
  6. Merge and continue

    Compatible accepted edits are merged into the next harness; if none is accepted, the harness stays as it was. Every decision is logged.

    Paper v3 §3.4; Alg. 1

Method 3

Meta-Harness

Meta-Harness: End-to-End Optimization of Model Harnesses

Searches over whole harness programs with a separate coding agent. The proposer, Claude Code with Opus 4.6, can selectively inspect the code, scores and raw execution traces of earlier candidates in a filesystem, and writes new single-file harnesses, from small edits to full rewrites of prompting, retrieval, memory and orchestration. The base model stays frozen.

One iteration

  1. Start the proposer

    A coding-agent session starts with a short human-written skill for the domain: where to write harnesses, how to inspect the history and which files are off limits.

    Paper §3
  2. Read the history

    The proposer browses a filesystem with the source code, search-set scores and execution traces of all earlier candidates and decides what to read. In the TerminalBench-2 run it read a median of 82 files per iteration.

    Paper §3; App. A.1
  3. Write new harnesses

    It diagnoses failure modes and writes k new single-file Python harnesses, either by editing an earlier one or by rewriting it.

    Paper §3; Alg. 1
  4. Validate the interface

    Each candidate has to pass interface validation before it is evaluated.

    Paper Alg. 1; App. D
  5. Score outside the proposer

    A fixed evaluator runs each valid harness with the frozen model on the search set. Its code, scores and traces are added to the filesystem; nothing is deleted.

    Paper Alg. 1; App. D
  6. Keep a frontier, evaluate once

    All evaluated candidates stay in a population with a Pareto frontier, for example accuracy against context tokens, and there is no fixed rule for choosing a parent. After a fixed number of iterations comes one final evaluation: the frontier on held-out test sets for classification, a single harness chosen by search-set performance on held-out problems for math, and the same 89 search tasks for TerminalBench-2, which the paper treats as a discovery setting. The proposer never sees test-set results.

    Paper §3; Alg. 1

04 / Comparison

The three methods side by side

The rows answer the six questions from section 02, alongside the evaluation benchmarks and our ModularRSI adaptation on DeepAgents.

ModularRSI, Self-Harness and Meta-Harness compared along the same dimensions, following each paper and its official repository
QuestionModularRSISelf-HarnessMeta-HarnessInferenceNet ModularRSI (our adaptation)
Starting harnessTerminus-2 on Harbor, split into five behavioral modulesA minimal benchmark-specific harness on LangChain DeepAgents; later rounds build on the accepted versionSeed harnesses per domain, such as zero-shot, few-shot or Terminus-KIRADeepAgents 0.7.13 with InferenceNet’s run_python tool and five no-op hook functions
What is editedFunction variants inside one module at a time, integrated afterwardsMinimal edits to declared surfaces: instructions, subagents, skills, middleware, runtime policyWhole single-file harness programs: prompting, retrieval, memory, orchestration; full rewrites allowedScoped module hooks and SDK execution points (agent_loop, tool_use, completion, observation)
Who proposesThe evolving agent’s own model, as Code-Modify AgentThe same fixed model, in a proposer roleA separate coding agent: Claude Code with Opus 4.6Contrastive trajectory analyst, module editor and diff reviewer
Evidence the proposer seesPass or fail over K rollouts; same-task contrasts; votes across tasksClustered held-in failures, passing behavior to keep, earlier attempts; no held-out evidenceCode, search-set scores and raw traces of every earlier candidate; never test resultsContrasts across three rollouts of 100 development tasks; no reference values
How a version is keptProgram check, reward-blind diff review, small execution check; otherwise rolled backNo drop on held-in or held-out and a gain on at least one; compatible edits mergedInterface validation, then search-set scores; population with a Pareto frontier; no thresholdStatic checks, diff review, execution probes and development validation
When it runsOffline on evolution tasks; frozen before evaluation; functions composed per task from the frozen libraryOffline rounds on fixed splits; the harness changes only between roundsOffline loop of fixed length; the frontier gets one final evaluationOffline evolution rounds on Dev100; frozen before paired evaluation
Held fixedModel weights, harness infrastructure and module interfaces, environments, evaluatorsModel weights, decoding, budget, tools, environments, evaluator, task splitsBase model, evaluator, proposer, task splits, iteration budgetModel, DeepAgents, sandbox, budgets, scorer and the 100 / 900 split
Selection data and final testEvolution tasks are kept apart from Terminal-Bench 2.0 and SWE-bench VerifiedHeld-out pass counts guide promotion, so that split acts as validationHeld-out test sets for classification and math; TerminalBench-2 reuses its 89 tasks as a discovery problemDev100 development tasks (100 tasks)
Evaluated in the paperTerminal-Bench 2.0 and SWE-bench Verified, including transfer across base modelsTerminal-Bench 2.0, SWE-bench Verified and AppWorld with MiniMax M2.5, Qwen3.5-35B-A3B and GLM-5Online text classification, retrieval-augmented math and TerminalBench-2InferenceNet Dev100 econometric replication tasks

05 / InferenceNet ModularRSI

InferenceNet ModularRSI: implementation and results

We apply ModularRSI’s modular, between-rounds improvement loop to InferenceNet’s DeepAgents harness on econometric replication tasks. Across module-level hook evolution and scoped SDK integration, the evolved harness combines budget-aware submission control with statistical-audit observation feedback. Below, inspect the modular architecture, the source modifications and the paired Dev100 evaluation against pristine DeepAgents.

How ModularRSI evolves the DeepAgents harness

  1. 01 · Exploration & completion modules

    Budget-aware exploration and final submission

    Evolves the agent_loop, tool_use and completion modules so the agent batches exploratory data checks, reserves calls for verification, and submits a complete Python program before budget exhaustion.

    Inspect the evolved modules
  2. 02 · Runtime integration

    Scoped SDK wiring

    Integrates the evolved submission and tool-guidance policies directly into the pinned DeepAgents and LangChain model-binding path so they execute deterministically on every turn.

    Inspect the SDK integration
  3. 03 · Observation module

    Statistical-audit execution feedback

    Evolves ToolNode._normalize_tool_response in LangGraph to enrich run_python outputs with structured statistical-audit checks covering sample filtering, model specification and standard-error clustering.

    Inspect the frozen observation patch
What changed in code — and what it can actually do
Source locations in the frozen ModularRSI harness
ComponentEditable codeBehavior
Loop & submission hooksagent_loop.py
tool_use.py
completion.py
Budget-aware finalization and repair nudges; consolidated data inspection; explicit instructions to verify and submit a complete program.
Runtime wiringdeepagents/middleware/filesystem.py
FilesystemMiddleware._filter_unsupported_tools_and_apply_prompt
langchain/agents/factory.py
create_agent._get_bound_model
Integrates the evolved submission and tool-guidance policies into the native model-call and tool-binding path.
Observation feedbacklanggraph/prebuilt/tool_node.py
ToolNode._normalize_tool_response
Invoked after tool execution; appends statistical-audit guidance (sample filters, model specification, clustering) while retaining the raw execution output.
  1. Executerun_python returns real output
  2. Enrich observationModularRSI appends statistical-audit guidance
  3. Reason and actThe solving model decides what to check or repair

Paired evaluation · Dev100

Pristine DeepAgents vs. ModularRSI-evolved DeepAgents

Evaluated with GPT-5.6 Sol via OpenRouter Responses (non-streaming, explicit high reasoning effort) across all 100 Dev100 tasks under identical sandbox and budget limits.

  • 6 model / 4 tool calls
  • 32,768 output tokens
  • 1,800 s per task
  • Same bwrap sandbox

Pristine DeepAgents

64%64 / 100 strict replications
+3percentage points4 gains · 1 loss

ModularRSI-evolved DeepAgents

67%67 / 100 strict replications
Every denominator is 100; failed tasks do not disappear
MeasurePristine DeepAgentsModularRSI-evolved DeepAgents
Strict replication64%67%
Compilation Success96%98%
Partial Replication75%78%
Correct Coefficient Direction94%95%
Significant Level Correctness78%81%

Strict replication requires coefficient and standard-error relative errors ≤ 1% and p-value absolute error ≤ 0.01 (local-paper-v1). Partial replication checks coefficient error ≤ 5%; significance compares p-value bands at 0.01, 0.05 and 0.1. All 100 tasks remain in the denominator.