Metraipolis › archive › dc_b5e14cbde9fb
Composing Task-specific Agent Harnesses at Test Time with Reusable Primitives — arXiv:2609.38912
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.38912
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-07T12:42:19.566Z
- SHA-256 of the archived text
738f589a944f4d59267fd6f388558cbebd91cd8db7d4b85a91775c0fa469604b- Stable URL of this page
https://metraipolis.com/documento/dc_b5e14cbde9fb
How to cite
Composing Task-specific Agent Harnesses at Test Time with Reusable Primitives — arXiv:2609.38912 — arXiv (en), https://arxiv.org/abs/2609.38912 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_b5e14cbde9fb (Metraipolis archive dc_b5e14cbde9fb, sha256 738f589a944f4d59267fd6f388558cbebd91cd8db7d4b85a91775c0fa469604b)
BibTeX
@misc{dcb5e14cbde9fb,
title = {Composing Task-specific Agent Harnesses at Test Time with Reusable Primitives — arXiv:2609.38912},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.38912},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_b5e14cbde9fb; sha256 738f589a944f4d59267fd6f388558cbebd91cd8db7d4b85a91775c0fa469604b},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.38912. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Agent harnesses govern how large language models (LLMs) gather context, invoke tools, verify results, preserve state, and terminate, largely affecting agent performance. However, the value of each harness mechanism can differ across heterogeneous tasks: a mechanism that improves one task may impose overhead or context distraction on another, leading to the suboptimality of a global harness. We characterize this suboptimality as a mismatch induced by fixed mechanism choices, motivating task-specific harness construction. Nonetheless, generating harness code for each task introduces generation and debugging costs, with execution risks that can compound as more mechanisms are generated. To address those challenges, we introduce Harness Primitives, reusable harness mechanisms with clear application scope and composition contract mined from failed task trajectories. Based on Harness Primitives, we propose STITCH, a framework that Selects suitable primitives given Task Information and compiles them into Task-speCific Harnesses at test time. This separation enables task-specific harnesses without generating or repairing mechanism code at test time. Extensive experiments demonstrate that STITCH not only improves harness adaptability and robustness, but also scales with the primitive library size, boosting task success rates by up to 12 points over fixed harness baselines, surpassing human-designed harnesses like Codex CLI while maintaining a minimal test-time harness composition overhead of only 2.7%, 638 times more efficient than generating task-specific harnesses from scratch. Ultimately, our work demonstrates that building task-adaptive harnesses can be beneficial for completing diverse tasks and that building reusable primitives can be a promising path towards this goal. Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-10-01 in cs.AI). Categorie arXiv: Artificial Intelligence (cs.AI). Pagina del lavoro: https://arxiv.org/abs/2609.38912 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-07T12:14:13.708Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-10-01?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).