Continuous Self-Improvement for AI Agents Across Models and Data
This article examines how AI agents can improve continuously across different models and data distributions without assuming that experience gained in one setting transfers automatically. It covers the role of the execution harness, the distinction between cross-model and cross-data transfer, methods for turning execution traces into testable experience, a six-stage recursive improvement loop, migration validation designs, safety governance, and a practical path to start with a minimal closed loop.
1. Why Existing Experience Does Not Automatically Become New Model Capability
An agent is usually not just a model. It is a system composed of the model, task context, tool calls, state management, and execution control. Task performance depends both on the model’s own reasoning ability and on how the surrounding execution framework organizes that ability.
The source material presents a noteworthy transfer phenomenon: when a harness optimized for one model was given to another model to execute workspace tasks, the initial score was 68.41, while the latter model’s original seed harness scored 73.89. The execution framework is commonly called a harness; it connects the model to the task environment.
These results show that under the evaluation conditions described, directly reusing the existing harness did not bring gains and instead produced a performance regression. However, the source material does not provide the scoring scale, sample size, or statistical significance. Therefore, it cannot be concluded that all cross-model transfers will fail, nor should the difference be interpreted directly as a general percentage of performance loss.
The more valuable conclusion is: the fact that harness code can be copied does not mean the experience embedded in it is unconditionally transferable.
Around this problem, continuous recursive self-improvement can be understood as an engineering loop: the system uses execution feedback to form improvement candidates, evaluates them, updates its execution policy, and then uses the results of the next round for further optimization. This article discusses its general mechanisms and practical methods without treating extension proposals as research findings already validated by the source material.
2. What Capabilities the Execution Harness Affects
The execution harness is not simple prompt packaging. A typical harness involves at least the following layers.
1. Task understanding and context organization
The harness needs to decide how to present user goals, environment information, historical actions, and current state. Too much context may obscure key constraints; too little context may cause the model to repeat exploration or make incorrect assumptions.
For example, directory information, file contents, and historical modification records in workspace tasks do not necessarily need to be placed in every model request. The harness should filter relevant content according to the task stage while retaining paths that allow original evidence to be verified.
2. Tool calls and result interpretation
The harness is responsible for describing available operations to the model, checking whether a call is valid, and converting execution results into the information needed for the next decision.
This involves not only whether a call succeeds, but also whether the model can correctly understand failure. Insufficient permissions, a missing target, an operation timeout, and an empty result do not mean the same thing. If the harness collapses them all into “execution failed,” subsequent recovery strategies can easily lose specificity.
3. Planning, retry, and termination control
An agent needs to determine when to continue exploring, when to retry, when to change strategy, and when to declare a task complete.
Excessive retries consume budget and expand side effects; premature termination may mistake “an action has been executed” for “the user goal has been satisfied.” Completion determination should therefore rely first on inspectable environment state, not on the model’s self-confidence.
These designs are all related to model behavior. One model may consistently follow long-form rules, while another may be better suited to short, staged instructions. The same harness can naturally perform differently across models.
3. Cross-Model and Cross-Data Transfer Are Different Problems
1. Cross-model transfer: whether control style matches execution capability
Models may differ in instruction following, tool use, long-context utilization, and error recovery.
During transfer, two types of content should therefore be distinguished:
- Relatively stable task principles: check goals before modification, verify results after writing, and confirm permissions before destructive operations.
- Model-dependent execution details: prompt organization, the amount of information processed per step, the granularity of plan decomposition, and the length of tool descriptions.
The former is suitable for retention as experience; the latter usually needs to be re-evaluated. A configuration should not be assumed to work equally well on the target model merely because it worked on the source model.
2. Cross-data transfer: whether experience remains within its applicable scope
Changes in task data can create another kind of mismatch. A strategy that works for short-document tasks may not apply to large workspaces; a task with clear rules may not represent a task with ambiguous constraints.
For example, “read all relevant files first” can help reduce omissions in small tasks, but in large tasks it may increase cost and cause context congestion. Transferable experience should not be only an action instruction; it should also include trigger conditions and boundaries:
When relevant content is of manageable size and has strong information dependencies, establish a complete view first; when the data is large, use layered retrieval and stepwise verification.
The core of transfer is therefore not to save a fixed policy but to save “under what conditions, and why, a given strategy should be used.”
4. Turning Execution Traces into Reusable Experience
Execution logs are only raw material and do not naturally equal experience. To form transferable knowledge, logs need to be filtered, attributed, and structured.
1. Preserve execution evidence sufficient for review
It is advisable to record task goals, necessary environment state, model and harness versions, tool calls, returned results, verification steps, and resource consumption.
Records should answer three questions: what was seen at the time, what action was taken, and why the result was considered valid. At the same time, data minimization should be followed to avoid long-term storage of sensitive content, access credentials, or information unrelated to analysis.
2. Aggregate by failure type rather than accumulating individual cases
Common failures can be classified as:
- Understanding errors: missing user constraints or misjudging the goal.
- Information errors: using stale state or failing to obtain necessary evidence.
- Operation errors: choosing the wrong tool, parameters, or operation order.
- Validation errors: failing to check the final state.
- Control errors: repeated retries, premature termination, or budget overruns.
This classification helps developers identify recurring systematic issues and avoid adding a special rule for every failure sample.
3. Write experience as testable rules
A qualified piece of experience should include at least trigger conditions, recommended actions, applicable scope, and verification methods. For example:
When a task requires modifying multiple related objects, first identify the dependencies among the objects; after completing the modifications, verify the results item by item. This rule applies to tasks with consistency constraints; it does not mean that every task requires a full scan.
Experience should also be linked to supporting evidence and counterexamples. Experience without counterexample checks can easily become a post-hoc explanation of individual successful traces.
5. Building a Continuous Recursive Self-Improvement Loop
A reliable improvement process can be divided into six stages.
Stage 1: Establish a baseline
Fix the current harness version, model configuration, and evaluation tasks, and record success rate, cost, latency, and safety-related metrics. Without a stable baseline, real improvements cannot be distinguished from environmental fluctuation.
Stage 2: Identify high-frequency problems
Identify areas worth improving from failure and low-efficiency traces. Prioritize high-frequency, high-impact problems with relatively clear causes rather than modifying the entire harness at once.
Stage 3: Generate small-scope candidates
Candidates can be new context organization rules, tool return formats, verification steps, or recovery strategies. Each candidate should state what was changed, what problem it is expected to solve, and what side effects it may introduce.
If a candidate contains too many changes, attribution becomes harder. Even if results improve, it is difficult to determine which change made the difference.
Stage 4: Isolated evaluation
Candidates should first run in a controlled environment. Tasks used to propose improvements and tasks used to judge generalization should be separated as much as possible, and near-duplicate samples should be checked.
If the system repeatedly inspects and tunes its strategy against the same held-out tasks, those tasks are no longer an independent test. New evaluation samples should be introduced when necessary.
Stage 5: Acceptance against multi-objective criteria
Task score is not the only basis. Execution cost, latency, number of tool calls, severe errors, and policy violations should also be checked.
A candidate that improves success rate but significantly increases cost or safety risk may not be worth deploying. Acceptance should be based on business constraints rather than a single average metric.
Stage 6: Controlled release and continuous review
A candidate that passes evaluation can first run in a limited scope while the previous stable version is retained. If anomalies occur, rollback should be possible, and the environment and execution traces of anomalous tasks should be recorded to provide evidence for the next improvement round.
“Recursive” does not mean an infinite loop. The system needs to set an optimization budget, stopping conditions, and human review boundaries.
6. How to Verify That Experience Has Actually Transferred
Cross-model and cross-data evaluation should compare at least three approaches:
- The target model uses its own baseline harness.
- The target model directly uses the externally optimized harness.
- The target model uses a harness re-adapted after experience extraction.
These three comparisons answer, respectively: what the baseline level is, whether direct copying is effective, and whether experience abstraction and adaptation provide additional value.
To further locate the cause, ablation evaluation can be used: remove the experience module, model adaptation module, or validation module separately and observe changes in results. Otherwise, even if the overall approach improves, it cannot be confirmed whether the gain comes from “experience transfer” or from increased budget or other configuration changes.
Evaluation should also be grouped by task category, complexity, and failure type. An increase in overall average score may mask clear regressions in a certain task category. For non-deterministic execution, repeated runs should be used to observe variation, and sample size should be considered when judging whether a difference is credible.
7. Safety Governance Must Be Part of the Improvement Mechanism
Automatically generated improvement candidates should not directly receive production permissions. Especially when file writes, data deletion, or external operations are involved, harness improvements must be constrained by independent permission and verification mechanisms.
Three issues require particular attention.
First, misattribution. A success may come from a simpler task or an accidental environmental change rather than a more effective new strategy. Repeated evaluation and controlled experiments can reduce the risk of misjudgment.
Second, experience contamination. Tool returns, external documents, and user input may contain untrusted instructions. They should be treated as task data and must not be automatically promoted to system-level rules.
Third, objective drift. If only surface completion rate is rewarded, the system may reduce verification or even tend to output results that appear complete. Acceptance should be tied to verifiable state, and candidates should be prohibited from modifying scoring rules, permission boundaries, and audit mechanisms on their own.
A more robust position is: the agent can propose improvements, but whether an improvement enters the stable version should be decided by an independent process.
8. Start with a Small Loop, Not Full Autonomy
For practical engineering, start with tasks that have clear boundaries, verifiable results, and recoverable failures, and build a minimal closed loop:
First fix the baseline and collect traces, then extract a rule from one high-frequency problem; next generate a local candidate and evaluate it on tasks that were not involved in generating the improvement; finally release it in a limited scope and continuously check benefits and regressions.
Only after this chain runs reliably is it appropriate to expand to more models, more task distributions, and more complex experience management.
The core of continuous agent self-improvement is not to have the system constantly rewrite its own code, but to accumulate experience in a form that is explainable, testable, and transferable. In cross-model and cross-data settings, real capability comes from retaining effective principles, identifying applicable boundaries, re-adapting execution methods, and confirming benefits with independent evidence. Only by connecting these steps can experience grow from a local success in one task into long-term, reliable system capability.
