R361 · Agent architecture › Memory and context

HyperHarness: one generator that writes a retrieval harness per user, and what the numbers say about memory systems

Read the original

agent-memorypersonalizationcontext-engineeringbenchmarksagent-harness

Source: arXiv:2611.29062v1, "HyperHarness: Learning to Generate Personalized Agent Harnesses from User Histories", cs.CL, submitted 21 Nov 2026 — the only version. Tan, Zhao, Yang, Liu, Wang, Zhou, Wan and Jiang; University of Notre Dame, UC Santa Barbara and Microsoft. Parts of the method section and all appendices are outside the scope of this summary, so the refinement algorithm's exact form, the training-user counts, construction cost and the ablation detail are not established here and are flagged where they matter. Code and a project website are linked from the paper.

The method

The object being optimised is the harness: the memory and control code sitting between a user's history and the answering model. The paper frames the existing options as a dilemma. One shared memory workflow for every user is cheap but cannot adapt. Optimising a harness per user adapts but needs a task-scored search for each new user, which is a per-deployment cost that does not amortise.

HyperHarness makes the harness generator the trained object instead. A shared history-to-code generator maps a user's permitted history to executable retrieval and answer-guidance functions — actual code, not prompts. The training signal is downstream task score across training users, and there are no reference harnesses to imitate: the generator is refined so that the programs it writes produce better answers from a frozen answering model, which is never updated. At deployment the frozen generator writes a new user's harness in a single pass from history alone.

That is a clean reframing. The per-user search is replaced by a per-user forward pass, and the thing that generalises is a structural prior about how to turn a history into a filter.

The results, and the reading the headline encourages

Three benchmarks (PersonaMemv3, Mem-PAL, MemoryCD) and three frozen answering models (Qwen3.5-9B, Qwen3.8-27B, GPT-5.6-Luna). The reported outcome is the highest aggregate score in seven of nine configurations and second in the remaining two, improving on the strongest baselines by up to 5.95 points, with a 90.32% cut in matched answer-time tokens against long-context prompting.

All of that holds. Two things qualify it.

The two second-place settings are both Qwen3.8-27B, and the margins are noise. On PersonaMemv3 the reflective prompt-optimisation baseline scores 53.14 against HyperHarness's 52.83; on Mem-PAL it is 30.08 against 30.04. A gap of 0.04 points is not a ranking. The honest summary is seven wins, two ties.

The gain shrinks as the answering model gets stronger, which the per-model columns make plain. On PersonaMemv3, against the no-history reference:

Answering modelNo historyHyperHarnessGain
Qwen3.5-9B45.5454.51+8.97
Qwen3.8-27B47.4652.83+5.37
GPT-5.6-Luna53.9058.59+4.69

The 5.95-point headline is specifically Qwen3.5-9B on PersonaMemv3 (with +3.39 on Mem-PAL for the same model), and the paper says directly that on the larger Qwen it is "closely competitive" rather than ahead. So the clean statement is that a learned harness buys the most where the answering model is weakest — useful, and a different claim from a general advance in personalisation.

The more interesting result is what happened to the memory baselines

The baseline set is unusually honest, and it includes the comparison that matters: BM25 retrieval over the user's raw history, ten records per request, alongside a no-history reference, long-context packing, a rolling summary refreshed every 20 events, a published memory framework with embedding retrieval, a tool-using agent harness, reflective prompt optimisation, and trace-guided executable harness optimisation.

Read down those columns and a pattern appears that has nothing to do with the paper's thesis. Several purpose-built memory systems score below doing nothing at all.

On PersonaMemv3 with Qwen3.5-9B, no history scores 45.54. The rolling summary gets 44.51 and the memory framework with embedding retrieval gets 44.42 — both worse, while spending 24k and 26k deployment tokens per query to get there. On MemoryCD with the same model, no history is 32.59 and the rolling summary collapses to 23.34, nine points below using no history whatsoever. On Mem-PAL the memory framework lands at 25.00 against a 27.08 no-history reference.

Meanwhile plain BM25 over raw history is respectable almost everywhere, and on PersonaMemv3 with the strongest answering model it reaches 56.00 — beating the tool-using agent, the trace-guided harness optimiser and long-context packing, at a tenth of long context's tokens.

This independently reproduces a finding established elsewhere: summarising or consolidating a history destroys evidence, and the loss frequently exceeds whatever structure buys. Here it shows up as a by-product in a paper arguing for something else, which makes it better evidence rather than worse. Any memory feature should be A/B'd against keyword retrieval over the raw history at matched tokens before it ships — on this table that one baseline would have killed two popular approaches.

It is also the right frame for HyperHarness's own result: its achievement is beating raw-history retrieval, not beating a summariser.

Cost, stated carefully

Deployment tokens per scheduled query, combining per-user setup and online execution but excluding judging and generator training: HyperHarness needs 2.07k–2.23k on PersonaMemv3 with the weakest and strongest answering models, against 38.2k for long-context packing and 4.4k for BM25. Per-user prompt optimisation and agent-style exploration run at 22k–64k per query. On MemoryCD HyperHarness sits at 4.46k–4.96k.

Two caveats the paper itself supplies. On Mem-PAL BM25 is cheaper in tokens and HyperHarness wins on accuracy instead, cutting tokens by more than 60% against long context, prompt optimisation and the rolling summary rather than against retrieval. And the main table "combines setup and execution usage across different evaluation scopes" — the clean 90.32% figure comes from a separate matched-conditions analysis, not from this table. The generator's own training cost is excluded throughout, and the sections that would quantify it are outside the scope of this summary.

Where the gains come from

The subcategory breakdown is the most useful part for anyone building this. On PersonaMemv3 with the weakest answering model, the system improves both active preference application (51.40 against 49.87) and context restraint (77.74 against 66.88) — an eleven-point jump in not dragging in irrelevant personal context. On MemoryCD with the larger Qwen it improves preference-driven item ranking (28.39 against 24.39) while losing slightly on surface-level review summarisation (12.34 against 13.58).

So the learned harness is not mainly retrieving more; it is retrieving less, more selectively. That is consistent with the token numbers and with why long-context packing underperforms: the binding constraint is irrelevant context, not missing context.

Failure modes and what the paper does not settle

Review checklist for a personalised memory layer

The essential companion is the memory-tax work, which measured dedicated memory systems against naive retrieval over raw history and found many came out negative — this paper's baseline table reproduces that result incidentally, on different benchmarks, which is about as good as independent corroboration gets. Also relevant: entries on what agent memory should store and when consolidation helps, the harness-optimisation line of work that this paper uses as a baseline and reframes, and the broader argument that the harness rather than the model is the system worth engineering.

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.