GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
RecentarXiv preprint

An Empirical Study of Harness Design for Coding Agents

Hold the agent loop fixed, vary one harness component at a time, and measure. Context management, planning and tool choice each helped some models and hurt or merely cost others.

Breakdown by FDE Interviews · 15 min read · Updated

About the original · 2026
AUTHORS
Fan, Zhang, Ma, Hu, et al.
FROM
UMass Amherst, Emory, UNC Charlotte, Zoom
PUBLISHED
Sep 2026 · arXiv preprint
CITED BY
7Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 16% of this breakdown.

01

The paper in one minute

A coding agent is a model inside a harness: the loop that sends the model a prompt, runs the tool calls it emits, and feeds back the results. Harnesses make many choices at once, such as whether the model keeps a plan, whether it gets file tools or only a shell, and what happens when the conversation outgrows the context window. When two products score differently, those choices are tangled together with the model. This paper untangles them.

The authors, from UMass Amherst, Emory and UNC Charlotte working with Zoom, built a lightweight harness on LangGraph with a fixed ReAct loop and three swappable parts. Planning: an explicit plan the model maintains through an update_plan tool, on or off. Action space: eight predefined tools (read, write, edit, list, glob, grep, fetch, bash) or bash alone. Context management: five tiers, from none (T0) to elision, recall, summarization, and a staged combination (T4). They ran three sizes of NVIDIA's Nemotron-3 (30B, 120B, 550B) and Mistral-Medium-3.5 on SWE-Bench Verified (500 GitHub issues) and Terminal-Bench 2.1 (89 terminal tasks), at four context budgets from 32k to 128k tokens.

Four findings came out. Context management matters most when the window is small, mostly by preventing overflow. Cheap rule-based elision before LLM summarization gives the best accuracy for the money. Planning keeps a weak model working long enough to try a fix, while it mainly trims redundant checking for strong models. A predefined tool set props up models that are poor at writing shell commands but adds overhead for models that are good at it.

THE IDEA, VISUALLY
MANAGING CONTEXT PAYS WHEN THE WINDOW IS TIGHT gain over no management, points, mean of 4 models 0 10 20 30 40 32k 35.7 64k 15.9 96k 5.5 128k 2.7 Terminal-Bench SWE-Bench Verified context window budget Without management, an average 78.7% of SWE-Bench runs overflowed at 32k and 8.7% at 128k. Managed runs never did. THE BEST TOOL SET DEPENDS ON THE MODEL SWE-Bench Verified success %, 128k, planning on (Table 3) Nemotron-3 30B $0.09 → $0.03 25.2 10.2 Nemotron-3 120B $0.34 → $0.35 44.0 42.4 Nemotron-3 550B $2.33 → $1.11 65.8 69.4 Mistral-Medium-3.5 $3.14 → $1.72 68.6 45.4 full predefined tool set bash only (better, worse); cost per task at right
Managing context helped most when the window was small, almost entirely by preventing overflow. Whether a predefined tool set beat a bare shell depended on the model: it rescued the weakest model and slowed the strongest.
Research notes: the problem, approach and results
35.7 → 2.7

points gained from context management on SWE-Bench Verified, at 32k and at 128k tokens of context

53%

lower cost per task for Nemotron-3 550B with a bare shell, with success up 3.6 points on SWE-Bench

56%

of settings with a recall tool never called it once; recall added no accuracy over plain elision

THE PROBLEM

Coding agents are compared as whole products, so when one harness beats another nobody knows whether planning, the tool interface or context handling made the difference, or whether the answer changes with the model.

THE IDEA

Build a small coding harness with a fixed ReAct loop, then switch one component at a time across four models, two benchmarks and four context-window budgets: 176 matched settings, compared with paired significance tests.

THE RESULT

Context management mattered mainly under tight windows. Cheap elision before summarization gave the best cost. Planning rescued a weak model and saved cost for strong ones. A predefined tool set helped models weak at bash and slowed bash-fluent ones.

02

Why it matters to an FDE

Customers rarely get to choose the strongest model. They get the one their contract, region or budget allows, often a smaller open-weight model served in their own cloud. This paper is a guide to adjusting the harness for that model rather than copying the settings a frontier model needs.

Context handling is a must when windows are small. With a 32k window and no management, most SWE-Bench runs died on overflow before reaching a fix. If the customer's deployment caps context, compaction is not an optimization, it is what lets the agent finish.

Use cheap compaction first. Replacing stale tool outputs with stubs, and summarizing only when that is not enough, matched the accuracy of heavier strategies at the lowest cost. The fancier option, letting the model re-fetch elided content, was almost never used.

Test planning and tools per model. The same plan scaffold raised a 30B model's success by 11.6 points and, for the largest model, mostly cut cost. Giving a bash-fluent model a bare shell halved its cost; giving the same shell to another model cost 23 points. Nothing here is a universal default.

Measure on enough tasks. Many differences the authors describe on the 89-task benchmark are not statistically significant. A customer eval with a few dozen tasks will mislead you the same way.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 99 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦4 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The harness, each finding with its numbers, the cost picture, and the misreadings to avoid

    Free account
  2. 04How it works

    The loop, the three components, the fixed safety gates, the models and the statistics

    Premium
  3. 05The numbers that matter

    The tables behind each finding, what is significant, and what is only a direction

    Premium
  4. 06Try it yourself

    Recompute the headline from the tables, then see how small benchmarks hide real differences

    Premium
  5. 07Where it breaks

    What the design cannot tell you, and where its results may not transfer

    Premium
  6. 08Using it on a deployment

    Tuning a coding or tool-using agent for the model and context budget a customer has

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →