Manuscript Offprint

arXiv:2610.34724

Harness-Model Collaboration for Long-Horizon Continual Learning

Zhen Bi, Zhizhi Peng, Yan Wang, Xueshu Chen, Haofei Zhang, Yaobo Zhang, Zeyu Yang, Qing Shen, Jungang Lou

Abstract

Long-horizon agents continuously encounter reusable procedural knowledge, yet existing systems typically rely either on model adaptation or external memory, trading persistent learning for rapid reuse. This limitation is especially important for Web agents that repeatedly execute related multi-step workflows. We propose HaMo, a Harness-Model collaborative framework that combines fast non-parametric experience accumulation with slow parametric adaptation. HaMo distills trajectories into strategy-level experience cards for immediate retrieval, while an experience-conditioned continual learning objective trains the model to interpret, ground, and execute retrieved strategies across changing contexts. A retrieval-coverage-based selection mechanism further identifies compact and complementary trajectories for parameter updates. Experiments show that HaMo outperforms harness-only and model-only adaptation under within-domain and cross-domain shifts, improving both retention and adaptation. These results highlight the importance of jointly preserving procedural experience and internalizing the competence to transfer and execute it across tasks.

1 Introduction

An agent that completes a long-horizon task today should become better at solving related tasks tomorrow. Long-horizon interactions naturally produce reusable procedural knowledge [13, 36], yet agents without explicit cross-task learning mechanisms treat each task as an isolated episode and cannot systematically accumulate such experience over time. This limitation is particularly important for Web agents, which repeatedly perform multi-step workflows such as information seeking, product search, and transactional tasks [3, 5, 8], where knowledge acquired from previous interactions could directly benefit future ones.

A natural solution is model-level adaptation, where trajectories from previous tasks are used to update model parameters [2, 16, 29]. Such updates can turn past interactions into persistent behavioral competence, but frequent adaptation is costly and may interfere with previously acquired capabilities, especially under sequential distribution shifts [12, 26]. An alternative is harness-level adaptation, where useful experience is stored externally and retrieved

Harness or model only methods ▲ Our proposed HaMo

Figure

Within domain continual learning

Cross domain continual learning

Figure 1. Motivation for our method in continual learning for long-horizon agents. Harness- and model-only methods either enable fast experience reuse but tend to plateau, or suffer from instability and forgetting. HaMo combines both mechanisms to achieve steady improvement within domains and better retention across domain shifts.

for future tasks [15, 37]. This enables newly acquired knowledge to affect behavior immediately without retraining, but the model itself does not necessarily become better at interpreting and executing the retrieved experience. Neither mechanism alone fully addresses continual learning in long-horizon agents (shown in Figure 1).

We argue that these two forms of adaptation are naturally complementary because they operate at different timescales. A strategy discovered from a single trajectory may already be useful for future tasks, while still being too specific to justify an immediate parameter update. Such knowledge can first be stored externally and reused when similar situations arise. As related strategies recur across tasks, they provide stronger supervision for improving the model itself. For long-horizon agents, this process is not simply about memorizing past solutions: the key challenge is to internalize procedural competence, i.e., the ability to interpret high-level strategies, ground them in changing environments, and translate them into appropriate actions.

Motivated by this observation, we propose HaMo, a Harness-Model collaborative framework for continual learning in long-horizon agents. Our method separates adaptation into two tightly coupled processes. At the harness level, each trajectory is distilled into a compact experience card containing the task context, initial conditions, and a strategy-level solution outline. These cards are stored in a persistent non-parametric memory, making newly acquired procedural knowledge immediately available to future tasks. At the model level, HaMo continually updates a single parameter-efficient adapter using selected trajectories together with historical replay, improving the model's ability to exploit accumulated experience while preserving previously acquired capabilities.

A key design of HaMo is experience-conditioned adaptation. Instead of learning only a direct mapping from interaction context to action, the model is additionally conditioned on strategy-level experience retrieved from the harness. It therefore learns how to interpret and instantiate a retrieved strategy under different observations, objects, states, and interaction histories. The same interface is used during inference: the harness retrieves relevant experience, while the adapted model determines how that experience should be executed in the current environment. In this way, the harness preserves reusable procedural knowledge, whereas model adaptation progressively internalizes the competence required to transfer and execute that knowledge across tasks.

HaMo further addresses the redundancy of continual supervision. Although storing experience externally is inexpensive, repeatedly training on every observed trajectory is unnecessary because many trajectories encode similar strategies. We therefore introduce a retrieval-coverage-based selection mechanism that identifies a compact set of representative and complementary trajectories for parameter adaptation. An experience is preferred when it can support many other tasks through retrieval, while the selected set is encouraged to cover distinct strategy contexts. This concentrates parameter updates on broadly reusable procedural knowledge without requiring all stored trajectories to participate in training.

We evaluate HaMo on continual streams of long-horizon tasks across ScienceWorld, ALFWorld, and WebShop, covering both within-domain and cross-domain settings. WebShop provides an interactive Web-agent environment, while the other benchmarks test whether the proposed learning mechanism generalizes beyond a single domain. The results show a clear complementarity between harness- and model-level adaptation: harness-only learning enables rapid reuse of experience but reaches a performance ceiling, whereas model-only adaptation can acquire strong task-specific capabilities but suffers substantial forgetting under distribution shifts. HaMo combines the strengths of both, achieving stronger continual adaptation while better retaining previously acquired capabilities.

References (15)