Lilian Weng proposes self-improvement through harness engineering; DeepSeek's Cui Tianyi endorses.

icon MarsBit
Share
AI summary iconSummary

Former Head of Safety at OpenAI and co-founder of Thinking Machines Lab, Weng Li, has published a new blog post.

This time, the discussion is about AI self-evolution, and she proposed a practical pathway:

Start with Harness rather than directly rewriting your weights from the model.

Harness

This blog is titled "Harness Engineering for Self-Improvement."

Harness

Among these, Harness can be simply understood as the external execution system of the model, responsible for determining how the model invokes tools, manages context, reads and writes files, splits tasks, calls sub-agents, validates results, and learns from failures.

DeepSeek researcher Cui Tianyi also forwarded it immediately and highlighted the key points:

Self-evolution in the Harness direction is just as likely to yield results as self-evolution in the model direction.

Harness

He also suggested that Skill is a more basic form of Harness's self-evolution: self-evolution at the prompt level.

The original blog post contains an enormous amount of information—please prepare yourself accordingly~

Harness

Self-evolution may first occur at the Harness layer.

The core concept discussed in Weng Li's blog is RSI (Recursive Self-Improvement).

This concept originally carried strong AGI connotations, referring to an intelligent system capable of improving the mechanisms that generate its own intelligence, thereby producing stronger successor systems.

But Weng Li breaks down this issue in a more engineering-oriented way in this blog post.

In today’s AI systems, self-improvement does not necessarily mean the model directly rewriting its own weights.

It may also mean that the model improves the training process, research workflow, and deployment system, thereby helping the next generation of systems perform better on real-world tasks.

Harness

And Harness is the most critical layer in the deployment system.

In the past, when discussing agents, the common description was “LLM + memory + tools + planning + action.”

But in Weng Li's view, Harness has evolved beyond just a few modules in early agent frameworks and is now closer to a runtime and software system design.

It determines how the model observes the environment, takes actions, manages context, saves state, evaluates outcomes, and whether it can continuously iterate over a long task.

So her assessment is: the more feasible path to self-evolution in the near term may not be for the model to directly rewrite its own brain, but rather for the model to begin optimizing how it arrives at answers.

From Context Engineering to Self-Harness, optimizations progress step by step.

Weng Li reviewed the latest batch of related research and identified a clear trend:

The optimization target is gradually moving deeper, from context and workflows to Harness itself.

The progressive chain is: prompt → structured context → workflow → harness code → optimizer code.

As models become more powerful, the objects that can be optimized are becoming more abstract and general.

The first layer is Context Engineering.

The most fundamental issue is that when an agent handles long tasks, the context keeps growing and quickly becomes unmanageable.

Weng Li mentions two representative works here: ACE and MCE.

ACE (Agentic Context Engineering) treats context as a continuously updated "operation manual," rather than a growing pile of prompts.

Harness

It relies on three roles working together: the Generator creates task trajectories, the Reflector extracts key insights from successful and failed trajectories, and the Curator organizes these insights into structured entries and incrementally updates the handbook.

MCE (Meta Context Engineering) goes even further.

It separates the optimization of “how to manage context” from “what to include in the context” into two layers: the outer layer evolves the skill of managing context, while the inner layer uses this skill to optimize the context for specific tasks.

Harness

Weng Li believes that, compared to ACE, which still requires manual design of update rules, MCE has taken another step toward "self-managed memory."

The second layer is Workflow Design, which addresses the question of "how the model should get things done."

Weng Li gave several examples:

An AI scientist built a complete research pipeline spanning idea generation, coding, running experiments, analyzing results, writing papers, and peer review.

Harness

ADAS takes it a step further by treating the design of Agent workflows themselves as a searchable optimization problem, enabling a meta-agent to continuously propose new workflow designs and receive evaluations.

Harness

AFlow represents workflows as graphs and uses Monte Carlo tree search to find better graph structures.

Harness

The progression of this line is as follows: initially, humans engineered task workflows; later, models began participating in designing these workflows; and eventually, the structure of the workflows themselves entered the search space.

In other words, the optimization target is no longer just a single prompt, but how the entire agent organizes its actions.

The third layer is the Self-Improving Harness.

At this level, the model no longer simply uses the harness to complete tasks—it begins analyzing where the harness is lacking and proposes improvements to it.

Weng Li emphasized work like Self-Harness, which has a very clear cycle.

Harness

The first step is Weakness Mining.

The system first collects trajectories left by the Agent during task execution, including tool calls, error logs, failed outcomes, and validator feedback. It then identifies recurring failure patterns from this data.

For example, the model consistently misses files in certain types of tasks, repeatedly attempts ineffective fixes after specific test failures, or loses critical constraints when the context becomes longer.

The second step is the Harness Proposal.

Based on these failure modes, the model proposes minor modifications to Harness.

The focus is on "limited scope" and "verifiable."

The model can see the following information: which parts of the current Harness can be modified, the specific failure modes, which "correct behaviors" must be preserved, and the history of previous modifications attempted.

Proposals should focus on reproducible issues that can be resolved with minor changes, and each proposal should maintain distinctiveness from others.

The third step is Proposal Validation.

Proposed changes cannot be merged directly; they must first undergo testing and validation. Only if they are confirmed to improve performance without introducing noticeable regressions will they be included in the next version of Harness.

Weng Li noted that when running Terminal-Bench-2 on different models such as MiniMax M2.5, Qwen3.5, and GLM-5, the process indeed learned distinct Harness configurations tailored to the specific weaknesses of each model.

However, she also directly pointed out the risk: once programs are allowed to modify system-level code, the abstraction boundary could be breached; permission controls and security layers must remain outside this loop, and the old problem of reward hacking persists.

In addition, Weng Li further mentioned Evolutionary Search.

If Self-Harness is more about repairing your own system after failure, then Evolutionary Search turns the Harness directly into a searchable object.

Its logic is more like natural selection:

Generate multiple candidate harnesses, have the model modify them based on existing versions, then evaluate their performance using benchmarks or validators, retain the better versions and discard the weaker ones, and proceed to the next round.

She also specifically mentioned DGM (Darwin Gödel Machine): directly having a coding agent modify its own Harness code repository.

Harness

In the experiment, using Claude 3.5 Sonnet as the base model, starting from a simple initial configuration, the agent evolved by DGM achieved astonishing results:

Performance on SWE-bench Verified improved from 20% to 50%;

Increased from 14.2% to 30.7% on Polyglot;

Achieved and even surpassed manually designed agents.

Harness

This indicates that even without modifying model weights, Harness itself can already serve as a search space for capability enhancement.

However, these methods are better suited for tasks that can be automatically evaluated, such as code, algorithms, and GPU kernels.

If a task involves scientific taste, long-term product quality, or complex organizational collaboration, evaluation will be much slower and far more ambiguous.

Harness will become stronger, but still has limits.

Weng Li does not view Harness as a replacement for model training; her assessment is more that the two reinforce each other.

A sufficiently mature harness enables the research loop for models to self-improve; while more intelligent models prevent the harness from being over-engineered, ensuring the system’s sustainability.

In the long term, many of Harness’s improvements may eventually become internalized into the model’s own behavior—much like manual prompt engineering techniques, which become less important as models grow stronger in instruction following and reasoning.

But the act of clearly defining the goal, constraints, context, and evaluation criteria has never disappeared.

However, she did not avoid addressing the current bottlenecks on the path to implementing RSI:

The evaluator is too weak and ambiguous. Currently, only tasks with clear, rapid, and objective feedback—such as writing code or solving math problems—can successfully run self-improvement loops. In contrast, research taste, originality, and long-term scientific value are nearly impossible to quantify.

Issues with the lifecycle of context and memory. The more autonomous and independent a task is, the more memory needs to be managed—a point Weng Li believes may eventually become part of intelligence itself, rather than remaining confined to software systems.

Harness

Negative results are easily overlooked. Researchers are naturally more inclined to publish successful outcomes, and models trained on vast datasets dominated by successful cases may struggle to determine when to abandon a hypothesis or accurately report a failure.

Diversity collapse. Evolutionary and reinforcement learning-based loops tend to repeatedly exploit known high-reward patterns; without additional mechanisms to prevent this, the population gradually collapses into variants of a single solution.

Reward hacking. Self-improvement loops optimize any given signal—the reward from unit tests may cause the model to overfit the tests; from an evaluator model, it may learn to specifically "please" the evaluator; from leaderboard scores, it may exploit vulnerabilities in the leaderboard itself.

The tension between long-term health and short-term success. Take coding agents as an example: they already significantly boost daily productivity in software engineering, but their optimization goals are mostly short-term—whether they can complete the immediate task, rather than whether they can safeguard the long-term health of a codebase maintained by hundreds or thousands of engineers.

Maintainability, clear boundaries of responsibility and authority, migration costs, and future debugging burdens—these aspects are still not adequately addressed by standard sandbox training.

The role of humans. Weng Li believes: Humans will not be kicked out of the loop, but rather move “outside the loop”—providing oversight at the right time and at the appropriate level of abstraction; this is a crucial consideration in system design.

In the past, competition among large models primarily focused on parameters, data, computing power, and inference capabilities.

But now, another variable has become increasingly hard to ignore: Harness.

The same model, placed in different harnesses, may exhibit entirely different capabilities—a phenomenon that has evolved from a niche observation into an industry-wide consensus.

From Weng Li’s blog post, it’s clear that “What is the more realistic engineering entry point for AI self-evolution?” will be the key focus of the next phase of discussion.

Blog original: https://lilianweng.github.io/posts/2026-07-04-harness/

Reference link: https://x.com/tianyi/status/2074475185957380379

This article is from the WeChat public account "Quantum Bit," authored by Ting Yu.

Disclaimer: The information on this page may have been obtained from third parties and does not necessarily reflect the views or opinions of KuCoin. This content is provided for general informational purposes only, without any representation or warranty of any kind, nor shall it be construed as financial or investment advice. KuCoin shall not be liable for any errors or omissions, or for any outcomes resulting from the use of this information. Investments in digital assets can be risky. Please carefully evaluate the risks of a product and your risk tolerance based on your own financial circumstances. For more information, please refer to our Terms of Use and Risk Disclosure.