ResearchPublication
Beyond prompt optimization: optimizing the whole agent harness
A post of June 2026 on the Prosus AI Tech Blog. An optimizer is given an agent’s whole harness, its code, orchestration and runtime as well as its prompts. The post reports the changes that mattered most, and the bugs in the harness the search found.

Where this comes from
This is a post on the Prosus AI Tech Blog, the blog of data science and machine learning at Prosus, published on 4 June 2026 under the name of Asad Ismail. It builds on Meta-Harness, a method published on arXiv in March 2026 by Yoonho Lee and colleagues, and it is listed here as published work from Prosus. What follows is from the post.
What the post asks
In a modern agent, orchestration, the use of tools, runtime behavior and execution policies often matter as much to performance as the prompt does, the post explains. Methods such as OPRO, MIPROv2, TextGrad and GEPA mostly optimize prompts, and leave most decisions about the harness fixed and tuned by hand. The team set out to optimize the whole harness, with Meta-Harness: a search over the harness’s code, its prompts and the structure of the system.
How the search works
Propose
A proposer, a coding agent built on a language model, reads the traces of earlier runs and proposes a candidate change to the harness.
Evaluate
The candidate is run on a small search set. Every run logs its code, its scores and its traces to the filesystem, and later proposers read that history.
Accept
A candidate is kept only if it improves on the Pareto frontier of the objectives the team tracks, and only if its trace shows that the intended mechanism really fired and explains the result.
Validate
Strong candidates are promoted to a held-out validation set.
Two ideas drive it. From earlier work such as GEPA it takes the finding that optimization improves when the full execution traces can be read, and the value of keeping a Pareto frontier of trade-offs in place of a single metric. The second, and in the post the more important, is to let the optimizer edit the harness itself.
The team extended Meta-Harness in two ways.
- Several objectives. Besides the pass rate, it optimizes quality, token usage, calls to the language model, tool calls and wall-clock time.
- A harness of several agents. The optimizer may change the boundaries between planner and executor, and the dispatcher, so it can optimize a system of several agents.
What the search found
The post plots every candidate on the search set by its pass rate and by what it cost in dollars to evaluate, where one candidate is a whole harness run over the whole search set. The best pass rate reached its optimum within the first handful of candidates, and the optimizer spent the remaining runs driving the cost down. The plot shows those two axes for readability; a candidate was accepted on all six objectives.
- pass rate of the cheapest harness on the frontier, at $1.90 a candidate
- 70%
- pass rate of the best-quality harness on the frontier, at $5.26 a candidate
- 100%
The changes that mattered
The post names the four mechanisms with the most impact that could be checked in the traces. In each case the team could see the mechanism fire in them.
- Planner and executor kept apart. Separating the plan’s structure from its execution improved reliability, with fewer tasks falsely reported as complete. The planner’s output stayed the structure of the task, and only executor steps produced deliverables.
- Dispatcher policies. Small edits to the dispatcher’s rules changed what executors did first and cut duplicated work: executors were told to look for capabilities they could reuse before writing new logic.
- Runtime and setup. Edits to the infrastructure moved latency and cost. Changing how packages were installed and set up, for example, removed setup work that was repeated in long chains.
- Filtered tool output. Guardrails on very large tool responses kept them from flooding the context. Long command output was cut to its head and its tail, so the next step of reasoning stayed on track.
Bugs the search found
Some of the most important gains were fixes to bugs in the harness itself, which the meta-harness found and fixed on the way.
- A dependency bug. Steps ran after a setup step upstream had failed: an install command failed, and a later step still read artifacts that should only exist after a successful setup.
- A race in the evaluator’s state. Checkpoint logic ran before the final state of completion had propagated, so a run was archived as complete while late updates to its tasks were still in flight, and its final status was inconsistent.
Both came from the same loop of proposing, evaluating, reading traces and repairing. In the post’s words, “A search designed to find better harnesses also surfaced the latent defects in the one we already had.”
On the held-out set
Combined, the mechanisms with the most impact carried over from the search set to a larger held-out evaluation set. The post shows this in a chart against a baseline whose prompt was tuned by experts, and its text gives no figures for it.
What the post concludes
- Give the optimizer the harness’s code as well as its prompts: the edits that mattered most were structural and operational, and out of a prompt’s reach.
- Keep the search set small and make it demanding, with long chains of tasks, so that brittle setup and dependency bugs fail loudly during the search, before they can fail quietly in production.
- Treat every improvement as provisional until the trace shows that the intended mechanism really fired.
The post sets this in a pattern seen again and again in machine learning, which Sutton called the bitter lesson: features were engineered by hand before they were learned, and prompts were written by hand before they were optimized. The harness, the code, orchestration and runtime choices around a model, is next, it argues. Given the objective, the harness and its traces, an optimization loop can find better configurations than people would design, and failures they did not know were there.
The post
Beyond Prompt Optimization: Optimizing the Whole Agent HarnessAsad Ismail. Prosus AI Tech Blog, 2026Author
Asad Ismail
References
- Beyond Prompt Optimization: Optimizing the Whole Agent HarnessAsad Ismail. Prosus AI Tech Blog, Medium, 4 June 2026
- Meta-Harness: End-to-End Optimization of Model HarnessesYoonho Lee, Roshen Nair, Qizheng Zhang, Kangwook Lee, Omar Khattab, Chelsea Finn. arXiv, 2026