Harness²: Recursive Agent Harnessing & Cross-Task Learning

Author
DeepSeekAgent.io Editorial Team
Published
Updated

Harness² moves the object of improvement from model weights to the runtime harness. System prompts, tools, memory, skills, subagents, scripts, guardrails, and middleware can be recomposed while the backbone model stays frozen.

The research targets open-world tasks that were not known during harness design. With no ready-made verifier to declare a harness edit correct, Harness² connects two levels of recursion: one improves the current task and the other carries evidence-supported experience into future tasks.

Two levels of recursion

Task-level recursion

Each task-level step follows Propose–Probe–Compose:

  1. Propose generates general and domain-specific candidate edits from the failure trajectory.
  2. Probe executes the same task under the candidate harnesses and preserves behavior and artifacts.
  3. Compose compares those executions and combines edits supported by their behavioral contrast.

The method does not simply ask a model whether its own answer is good. It observes what changed under different harnesses. Tool success, produced files, workflow progress, and removed errors can supply comparative evidence even when no ground-truth answer exists.

Task-level recursion can scale horizontally or vertically. Parallel mode explores more candidates at once; sequential mode carries the refined harness and accumulated evidence into the next step. Both increase real execution count, so the recursion budget is also a cost-control setting.

Harnessing-level recursion

The second level extracts lessons from adopted harnesses and their execution evidence to update a continual-improvement harness. A future editor can consult what worked under which conditions, what has already failed, and what the adopted edit cost.

This turns memory from a summary of user conversation into operational knowledge about harness design.

Results reported by the paper

The authors evaluate GLM-5 and Gemini 3.5 Flash across JobBench, LAB, and WorkBuddy-Bench with four model–starting-harness configurations. One Harness² step improves every tested configuration over its base harness, with reported gains of up to:

  • 11.5 points on WorkBuddy-Bench;
  • 4.5 points on JobBench;
  • 11.8 percentage points in LAB partial pass rate.

Larger task-level recursion budgets bring further gains in some settings. Every candidate still requires execution, so model calls, tool runs, judging, and parallel capacity belong in the cost calculation.

How this differs from JIT-Agent

JIT-Agent also generates and repairs a harness for the current task. Harness² centers a different question: how can an edit be guided when no ground-truth verifier exists? It composes edits from behavioral contrasts and adds a persistent harnessing-level loop for cross-task learning.

The two projects emphasize different parts of the same direction. JIT-Agent focuses on just-in-time harness construction; Harness² focuses on evidence-driven recursive refinement and reuse.

The current DSH community prototype

On October 19, 2026, a DSH community proposal published a Phase 1 prototype with two plugins:

  • harness2-task-recursion handles proposals, isolated probes, composition decisions, and an event ledger.
  • harness2-meta-recursion consumes only structured outcomes and produces experience that a later editor can query.

The prototype defaults to observeOnly and records auditable probe/completed, compose/applied, compose/rejected, and propose/failed events. Its author reports 34 tests and two real headless-session runs.

This is not an upstream DSH feature. DSH currently lacks a runtime applyHarnessPatch API and complete subagent tool-scope controls, so some edits fall back to a next-task ledger instead of implementing the paper's full online editing loop.

Applying the idea in DSH today

A controlled process does not require fully automatic recursion:

  1. Freeze the model, Profile, plugin versions, and acceptance criteria.
  2. Change one harness component at a time.
  3. Run the baseline and candidate in isolated workspaces.
  4. Preserve tool calls, artifacts, tokens, time, and failure reasons.
  5. Adopt an edit into the Agent Preset only when it wins under the same criteria.
  6. Set deterministic ceilings for candidates, rounds, and spend.

The practical gain is not merely “self-improvement.” It turns prompt tweaking into harness engineering with baselines, controlled comparisons, evidence, and rollback.

References

FAQ

Does Harness² change model weights?

No. The paper keeps the backbone frozen and recursively edits the surrounding harness.

Is Harness² an official DeepSeek Harness feature?

No. Harness² is a Google Research project. The DSH community implementation is an independent Phase 1 prototype.

How can Compose work without a ground-truth answer?

It compares the execution behavior and artifacts of candidates on the same task. This reduces dependence on ground truth, but it does not guarantee that every self-evaluation is correct.