HarnessMM cuts agent tokens up to 87.93% — Guarded decision reuse — What does it mean?
The news. On October 23, 2026, researchers from Tsinghua University and Microsoft Research Asia posted HarnessMM, a method that cuts the tokens an agent harness spends by reusing decisions its model has already made. On 98 HumanEval test tasks, Codex kept its 90.82% success rate while tokens per task fell from 66.72k to 47.02k. Read the paper →
Picture a restaurant kitchen. The head chef is expensive and slow, so a good kitchen does not call the chef over after every pot boils. When the chef writes a ticket that says sear the steak for four minutes, then plate it, the line cook can follow that ticket alone once the oven timer rings. The chef is called back only when something the ticket did not cover happens, such as a burnt pan.
A typical agent harness works the opposite way. After a tool result it calls the model, even when the model had already fixed the next action. After writing a program, the next command, compile it, was already known; after a successful compile, the test command was already known too. Each tool result still triggers a fresh model call that re-reads the context and re-writes a decision nobody needed to change.
HarnessMM turns the ticket into a data structure. An Executable Decision Graph stores each resolved action with its exact arguments, the order it depends on, and a public guard, a check on the tool receipt. Guarded Decision Reuse keeps the graph alive across tool calls and runs a stored action when the observed receipt satisfies its guard. Certified Callback Substitution then executes it through the harness's normal tool interface and records that the model call it replaced was really skipped. A small selector picks which eligible decision fires, or abstains.
Anything unplanned goes back to the model: a new semantic decision, evidence the guard does not cover, or a selector that abstains. That fallback is the safety rail. The cook never improvises; an unexpected receipt means the chef is called.
Saving tokens is not automatic. The paper names the Substitution Paradox: a cheap fast path only helps if it removes a model call, not if it runs next to one. The tokens a substitution removes must exceed the tokens it adds, counting writing the graph, choosing a decision, and every fallback after a failed guard. That is why the paper counts whole-task cost and not the size of one reply.
A worked example, with illustrative numbers (not from the paper). A coding task needs four steps after the first draft: compile, run tests, read the failure, patch. Say each model callback costs about 6k tokens of re-read context plus reasoning. A normal harness makes 4 callbacks: 24k tokens. With HarnessMM, the first reasoning call also writes the compile and test commands as guarded decisions. Both run when their receipts match, so only the failure-reading and patching steps call the model: 2 callbacks, 12k tokens, plus perhaps 1k to write the graph. 13k instead of 24k, about 46% fewer tokens, as long as the compile and test guards hold. If the compile fails, the guard fails, the stored test command never fires, and the model is called as before.
The paper's measured results follow the same shape. On 98 HumanEval test tasks, Codex held 90.82% success while tokens per task fell from 66.72k to 47.02k (29.54% saved). With the DeepSeek harness, success rose from 71.43% to 85.71% while tokens fell from 96.28k to 11.62k, an 87.93% saving. A separate MBPP ablation measured 26.91% lower cost than single-use graphs and 19.52% lower than keeping the callbacks. The paper tunes companion settings with RSI, so the headline numbers are not pure decision reuse; the MBPP ablation is the cleaner test of reuse itself.
| Approach | What it shrinks | Does the later model call still happen? |
|---|---|---|
| Prompt or context compression | Size of each call's input | Yes, a smaller one |
| Fast and slow model routing | Which model, or how deep it reasons | Yes, by a cheaper path |
| Reusable skills and macros | Reasoning by guiding it with a stored routine | Yes, informed by the skill |
| HarnessMM guarded decision reuse | Whether the call is needed at all | No, when the guard holds |
Goes deeper in: AI Agents → The Agent Loop & State → Inside a Tick
The cost side is covered in Agent Engineering → Cost & Latency Engineering → The Cost Profile of an Agent, and result caching is the nearest classic idea: reuse work whose inputs have not changed.
Related explainers
- Estimate-Execute-Expand (E3) — another way to cut agent tokens, by starting from the smallest scope
- Harness-engine coordination for KV caching — reuse at the cache layer instead of the decision layer