HyperAIHyperAI

Command Palette

Search for a command to run...

코딩 에이전트를 위한 하네스 설계에 관한 실증 연구

Run-Ze Fan Zihao Zhang Simin Ma Yebowen Hu Shouju Wang Kaiqiang Song Fei Liu Hamed Zamani Xiaoyang Wang

초록

코딩 하네스는 자율 코딩 에이전트가 모델 능력을 장기적 소프트웨어 엔지니어링 성능으로 전환하는 방식을 결정하지만, 기존 연구는 대체로 하네스를 단일 시스템으로 평가하여 개별 구성 요소의 효과를 명확히 밝히지 못했다. 구성 요소 수준의 비교를 가능하게 하기 위해, 실행 루프는 고정하고 계획, 행동 공간, 컨텍스트 관리의 세 가지 구성 요소를 변경하는 경량 코딩 하네스로 이 문제를 연구한다. SWE-Bench Verified와 Terminal-Bench 2.1에서 평가한 네 가지 모델을 대상으로, 다섯 가지 컨텍스트 관리 전략, 네 가지 컨텍스트 윈도우 예산, 그리고 계획과 행동 공간에 대한 표적 제거 실험을 아우르는 176개의 대응 설정을 평가한다. 우리는 다음을 발견했다. (1) 컨텍스트 윈도우 예산이 빠듯해질수록 컨텍스트 관리의 가치가 점점 커지며, 그 이점의 대부분은 컨텍스트 오버플로 실패를 방지하는 데서 비롯된다. (2) 규칙 기반 생략을 LLM 기반 요약 앞 단계에 배치하는 방식이 컨텍스트 관리 전략 중 전반적 효율성이 가장 높았으며, 생략된 콘텐츠를 복구 가능하게 만드는 것은 모델이 거의 사용하지 않는 메커니즘을 추가할 뿐 정확도 향상은 없었다. (3) 계획은 약한 모델에서는 정확도를 보조하는 발판에서 강한 모델에서는 비용 절감 수단으로 역할이 이동하며, 정확도에는 거의 변화가 없다. (4) 사전 정의된 도구는 bash 숙련도가 낮은 모델의 성능을 향상시키는 반면, bash에 능숙한 모델은 bash 전용 인터페이스로도 효과적으로 작동하고 특히 명령줄 중심 작업에서 비용을 크게 낮출 수 있다. 궤적 수준 분석은 이러한 효과를 설명한다. 컨텍스트 관리는 에이전트 행동을 크게 바꾸지 않으면서 실행 궤적을 연장하고, 계획은 궤적이 멈추는 지점을 바꾸며, 행동 공간은 코드가 작성되는 세분성을 바꾼다. 이러한 발견은 모델 및 예산을 고려한 하네스 설계에 정보를 제공하고 향후 하네스 구성 요소를 평가하기 위한 모듈형 프레임워크를 제공한다.

One-sentence Summary

In an empirical study of 176 matched harness configurations across four models evaluated on SWE-Bench Verified and Terminal-Bench 2.1, UMass Amherst et al. find that context management mainly prevents overflow failures under tight budgets, rule-based elision before LLM summarization is most efficient, planning shifts from an accuracy scaffold to a cost saver, and predefined tools help weaker bash models while bash-capable models favor cheaper bash-only operation.

Key Contributions

  • A modular harness-evaluation framework fixes the execution loop and varies planning, action space, and context management, applied to 176 matched settings spanning five context-management strategies, four context-window budgets, and targeted ablations across four models on SWE-Bench Verified and Terminal-Bench 2.1.
  • Context management becomes most valuable as the context-window budget tightens, with most of its benefit coming from preventing context-overflow failures. Strategy T4 achieves the lowest aggregate cost at broadly similar success rates by applying rule-based elision before selective LLM summarization, whereas making elided content recoverable adds machinery that models rarely use and yields no accuracy gain.
  • Planning shifts from an accuracy scaffold for weaker models to a cost saver for stronger models with little change in accuracy. Predefined tools improve performance for models with weaker bash proficiency, while bash-capable models can operate effectively with a bash-only interface at substantially lower cost, especially on command-line-centric tasks; trajectory-level analysis links these effects to distinct behavioral changes.

Introduction

Large language models are increasingly used to autonomously resolve real software-engineering tasks such as closing GitHub issues and completing end-to-end terminal work. These results depend heavily on the coding harness, the software layer whose planning, action interface, and context-management choices can change performance even when the underlying model stays fixed. However, many earlier studies compare harnesses as complete systems, which conflates multiple mechanisms and makes it hard to tell whether performance differences come from planning, tools, context management, or their interaction with the model. The authors address this by building a modular harness with a fixed execution loop and varying only planning, action space, and context management. They evaluate three Nemotron-3 model sizes plus Mistral-Medium-3.5-128B on SWE-Bench Verified and Terminal-Bench 2.1, sweeping five context-management strategies across 32k to 128k token budgets and ablating planning and action space to characterize how each component's usefulness depends on model capability, task type, and resource budget.

Method

The authors leverage a modular and lightweight harness designed to isolate and evaluate the contribution of individual components across different models and computational budgets. The overall framework follows a ReAct loop, where each turn consists of a reasoning step, an action, and an observation. This modular design allows components to be independently configured and composed for controlled component-level analysis.

The harness varies three primary components: planning, the action space, and context management, while keeping other supporting components fixed.

Planning provides an explicit and persistent representation of task progress maintained by the model. When enabled, a system instruction defines the protocol, and a first-turn reminder requests an initial plan before any action is taken. The model maintains this plan through a dedicated tool. In subsequent turns, the plan is appended to the model input without being stored in the conversation history. This setup estimates the effect of a persistent planning scaffold rather than planning as a general reasoning strategy.

The action space defines how agents interact with the environment. In the predefined-tool setting, the harness provides a suite of tools for file manipulation, text searching, web fetching, and bash execution. Each tool features a typed argument schema and a description specifying its protocol, errors, and side effects. Web search is explicitly excluded to prevent exposure to ground-truth patches. In the bash-only setting, predefined file, search, and web tools are removed, leaving bash for general environment interaction. This intervention also alters how workspace modifications are tracked and validated, enforcing read-before-write checks and triggering automatic diagnostics.

Context management determines how the growing interaction history is represented within a bounded context window. The authors draw on both lossy and lossless methods through three composable mechanisms. Elision replaces the body of a stale tool observation with a short stub. Recall stores elided observations in the file system and exposes a tool to read them back on demand, making elision reversible. Summarization folds older messages into a running natural-language summary produced by a separate, tool-free call to the same model.

These mechanisms are combined under two token thresholds: a soft threshold B1B_1B1​ and a hard threshold B2B_2B2​. The preamble and a token-budgeted recent window of at least two turns remain verbatim. Once the history exceeds B1B_1B1​, the harness elides bulky tool observations in the middle region, storing the originals externally and leaving stubs in their place. If the history still exceeds B2B_2B2​, the harness summarizes the oldest middle events into the running summary. This full three-mechanism configuration ensures that elision reclaims tokens cheaply, recall recovers detail when needed, and summarization compresses history that is too old to keep verbatim.

Beyond these three variable components, the harness includes several fixed supporting components to ensure robust execution. A safety layer enforces workspace access controls through path resolution, read-before-write checks, and a permission layer that classifies actions. Tool errors are returned to the model as observations rather than raised exceptions, preventing loop crashes. Post-edit diagnostics run fast, read-only checks on edited Python files to surface syntax errors and undefined names immediately. Finally, a stuck detection mechanism monitors the tool log for streaks of identical calls, injecting reminders or ending the run early to prevent the agent from exhausting its step budget on repetitive failures.

Experiment

The experiments evaluate Nemotron-3 models at 30B, 120B, and 550B plus Mistral-Medium-3.5-128B on SWE-Bench Verified and Terminal-Bench 2.1, varying context-management tiers, context-window budgets, planning, and tool-space configuration. Context management is valuable mainly under tight windows because it prevents truncation failures, and T4 gives the best accuracy-cost tradeoff while recall is rarely used and adds little. Planning extends weak-model trajectories enough to attempt edits, whereas for stronger models it mostly trims post-edit verification and reduces cost. The full tool set scaffolds weaker models, but bash-only can help stronger models by enabling larger code-writing actions and fewer interactions, especially on shell-centric tasks.

The harness exposes predefined file, search, web, and bash tools with typed schemas and either read-only or state-modifying behavior. Read-only tools may execute concurrently within a model turn; the bash-only condition removes the predefined workspace tools while retaining bash and auxiliary tools such as update_plan and recall_event. Experiments suggest planning mainly reduces redundant post-edit verification, while bash-only encourages fewer but larger code-writing and file-replacement actions. Read-only tools for file reading, listing, and globbing do not modify workspace or harness state and may run concurrently within a model turn. Bash-only removes predefined workspace tools but keeps bash and auxiliary tools, leading models to bundle operations into fewer, larger code-writing or create-or-replace actions.

The configured tiers range from no context management to a combined approach using elision, recall, and summarization. Intermediate tiers isolate elision, elision with recall, and summarization alone. The full configuration applies elision at a soft threshold and summarization at a hard threshold, while the intermediate single-action tiers operate at the hard threshold. Tier 4 is the only tier that enables all three mechanisms: elision, recall, and summarization. Recall builds on elision by storing elided observations externally, making elision reversible. Tier 1 and Tier 3 isolate elision and summarization respectively, while Tier 0 disables context management entirely.

On SWE-Bench Verified, context management provides the largest success-rate gains over no management at the tightest context-window budgets, and the advantage narrows as the window grows. Among the managed tiers, the tier combining elision, recall, and summarization offers accuracy comparable to the other managed strategies while achieving the lowest mean cost per task. This cost advantage comes from keeping peak context below the nominal budget and reducing reliance on LLM summarization. The success-rate gap between managed tiers and no management is largest at the smallest context budget and shrinks steadily as the context window increases. Combining elision, recall, and summarization yields comparable success rates to other managed tiers while having the lowest mean cost per task across most settings. The combined tier keeps peak context usage substantially below the nominal window and invokes LLM summarization less often than summarization-only management.

On Terminal-Bench, context management improves success rates over no management, with the largest gains under tight context budgets. T4 provides the best accuracy-cost trade-off among managed tiers, while T3 and T4 keep costs below T1 and T2 for larger models. Managed tiers avoid window-overflow failures entirely, whereas unmanaged runs are more sensitive to context-window capacity. At the 32k budget, every managed tier improves success rate over T0 for all four models, with especially large gains for Mistral-3.5-128B. T3 and T4 are substantially cheaper than T1 and T2 for the larger models, and T4 achieves the best or tied best success rate for two of the four models.

At a 128k context budget with the full tool set, planning has model-dependent effects on trajectory cost. Nemotron-3 30B shows increased turns, tool calls, and average input tokens on both benchmarks, whereas Nemotron-3 550B and Mistral-Medium-3.5-128B show reductions on SWE-Bench. Nemotron-3 120B shows a mixed pattern, with increases on SWE-Bench but decreases on Terminal-Bench. Nemotron-3 30B shows the largest planning-driven increases in SWE-Bench trajectory cost, with turns, tool calls, and input tokens all rising sharply. For Nemotron-3 550B and Mistral-Medium-3.5-128B, planning lowers SWE-Bench turns, tool calls, and average input tokens. On Terminal-Bench, planning reduces turns and tool calls for Nemotron-3 120B and Mistral-Medium-3.5-128B, while Nemotron-3 30B experiences increases.

The experiments evaluate tool configurations, planning, and context management on SWE-Bench Verified and Terminal-Bench. They show that planning mainly reduces redundant post-edit verification while a bash-only setup encourages fewer but larger code-writing or file-replacement actions. Across both benchmarks, context management improves success rates most at tight context windows, and the combined elision, recall, and summarization tier offers comparable accuracy with the lowest cost while avoiding overflow failures. Planning effects on trajectory cost are model dependent, with some models reducing turns and tool calls and others increasing them.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp