Letting the Harness Improve Itself
If an LLM can optimize the code that runs the Agent, it gains access to a design space far larger than hand-written Prompts.
The seed improver I₀ takes three inputs: an initial solution s, a utility function u, and a black-box language model M, and returns an improved solution s'.
Key insight: the improver itself is text (a prompt or code), so the same improvement logic can be applied to the improver itself.
I_t = I_{t-1}(û, I_{t-1}; M)
// Where:
// I_{t-1} — current improver (prompt/code in text form)
// û — meta-utility: function measuring improver quality
// M — black-box language model
// Output I_t — a better improver
The improved improver automatically discovered classic optimization strategies including genetic algorithms, decomposition-based improvement, multi-arm Prompt Bandit, simulated annealing, and Beam Search—all without human pre-specification.
GPT-4 can improve consistently, but GPT-3.5 and Mixtral actually regress. The recursive structure alone is insufficient: the base model must be strong enough to support meta-level optimization.
Warning: Recursion ≠ Guaranteed Improvement
The recursive structure provides the possibility of improvement, but does not guarantee convergence. Weak models lack sufficient programming intuition at the meta level, and instead amplify noise: results regress rather than improve. This reminds us that the safety of self-improving systems must be grounded in an accurate assessment of base model capability.
Weakness Mining
Clusters failure trajectories into verifier-grounded failure patterns. Each failure record must include: terminal-verifier-level cause + causal state of related Agent behavior + abstract Agent mechanisms exposed by the trajectory.
Harness Proposal
Proposes bounded Harness edits based on mined failure patterns. The model receives: the editable surface, failure pattern summaries, records of passing behavior, and a history of previously attempted edits. Priority is given to addressable recurring error patterns.
Proposal Validation
Validates candidate edits using held-in and held-out datasets. Only accepts edits without regression, ensuring improvements don't sacrifice existing capabilities.
Harness Design = Executable Search Space
Once Harness design is formalized as an executable search space (editable prompts, policy configurations, tool orchestration code), a capable coding Agent can exploit the same design space that human engineers use: automating search, proposal, and validation without relying on manual debugging case by case. This opens up improvement possibilities far larger than hand-written prompts.
Safety Boundaries Are Indispensable
If a program is allowed to edit OS-level configurations, abstraction boundaries will be violated. The editable surface of a self-improving system must be carefully designed: permission controls and security layers must sit outside the improvement loop, guaranteed by humans or tamper-proof oversight mechanisms. Self-improvement without boundaries is self-improvement out of control.