HarnessMinusMinus: RSI-Optimized Execution Graphs Cut Token Usage by 88%
Microsoft Research and Tsinghua University introduce HarnessMinusMinus, which represents agent harnesses as editable execution graphs and uses recursive self-improvement to jointly optimize node content and control flow, achieving up to 87.93% token reduction on HumanEval with Qwen3.5-4B while improving pass rates.
Reading font

HarnessMinusMinus: Optimizing Entire Execution Graphs for Token Efficiency
Agent tasks involve multiple interdependent steps: organizing context, calling models, executing tools, and reading feedback. Optimizing a single prompt or summary in isolation may not reduce overall token consumption because earlier changes alter the cost of later steps. For example, generating a history summary costs one model call; if the subsequent execution path changes and only one step remains, that summary may no longer be worthwhile. HarnessMinusMinus (HarnessMM) addresses this by representing the entire harness as an Editable Execution Graph (EDG) where both node content (prompts, context, tool operations) and edges (execution order, branches, preconditions) are optimized together.
Editable Execution Graph Representation
In the EDG, nodes represent context organization, model calls, tool operations, and condition checks. Edges encode execution order, branching, and preconditions. For instance, a compile tool node and a test tool node are connected such that the test node runs only after receiving a successful compilation receipt. The optimizer can add, delete, or modify nodes (adjusting prompts, context, operations) and edges (reorganizing execution paths while preserving required preconditions). Multiple edits combine into a candidate graph evaluated on whole-task performance and total token cost.
Composite Graph Operations: GDR and CCS
Beyond basic edits, the operation pool includes two composite operations for decision reuse:
Guarded Decision Reuse (GDR) : Adds a conditional execution path for an already determined action. After a model writes a test command, the framework checks preconditions and execution conditions upon receiving the compilation receipt; if satisfied, it follows this path, otherwise control returns to the model.
Certified Callback Substitution (CCS) : Eliminates model requests on that path by executing the determined action directly via the native tool interface, linking the execution receipt to the omitted request. The tool runs normally without the model regenerating the same command.
In web interactions, actions bind to screenshot regions from generation time; before execution, the framework verifies current pixels and the previous receipt. Sequential field fills and submissions proceed with page feedback; if the interface changes and conditions fail, the model resumes control.
Recursive Self-Improvement (RSI) Search
RSI searches and filters graph modifications. Each round runs the current framework and candidate versions on the same batch of training tasks, comparing task scores and full execution overhead (including failures and rollback calls). Versions meeting a preset performance threshold with lower cost become the starting point for the next round; a validation set selects the deployment configuration. Model weights remain fixed; changes occur only in the execution graph and its generation/execution rules.
Experimental Results Across Six Benchmarks
HarnessMM was evaluated on six tasks with their respective protocols:
WebArena-Verified (393 tasks): 36.90% success rate, 44.67k tokens/task (28.1% reduction).
MiniWoB++ : 64.58% success rate, 3.98k tokens/task (29.6% reduction).
ALFWorld (2,133 tasks): Success rate increased from 42.29% to 66.20% (+23.91 pp), tokens/task from 34.05k to 31.12k (8.6% reduction).
SearchQA (3,395 questions): Exact match from 69.81% to 76.76%, tokens/task from 1.23k to 0.99k (19.1% reduction). The framework adjusted input processing, task rules, and reasoning organization so directly answerable questions follow a compact path, invoking the model only when further reasoning is needed.
LiveMath (160 problems): Accuracy from 19.38% to 29.38%, tokens/task from 4.10k to 0.83k (79.8% reduction, largest drop). Improved answer prompts and generation format led to more compact reasoning output.
GAIA2 (480 tasks): Success rate from 42.71% to 43.96%, tokens/task from 730.22k to 639.64k (12.4% reduction). The framework maintains history and subsequent actions during multi-tool interactions.
Compared to HarnessPro on WebArena-Verified (34.35% success, 256.45k tokens/task), HarnessMM achieves higher success (36.90%) with far lower cost (44.67k). On MiniWoB++, HarnessMM's 3.98k tokens/task outperforms other methods ranging from 4.41k to 26.72k.
Twelve Model-Framework Combinations on Coding Benchmarks
Experiments combined three models (Qwen3.5-4B, MiMo-V2.6-Pro, GPT-5.6 Sol high) with two frameworks (Codex, DeepSeek) on HumanEval and MBPP-sanitized. All twelve combinations reduced execution tokens, with the highest saving near 90%.
Qwen3.5-4B + DeepSeek Harness : HumanEval tokens -87.93%, pass rate 71.43% → 85.71%; MBPP-sanitized tokens -80.4%, pass rate 90.27% → 91.83%.
MiMo-V2.6-Pro + Codex : HumanEval -83.9%, pass rate → 94.90%; MBPP-sanitized -76.9%, pass rate → 97.28%.
GPT-5.6 Sol high + Codex/DeepSeek : MBPP-sanitized maintained 100% pass rate, tokens -22.3% and -24.0% respectively.
MiMo-V2.6-Pro + DeepSeek Harness : HumanEval pass rate 96.94% → 97.96%, tokens -62.1%; MBPP-sanitized 97.67% → 98.05%, tokens -17.6%.
RSI Training Dynamics Over Eight Rounds
Using Qwen3.5-9B and GPT-5.6 Sol as calling models, researchers tracked success rate and token cost across eight RSI rounds on 32 MiniWoB++ training tasks:
Qwen3.5-9B : Success rate 78.13% → 96.88%, tokens/task 2.97k → 1.46k.
GPT-5.6 Sol : Success rate 92.50% → 93.13%, tokens reduced 47.39%.
Success rates rise early then stabilize, while execution cost continues to decline. Each round's retained graph seeds the next round's edits, allowing ongoing adjustment of prompts, context, and tool control flow.
Conclusion
HarnessMM optimizes the entire execution graph jointly: node-level prompt/context adjustments and edge-level control-flow reorganization are evaluated together on whole-task performance and total token overhead. RSI searches graph modifications iteratively, while GDR and CCS provide composable graph operations that enable simultaneous tuning of steps and their dependencies, retaining configurations that improve task outcomes and reduce token consumption.
Paper: HarnessMinusMinus: A Technical Report on Efficient Agent Harnesses (arXiv:2610.32813) GitHub: https://github.com/microsoft/HarnessMinusMinus
Code example
在 WebArena-Verified 的 393 项任务上,HarnessMM 达到 36.90% 成功率,每项任务执行开销为 44.67 Tokens/task (k)。在 MiniWoB++ 的综合结果中,HarnessMM 以 3.98 Tokens/task (k) 达到 64.58% 成功率。图 3 同时列出任务表现与 Token 开销。
在 ALFWorld 的 2,133 项交互任务上,HarnessMM 将成功率从 42.29% 提高到 66.20%,提升 23.91 个百分点;执行开销从 34.05 降至 31.12 Tokens/task (k)。
在 SearchQA 的 3,395 道验证题上,HarnessMM 将精确匹配率从 69.81% 提高到 76.76%,执行开销从 1.23 降至 0.99 Tokens/task (k)。框架调整了输入处理路径、任务规则与推理组织,让能够直接处理的问题沿紧凑路径完成,需要继续推理时再调用模型。
在 LiveMath 的 160 道题上,HarnessMM 的准确率从 19.38% 升至 29.38%,执行开销从 4.10 降至 0.83 Tokens/task (k),执行 Token 减少 79.8%,是六项任务中最大的 Token 降幅。通过改进回答提示与生成方式,模型以更紧凑的形式输出推理信息。
GAIA2 需要多次工具交互,框架要在执行过程中维护历史信息和后续动作。在 480 项测试任务中,HarnessMM 将成功率从 42.71% 提高到 43.96%,执行开销从 730.22 降至 639.64 Tokens/task (k)。About this article
For attribution, corrections or content rights, contact





