Manuscript Offprint

arXiv:2610.32813

HarnessMM: Recursive Self-Improvement for Harness Token Efficiency

Yuhua Jiang, Chang Xu, Feifei Gao, Li Zhao

Abstract

Agent harnesses repeatedly invoke reasoning after tool feedback, even when an earlier call has already fixed the next action. We introduce HarnessMM (Harness Minus Minus), a method for improving harness token efficiency through guarded decision reuse and recursive self-improvement (RSI). RSI iteratively refines companion harness configurations from training feedback, with validation selecting the configuration for deployment. A controller at the model–tool boundary reuses resolved decisions to replace later reasoning callbacks while actor weights remain fixed. Executable Decision Graphs store exact actions, literal arguments, causal dependencies and public guards. Guarded Decision Reuse activates these persistent decisions from observed receipts; Certified Callback Substitution executes them through the native interface and records removal of the registered slow callback. New semantic decisions, unsupported evidence and selector abstention invoke the original actor again. The representation restricts what feedback may change, while complete-task measurements establish quality and cost. On HumanEval, HarnessMM preserves Codex success at 90.82% while reducing Tokens/task (k) from 66.72 to 47.02 (29.54% saving). For DeepSeek Harness, success rises from 71.43% to 85.71% while Tokens/task (k) fall from 96.28 to 11.62 (87.93% saving). A separate MBPP ablation measures 26.91% lower cost than single-use graphs and 19.52% lower cost than retained callbacks. These results establish guarded decision reuse as a practical way to reduce repeated reasoning in existing harnesses.

1 Introduction

Agent harnesses connect model reasoning to tool execution. ReAct alternates reasoning, actions and observations [46]; SWE-agent demonstrates that interface design shapes software-engineering performance [44], and Toolformer learns when to call APIs [33]. After each tool result, the harness must decide whether the observation demands new reasoning or merely permits an already resolved action to execute. Repeated deliberation can regenerate decisions whose semantics have not changed.

Efficiency methods intervene at different points. Prompt compression and history management reduce the input replayed into a call [16, 17, 21, 30, 42]. Fast-slow architectures and routing change who reasons and how deeply [4, 27, 45]. Executable skills, observation-independent plans and compiled tool dependencies reuse or schedule prior computation [19, 40, 43]. ActionEngine further executes task programs against reusable application memory with reactive repair [52]. These methods already establish the value of programmatic execution. HarnessMM studies a narrower contract: an episode-specific action remains literal, later feedback changes its eligibility, and the execution record identifies the reasoning boundary actually bypassed.

Feedback can optimize instructions and agent programs through APE, STOP, ADAS, Self-Refine and Reflexion [13, 24, 36, 49, 53]. Such optimization constructs a harness; its deployment still determines which callbacks recur. Jev's typed probability interface [1] motivates compact candidate selection, but adding a selector does not remove the original callback automatically. We call this accounting mismatch the Substitution Paradox: computation is saved only when eliminated reasoning exceeds added authorship, selection and recovery.

A concrete opportunity appears when slow reasoning fixes several actions before their execution feedback arrives. After writing a program, the next compilation command can already be specified; after compilation, a successful return code can activate an already-specified test command. We call a decision resolved when prior reasoning has fixed its action and literal arguments; the unknown tool receipt determines whether that action is ready to execute. The example separates semantic uncertainty from execution uncertainty and suggests a different role for feedback: activating a resolved decision. Our insight is that such decisions can persist across feedback boundaries as guarded executable commitments. An authored graph can serve multiple transitions while its continuations remain resolved; new inference returns control to the slow actor, which may reason and author further graphs throughout the task.

We introduce HarnessMM (Harness Minus Minus), a method for improving harness token efficiency by changing when the harness invokes its reasoning model (Figure 1). HarnessMM inserts a controller at the native decision boundary while keeping model weights, tools and task interfaces fixed. Executable Decision Graphs (EDGs) store actions and literal arguments already resolved by slow reasoning, together with their dependencies and public execution guards. Guarded Decision Reuse (GDR) retains these decisions across tool transitions and checks whether observed receipts satisfy their guards. Certified Callback Substitution (CCS) then dispatches the stored action through the native interface and omits the cor-

Figure

Figure 1: HarnessMM overview. The upper row shows RSI updating a harness from EDGiEDG_{i} to EDGi+1EDG_{i+1} using task results and token consumption; observations supply execution evidence, including visual signals when supported. Below, GDR introduces guarded reuse of resolved decisions, and CCS replaces a redundant reasoning subgraph with certified native execution. Solid arrows show regular execution, dashed arrows show guarded reuse routes, and dashed boxes mark edited subgraphs. The graphs are schematic.

responding reasoning callback. A typed selector chooses an eligible decision or abstains; new semantic decisions, unsupported evidence and abstention return control to the original actor. This changes the harness’s execution policy so that resolved actions avoid repeated context input and reasoning output while unresolved decisions retain access to the original reasoning process. Complete-task accounting includes graph authorship, selection, remaining slow calls, fallback and unsuccessful executions. Recursive self-improvement (RSI) iteratively refines companion harness configurations: the current harness supplies training feedback for candidate edits, validation selects the retained candidate, and that harness supplies the next round’s training feedback. The selected configuration is frozen before test evaluation (Appendix B.2).

We integrate HarnessMM into Codex and DeepSeek Harness and evaluate each against its original harness. On the same 98 HumanEval test tasks, HarnessMM preserves Codex success at 90.82% while reducing Tokens/task (k) from 66.72 to 47.02, a 29.54% saving. For DeepSeek Harness, success rises from 71.43% to 85.71% while Tokens/task (k) fall from 96.28 to 11.62, an 87.93% saving (Section 5.3). These comparisons demonstrate that improving when a harness invokes reasoning and executes actions can reduce token consumption while preserving or improving task performance. An MBPP ablation isolates persistent decision reuse and callback removal, measuring 26.91% lower cost than single-use graphs and 19.52% lower cost than retained callbacks. Companion studies evaluate their benchmark-specific instruction and context configurations separately (Section 5.4).

Our contributions are:

• EDGs separate resolved action semantics from feedback-dependent readiness, making prior deliberation executable at future tool boundaries.

• GDR retains the graph and uses public receipts to activate causally ordered actions while reserving new decisions for slow reasoning.

• CCS substitutes native execution for registered callbacks and verifies omission with receipt-bound certificates. The MBPP ablation measures how reuse and callback substitution affect success and complete task cost.

References (52)