[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107627":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":13,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":28,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":14,"starSnapshotCount":14,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},107627,"HarnessMM","YuhuaJiang2002\u002FHarnessMM","YuhuaJiang2002","HarnessMM: recursive self-improvement for harness token efficiency",null,"Python",211,16,3,0,24,131,14,71.69,"Apache License 2.0",false,"main",true,[24,25,26,27],"agent-harness","llm-agents","recursive-self-improvement","token-efficiency","2026-11-23 13:44:06","2026-11-23 13:20:38","# HarnessMM\n\n**Recursive Self-Improvement for Harness Token Efficiency**\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.32813\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-arXiv%3A2610.32813-B31B1B?logo=arxiv&amp;logoColor=white\" alt=\"Paper (arXiv:2610.32813)\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fpdf\u002F2610.32813\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPDF-Download-B31B1B\" alt=\"Download paper PDF\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n![Figure 1 from the HarnessMM paper: recursive self-improvement refines the execution graph through Guarded Decision Reuse (GDR) and Certified Callback Substitution (CCS).](docs\u002Fassets\u002Freadme\u002Fpaper-figure-1.png)\n\n*Figure 1. HarnessMM uses task feedback to improve execution graphs, reuse resolved decisions and replace redundant reasoning callbacks with certified native execution.*\n\nHarnessMM reduces harness token consumption through guarded decision reuse.\nIts visual extension, **HarnessMM-V**, achieves **higher success and lower\nexecution cost than HarnessPro, SoL-Pi, Codex Harness and DeepSeek Harness**\non the same 96 MiniWoB++ test tasks. The coding results below also show lower\ncost with preserved or improved success for Codex and DeepSeek Harness.\n\n## HarnessPro, SoL-Pi, Codex and DeepSeek comparisons\n\n![HarnessMM-V on 96 MiniWoB++ test tasks: 62.50% success with Tokens\u002Ftask (k) of 5.07. Execution token savings are 49.42% versus HarnessPro, 87.92% versus SoL-Pi, 88.67% versus Codex Harness and 74.69% versus DeepSeek Harness; success is higher than all four.](docs\u002Fassets\u002Freadme\u002Fcompetitor-results.svg)\n\n| Method | Success (%) | Tokens\u002Ftask (k) | HarnessMM-V token saving (%) |\n| --- | ---: | ---: | ---: |\n| **HarnessMM-V (ours)** | **62.50** | **5.07** | — |\n| HarnessPro | 61.46 | 10.03 | **49.42** |\n| SoL-Pi | 60.42 | 41.99 | **87.92** |\n| Codex Harness | 59.38 | 44.77 | **88.67** |\n| DeepSeek Harness | 61.46 | 20.03 | **74.69** |\n\nThese additional visual-extension experiments use Qwen3.5-9B, the same full\ntest population, native screenshots, tools and scorer, a 15-action limit and\na 180-second episode allowance. All methods receive the objective of reducing\ncomplete-task input-plus-output tokens while preserving performance. Costs\ninclude every test execution call, including authorship, control, fallback,\ncompaction and unsuccessful executions; offline learning and training\u002Fvalidation\nverification are separate. HarnessPro uses a configured visual reproduction of\nits Medium tier. See the [protocol and full comparison](docs\u002FVISUAL_COMPARISON.md)\nfor all ten methods, runtime details and cost definitions. These are\nHarnessMM-V results, separate from the HarnessMM coding experiments in the\nlinked paper.\n\n## How it works\n\n![HarnessMM overview: the slow actor authors an executable graph, receipt guards select eligible actions, and native execution records callback substitutions. Training, validation and testing remain separate.](docs\u002Fassets\u002Freadme\u002Foverview.svg)\n\nHarnessMM (Harness Minus Minus) reuses decisions that an agent has already made.\nA slow model call writes exact future tool actions into an Executable Decision\nGraph (EDG). After each tool result, Guarded Decision Reuse (GDR) checks whether\nthe observed receipt supports a stored action. Certified Callback Substitution\n(CCS) sends that action through the native tool interface and records the\nreasoning callback it replaced. The original actor resumes when new reasoning\nis needed.\n\nRecursive self-improvement (RSI) refines companion prompts, context settings and\nadapter rules using training feedback. Validation selects among frozen\ntraining-derived candidates; the selected configuration is frozen before test.\nModel weights stay fixed.\n\nThis repository contains the current implementation extracted from the\n[PhiAgent research workspace](https:\u002F\u002Fgithub.com\u002FYuhuaJiang2002\u002FPhiAgent).\nThe Python package is `harnessmm`, matching the project name:\n\n```python\nfrom harnessmm.harness.codex_chisel import CodexChiselController\nfrom harnessmm.harness.benchmark_partition import build_partition\n```\n\nExisting `phiagent` imports remain supported through a compatibility bridge.\n`CHISEL`, `SAR`, `Jev` and `\u003CCHISEL_PLAN>` retain their internal implementation\nand protocol names. See [package migration](docs\u002FPACKAGE_MIGRATION.md) for details.\nSee the [code map](docs\u002FCODE_MAP.md) for the paper-to-code correspondence.\n\n## Codex and DeepSeek coding harnesses\n\nFor the HumanEval result below, **DeepSeek Harness is the host harness;\nthe actor is Qwen3.5-4B**, served through a self-hosted endpoint. The selected\nconfiguration uses a structured `author_bank` adapter, guarded execution,\npublic-history compaction and paid finalization. It is different from enabling\nthe community plugin on stock dsh with DeepSeek V4.1 Flash\u002FOpenRouter.\nSee the [exact configuration and integration notes](docs\u002FDEEPSEEK_REPRODUCTION.md)\nand the [archived HumanEval authoring adapter](reproduction\u002Fhumaneval_v23\u002FREADME.md).\n\nOn HumanEval, HarnessMM uses **29.54% fewer tokens with Codex** at the same\n90.82% success, and **87.93% fewer tokens with DeepSeek Harness** while raising\nsuccess from 71.43% to 85.71%. On MBPP-sanitized, it uses **80.35% fewer tokens\nwith DeepSeek Harness (Qwen)** while raising success from 90.27% to 91.83%.\n\nHarnessMM reduces token consumption while preserving or improving coding\nsuccess in these published comparisons. Values show the original harness →\nHarnessMM on the same test tasks. Each pair shares its backbone, tools and\nscorer. All arms receive prompts to reduce complete-task input-plus-output\ntokens while preserving performance.\n\n![Published benchmark comparisons: HarnessMM reduces tokens per task on HumanEval and MBPP-sanitized while preserving or improving success. Exact values and task counts are in the table below.](docs\u002Fassets\u002Freadme\u002Fbenchmark-results.svg)\n\n| Benchmark | Tasks | Harness | Success (%) | Tokens\u002Ftask (k) | Token saving (%) |\n| --- | ---: | --- | ---: | ---: | ---: |\n| HumanEval | 98 | Codex | 90.82 → 90.82 | 66.72 → 47.02 | 29.54 |\n| HumanEval | 98 | DeepSeek Harness | 71.43 → 85.71 | 96.28 → 11.62 | 87.93 |\n| MBPP-sanitized | 257 | DeepSeek Harness (Qwen) | 90.27 → 91.83 | 53.98 → 10.61 | 80.35 |\n\nCosts include complete-task actor input and output, authorship, selectors,\nfinalization, retries, fallbacks and unsuccessful executions. Offline\noptimization and validation costs are reported separately. See\n[Section 5.3](https:\u002F\u002Farxiv.org\u002Fhtml\u002F2610.32813v1#S5.SS3).\n\n### Decision reuse and callback substitution\n\nA separate MBPP-sanitized ablation uses the same 257 test tasks and execution\nsettings across conditions:\n\n![MBPP-sanitized ablation: HarnessMM reaches 93.77% success with Tokens\u002Ftask (k) of 13.17; removing GDR or CCS increases token consumption. Exact values are in the table below.](docs\u002Fassets\u002Freadme\u002Fablation.svg)\n\n| Configuration | Success (%) | Tokens\u002Ftask (k) |\n| --- | ---: | ---: |\n| HarnessMM | 93.77 | 13.17 |\n| W\u002Fo GDR (single-use EDG) | 93.00 | 18.03 |\n| W\u002Fo CCS (callbacks retained) | 93.39 | 16.37 |\n\nHarnessMM uses **26.91% fewer tokens than single-use graphs** and **19.52%\nfewer than retained callbacks**, with 407 certified callback substitutions.\nSee [Section 5.5](https:\u002F\u002Farxiv.org\u002Fhtml\u002F2610.32813v1#S5.SS5) for the complete\nablation and paired uncertainty.\n\n## Quick start\n\nUse Python 3.10–3.14 and Node.js 22 or later. The core Python package has no\nthird-party runtime dependencies. Node.js is also required by the Python\nnative-bank adapters.\n\n```bash\ngit clone git@github.com:YuhuaJiang2002\u002FHarnessMM.git\ncd HarnessMM\npython3 -m venv .venv\nsource .venv\u002Fbin\u002Factivate\npython -m pip install -e '.[dev,analysis]'\n\nnode examples\u002Fguarded_reuse.mjs\npython examples\u002Fpartition.py\npython -m pytest\nnode --test tests\u002F*.test.mjs\n```\n\nBoth examples run locally with synthetic inputs and make no model calls.\nThe guarded-reuse example executes three receipt-supported actions through an\nin-memory native dispatcher and prints their substitution certificates. It\nalso demonstrates a return to the slow actor after the graph is exhausted.\nThese examples demonstrate controller behavior; they are not benchmark scores\nor token-saving measurements.\n\n## Reproduction cases\n\nThe [reproduction index](reproduction\u002FREADME.md) now covers HumanEval,\nMBPP-sanitized, Codex native banks, GAIA2 continuations and the visual baseline.\nMBPP recomputes the published execution metrics from archived integer counts;\nthe Codex, GAIA2 and visual cases replay synthetic inputs through the released\nimplementation. Each runnable case includes inputs and checked expected output.\nSee [REPRODUCE.md](REPRODUCE.md) for the result-to-command map.\n\n```bash\npython reproduction\u002Frun_all.py\n```\n\n## Repository layout\n\n| Path | Contents |\n| --- | --- |\n| `integrations\u002Fbaseline_harness\u002F` | Original screenshot-based decision boundary, literal action contract and baseline implementation index |\n| `integrations\u002Fcodex_harness\u002F` | Public exports for the existing official CLI runtime, native MCP\u002Fterminal bank adapters and RSI lifecycle |\n| `integrations\u002Fdeepseek_harness\u002F` | Native streaming bridge, action-bank contract, receipt guards, graph execution and certificates |\n| `harnessmm\u002Fharness\u002F` | Codex adapters, protected training\u002Fselection lifecycle, benchmark-specific controllers and RSI |\n| `harnessmm\u002Flearning\u002F` | Residual fitting, cross-fitting, public-evidence contracts, routing and companion configuration methods |\n| `harnessmm\u002Fevaluation\u002F` | Native score checks, quality\u002Fcost comparisons and complete token accounting |\n| `phiagent\u002F` | Compatibility bridge for older Python imports |\n| `scripts\u002F` | Research runners, preparation, metering and analysis dependencies |\n| `configs\u002F` | Two reference configurations used by the unit tests |\n| `reproduction\u002F` | Frozen HumanEval reference, MBPP result aggregates and runnable mechanism cases |\n| `examples\u002F` | Local examples requiring no provider credentials |\n| `tests\u002F` | Python and Node.js contract tests |\n| `SOURCE_MANIFEST.json` | Original and published source hashes, including deployment-placeholder edits |\n\n## Integrating a harness\n\nThe harness supplies the public state, original slow callback, unchanged native\ntool dispatcher, metered provider access and native scorer. The controller\nvalidates stored actions against the current tool schema, checks receipt guards\nand either dispatches an eligible action or returns control to the slow actor.\nIt records the actual native receipt and the bypassed callback identifier.\n\nBrowse the [harness integrations](integrations\u002FREADME.md), including\n[Baseline harness](integrations\u002Fbaseline_harness\u002FREADME.md),\n[Codex Harness](integrations\u002Fcodex_harness\u002FREADME.md) and DeepSeek Harness.\nThe baseline package makes a fresh model decision at each screenshot boundary;\nthe Codex package exports the existing native adapters without duplicating them.\nRun `python examples\u002Fharness_boundaries.py` for a synthetic callback example.\n\nStart with the [integration guide](docs\u002FINTEGRATION.md). Python users can use\n`NativeBankBoundary` for native MCP actions or `TerminalBankProvider` for a\nCodex terminal boundary. The JavaScript integration exposes `ExecutableSubdag`\nand `PersistentBank`. Choose the declared protocol version for the experiment;\ndifferent versions have different bank and selection contracts.\n\n## Experiments and accounting\n\nThe research runners cover coding harnesses, ALFWorld, SearchQA, LiveMath,\nAIME and GAIA2, with method-specific companion configurations. Their original\nmodule names and protocol constants are retained. See\n[reproduction and deployment](docs\u002FREPRODUCIBILITY.md) before using them.\n\nBenchmark execution requires the corresponding upstream runtime, datasets,\nmodel access and a new experiment configuration. Several runners retain\ndeployment admission checks and source seals. Machine-specific paths and\nworker hostnames have been replaced by explicit placeholders. The reference\nconfigs describe historical protocols; they are not ready-to-launch jobs.\nDatasets, model weights, provider credentials and paid execution records are\nmanaged separately.\n\nEvery comparison arm should receive the shared objective of reducing\ncomplete-task input-plus-output token use while preserving task performance.\nCosts include authorship, optimization, selection, control, retries, fallbacks\nand unsuccessful executions within the declared scope. Report\n`Tokens\u002Ftask (k)` over the complete declared execution population, with two\ndecimal places. Execution savings and all-in RSI savings require separate\naccounting; the former alone does not establish the latter.\n\n## Citation\n\nIf you use this implementation, cite **HarnessMM: Recursive Self-Improvement\nfor Harness Token Efficiency**, by Yuhua Jiang, Chang Xu, Feifei Gao and Li Zhao\n([arXiv:2610.32813](https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.32813)).\n\n```bibtex\n@misc{jiang2026harnessmmrecursiveselfimprovementharness,\n  title={HarnessMM: Recursive Self-Improvement for Harness Token Efficiency},\n  author={Yuhua Jiang and Chang Xu and Feifei Gao and Li Zhao},\n  year={2026},\n  eprint={2610.32813},\n  archivePrefix={arXiv},\n  primaryClass={cs.AI},\n  url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.32813},\n}\n```\n\nThe BibTeX citation is provided in [CITATION.bib](CITATION.bib).\n\n## License\n\nThe extracted project code retains its [Apache-2.0 license](LICENSE).\nUpstream harnesses, benchmarks, datasets and model weights retain their own\nlicenses and access requirements. See [NOTICE](NOTICE).\n","HarnessMM 是一个面向大语言模型智能体（LLM Agents）的递归自优化框架，旨在提升 harness 架构下的 token 利用效率。其核心通过受控决策复用（Guarded Decision Reuse）与认证回调替换（Certified Callback Substitution）动态精简执行图，在保障任务成功率的同时显著降低输入输出 token 消耗；支持视觉扩展版本 HarnessMM-V，在 MiniWoB++ 等 UI 交互任务上验证了相较 HarnessPro、SoL-Pi 等主流方法高达 88.67% 的 token 节省与更高成功率。适用于需要高性价比、低延迟响应的 LLM Agent 生产部署场景，尤其适合受限于 token 成本或 API 配额的自动化 UI 操作、工具调用与多步任务编排任务。",2,"2026-11-24 04:32:26","CREATED_QUERY"]