arXiv:2611.07461cs.CLNov 2026

Manuscript Offprint

arXiv:2611.07461

The Last Mile to the Real World: Agent-Native Primitives as Reusable Building Blocks for Solving Real-World Tasks

Haibo Jin, Peng Kuang, Xiaopeng Yuan, Lucheng Fu, Jerry Wang, Xucheng Yu, Yaoning Yu, Dehao Wu, Runguo Li, Colin Su, Jingxuan Sun, Xuyang Liu, Haojing Luo, Haohan Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

How can an agent handle a real-world task end to end? Despite recent progress in LLM agents, frontier models paired with the harnesses built for them still fall short on public benchmarks of real-world tasks: on Terminal-Bench 4.0 at maximum reasoning effort, GPT-5.6 Sol with Codex resolves 37.3% of the tasks and Claude Opus 5 with Claude Code resolves 51.8%. These tasks fail at the step from reaching a resource to applying it, which we call the last mile to the real world: a tool call must ground its arguments, often in an earlier call's output, each result must reach the steps that consume it, and a failure must be traced back to the work it implicates. Existing approaches put the resource within reach but leave the competence to apply it with the caller, so each harness rebuilds that competence. To address this gap, we introduce agent-native primitives, reusable units that equip a resource with a resident LLM, which applies it in context and communicates with other primitives, and HEELO (Harness Engineering around Evolving Agent-Native Primitives for the Last Mile to Real-WOrld Tasks), a harness engineering framework that builds each task's harness from a library of such primitives. HEELO composes the primitives a task needs into a task-specific graph, verifies the result against evidence from the task's environment and revises the primitives that a failure implicates, and admits new or improved primitives into the library after validation. Results proved in our companion studies bound activation by the task's demand, however large the library, and identify when per-task composition beats the best fixed harness. Each task domain, however, places its own demand on the last mile, so we instantiate HEELO with eight primitive families, each built as the solution to one kind of real-world task, and evaluate them on more than twenty benchmarks. On each comparator's backbone, Dev-Primitives raise Terminal-Bench 4.0 resolution from 37.3% under Codex to 55.5%. Over the mini-SWE-agent seed harness, Harness Primitives composed per task raise Pass@1 from 73.0% to 80.5% on 100 SWE-bench Verified tasks and from 60.0% to 72.2% on 45 Terminal-Bench 2.0 tasks, above the 79.0% and 56.7% of Codex. Tool Primitives raise ToolBench pass rate from 55.8% to 75.1%, Code Primitives raise repository delivery from 0.3180 to 0.5134, Agent Primitives raise mean accuracy over eight math, code, and QA benchmarks from 58.8% for a single agent to 75.3%, and Navigation Primitives raise GAIA-Text-103 accuracy from 45.6% to 58.3%. In formal theorem proving, Math Primitives place an annotated reference method in the top five for 95.0% of held-out Putnam problems, against 84.2% for the strongest reranker. Further analyses show that the benefit comes from applying each resource inside its primitive and that the task decides which primitives run. Beyond these benchmarks, we built heelo.dev, a platform of agent-native primitives for real-world actions. On its 46 real-world tasks, Claude Opus 5.5 with Claude Code and GPT-6.1 Sol with Codex complete 9 each on their own and 39 and 35 when connected to HEELO through our MCP server, with 1.9× and 2.3× less time and 1.55× lower cost per completed task. HEELO provides a unified framework for building agents that handle real-world tasks end to end.

Keywords: LLM Agents, Agent-Native Primitives, Harness Engineering, Real-World Tasks, LLM Tool Use

Public benchmarks across the eight primitive families

Figure

  • 100 sampled tasks, the Harness Primitives setting

(a) Score (%): HEELO leads all 26 comparisons

1234567891011121314
Baseline37.351.876.465.849.952.156.779.070.075.440.045.677.633.2
HEELO55.553.085.691.055.457.172.280.572.775.144.058.379.838.2
Gain+18.2+1.2+9.2+5.2+5.5+5.0+15.5+1.5+2.7+1.7+4.0+12.7+2.2+5.0
DevHarnessToolNavigation
Baseline77.468.171.262.853.356.745.584.288.353.841.043.6
HEELO81.580.277.670.473.376.759.695.091.762.948.250.1
Gain+4.1+12.1+6.4+7.6+20.0+20.0+14.1+10.8+3.4+9.1+7.2+6.5

Claude Code

Docx

other baseline

HEELO

Dev · Terminal-Bench 4.0 resolved vs total cost, 37 setups

Figure

Agent · multi-agent systems accuracy vs tokens per query

Figure

Navigation · growing space cost per query, 32K to 512K tokens

Figure

Math · formal theorem proving

Putnam dark, IMO light; 10 compilations

Figure

Tool · r²-Bench

Pass' vs cost; HEELO on Qwen3-8B

Figure

Code · repository construction delivery vs cost per task

Figure

Harness · building a harness

token cost in actor attempts

Knowledge · same budget

accuracy at equal evidence tokens

Figure

(b) Efficiency in every primitive family

heelo.dev: 46 real-world tasks in four loops

Figure

(c) Task score (%): Claude Code 28 → 90, Codex 25 → 83 with HEELO

(d) Time and cost per task: alone → with HEELO

Figure 1: HEELO on public benchmarks and on the real-world tasks of heelo.dev. (a) Each spoke compares HEELO with one baseline: Codex or Claude Code on the same backbone for Dev and Harness Primitives, and otherwise the strongest baseline of the setting. (b) Efficiency per family. (c, d) Claude Opus 5.5 with Claude Code and GPT-6.1 Sol with Codex run the 46 tasks on their own and connected to HEELO through MCP; in (d), time and cost average a capability's tasks, and a marker is filled when every task of its capability is done.

Introduction

1. Introduction

A central objective of LLM agents is to complete real-world tasks end to end: to act on the world through tools, code, proofs, documents, and other agents until the task's own acceptance criteria are met [1–3]. Recent advances in language models and in the harnesses built around them have improved this ability, as GPT acts through Codex [4] and Claude through Claude Code [5]. Through these harnesses an agent reaches tools and APIs [6, 7], code in large repositories [8, 9], formal proof libraries [10, 11], documents and memories [12, 13], and other agents [14, 15]. Meanwhile, benchmarks increasingly judge agents by whether the real task succeeds: the tool calls fulfil the request, the repository's tests pass, the answer is correct [6, 16–18]. Existing studies have made resources easier to reach and to reuse through tool learning [2, 6, 19, 20], retrieval and memory [12, 21–23], skill and code libraries [24–26], and multi-agent frameworks, workflow search, and harness generators [15, 27–30], providing an important foundation for agents that act in practical environments.

Despite this progress, frontier models in the harnesses built for them still fall short on public benchmarks of real-world tasks. On Terminal-Bench 4.0 at maximum reasoning effort, GPT-5.6 Sol with Codex resolves 37.3% of the tasks and Claude Opus 5 with Claude Code resolves 51.8%, and on the four stages of DevOps-Gym the same two pairs average 49.9% and 52.1% success. In the airline domain of τ2\tau^2-Bench [31], Claude-4.6-Sonnet succeeds in all four trials on half of the tasks. Tasks as ordinary as booking a flight under an airline's policy or filling in a form whose later fields depend on earlier answers fail at the step from reaching a resource to applying it, which we call the last mile to the real world. Its difficulty shows in three aspects. Application in context: a reached resource must be applied to the task's own objects, as a tool call must ground every argument, often in an earlier call's output, and respect the rules of its environment [32–34], retrieved code must be adapted to its target and to the components that depend on it [35, 36], a proof method applies only where its conditions hold [37, 38], and an answer drawn from documents must stay faithful to its source [39, 40]. Composition: what one step returns or requires must reach the steps that consume it, in a form they can use. Evidence-driven revision: a failure observed in the task's environment must be traced back to the work it implicates, so that only this work is redone. Together, these aspects extend the last mile from a single call to the whole harness. However, existing approaches keep the resource but leave the competence to apply it with the caller, or fold it into one monolithic agent, so the harness rebuilds this competence for every task: what the caller must read grows with the library, what it learns ends with the task, and its results are hard to check. This raises a natural question: how can an agent handle a real-world task end to end?

To address this gap, we argue that the competence to apply a resource should travel with the resource itself, and we introduce agent-native primitives, each a reusable resource equipped with a resident LLM. The primitive extends reusable software components, temporally extended options, and design by contract [41–43] to LLM-based units. The resident LLM is what makes the primitive agent-native: it gives the resource a natural-language interface, applies it to each request in context, and communicates requirements to other primitives. Passive artifacts thus become active participants that talk to one another, and the primitive's interface lets a harness find and invoke it without reading the resource.

Primitives alone do not determine which of them a task needs, how their results reach one another, which to revise when the task fails, or which new primitives to admit. We therefore introduce HEELO (Harness Engineering around Evolving Agent-Native Primitives for the Last Mile to Real-WOrld Tasks), a harness engineering framework that builds each task's harness, everything the task needs around the model, from an evolving library of primitives through three mechanisms. First, library selection and composition finds candidates through their interfaces or their own relevance assessments and composes the few the task needs into a task-specific graph that carries each result and message to its consumer. Second, evidence-based execution and improvement runs the graph in rounds, verifies the result against evidence from the task's environment, and traces each failure to the primitives it implicates, so that revision redoes their work and keeps the rest. Third, validation and publishing improves the library between tasks, admitting a new or improved primitive once evidence such as tests, a compiler, or development runs confirms

Introduction

it. Results proved in our companion studies show that need-driven activation stays bounded by the task's demand, however large the library grows, and identify when per-task composition beats the best fixed harness.

However, each task domain places its own demand on the last mile: cooperating agents must combine their work, a repository change must reach every component it affects, a search must follow what remains unresolved, and a harness must fit its task. We therefore instantiate HEELO with eight primitive families, each built as the solution to one kind of real-world task: Tool Primitives for LLM tool use [44], Code Primitives for repository construction [45], Math Primitives for formal theorem proving [46], Knowledge Primitives for knowledge-intensive tasks [47], Agent Primitives for multi-agent systems [48], Dev-Primitives for software engineering [49], Navigation Primitives for large information spaces [50], and Harness Primitives for agent harnesses [51]. Each family realizes the definition above and the mechanisms its task needs, so the eight companion studies become instances of one framework. For these families, we build 25,519 Tool Primitives, 16,464 of them wrapping live APIs; 1,424 Code Primitives, each validated against the tests it carries; and 82 Math Primitives whose Lean artifacts compile. We also introduce a benchmark of 522 repository-reconstruction tasks drawn from real Python projects in seven domains.

Extensive experiments on more than twenty benchmarks demonstrate that, on the same backbones, Dev-Primitives outperform Codex by 18.2 points on Terminal-Bench 4.0, and Harness Primitives composed per task exceed the mini-SWE-agent seed harness by 7.5 and 12.2 points and Codex by 1.5 and 15.5 points on 100 SWE-bench Verified and 45 Terminal-Bench 2.0 tasks, for a composition cost of 2.7% to 4.3% of one actor attempt. Code Primitives surpass Claude Code on its backbone by 56.2% in repository delivery and keep 95.1% of their delivery at 24.0% lower cost with GPT-OSS-20B adaptation and diagnosis. Tool Primitives on Qwen3-8B lead every reference model on τ2\tau^2-Bench at up to 7.7×7.7\times lower cost than GPT-5.4 and complete 2.62.6-3.8×3.8\times as many of 50 curated real-world tasks as GPT-5.4, Claude-4.6-Sonnet, and Gemini-3.1-Pro calling the same tools. Agent Primitives on Qwen3-8B exceed the strongest prior multi-agent system by 7.5 points with ∼\sim3-4×4\times fewer tokens than a text-based one, Navigation Primitives lead the strongest GAIA-Text-103 baseline by 12.7 points, and with GPT-5.6 Luna, Knowledge Primitives gain 14.3 points over Hybrid RAG on average and Math Primitives lead the strongest reranker by 10.8 points in Putnam hit@5. Further analysis across families reveals that the gain lies inside the primitive and that the task decides which primitives run: Tool Primitives more than double the ToolBench pass rate of budget-matched self-refinement over raw schemas, and active Navigation Primitives grow 1.23×1.23\times while distractors grow the information space 16×16\times around the same evidence.

Beyond these research benchmarks, we build heelo.dev, a platform through which agents such as Claude Code, Codex, or Cursor invoke real-world actions as agent-native primitives, from publishing pages and sending outreach to reading invoices and scraping sources. Its 46 real-world tasks cover the 26 capabilities of four end-to-end loops, with the pass criteria of each task fixed before its first run. On their own, Claude Opus 5.5 with Claude Code and GPT-6.1 Sol with Codex, both at medium reasoning effort, complete 9 of the tasks each, with mean task scores of 28% and 25%. Connected to HEELO through our MCP server, Claude Code completes 39 and Codex 35, with scores of 90% and 83%. Per completed task, Claude Code with HEELO needs 3.4 minutes and 0.80insteadof6.3minutesand0.80 instead of 6.3 minutes and1.24 on its own, and Codex with HEELO 3.5 minutes and 0.42insteadof8.0minutesand0.42 instead of 8.0 minutes and0.65. HEELO thus provides a unified framework for handling real-world tasks end to end. Our main contributions are summarized as follows:

  • We introduce agent-native primitives under one definition that pairs a reusable resource, from tools, code components, and proof methods to source models, multi-agent patterns, and repository files, with a resident LLM that applies it in context and messages other primitives. We further build libraries of 25,519 Tool Primitives, 1,424 validated Code Primitives, and 82 Math Primitives with Lean-checked scaffolds.

  • We propose HEELO, one harness engineering framework that unifies the eight families: each task's harness is a graph composed from an evolving library and revised where the task's evidence implicates it, and the library grows between tasks with validated primitives, so that a new kind of task can join as a new primitive family.

Related work

  • Experiments on more than twenty benchmarks across eight kinds of real-world tasks show that every family improves on its reference baseline: primitives lead Codex by 18.2 points on Terminal-Bench 4.0 and Claude Code by 56.2% in repository delivery, and cost up to 7.7× less than GPT-5.4 on τ2\tau^2-Bench. Cross-family analyses locate the gain inside the primitive and show that the task decides which primitives run.

  • We build heelo.dev, a platform that exposes real-world actions, from flights and calendars to email and browser automation, as agent-native primitives to agents such as Claude Code, Codex, or Cursor. On its 46 real-world tasks in four end-to-end loops, Claude Code and Codex complete 9 tasks each on their own and 39 and 35 when connected to HEELO through MCP, with 1.9× and 2.3× less time and 1.55× lower cost per completed task.