An Empirical Study of Harness Design for Coding Agents

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

arXiv:2609.20804 · 2026-09-18 공개 · arXiv · PDF

swe-bench coding-agents terminal-bench trajectory-analysis context-management context-window action-space harness-design

Abstract

Coding harnesses shape how autonomous coding agents translate model capabilities into long-horizon software-engineering performance, yet existing work typically evaluates harnesses as monolithic systems, leaving the effectiveness of individual components unclear. To enable component-level comparisons, we study this question with a lightweight coding harness whose execution loop is fixed while three components are varied: planning, action space, and context management. Across four models evaluated on SWE-Bench Verified and Terminal-Bench 2.1, we evaluate 176 matched settings spanning five context-management strategies, four context-window budgets, and targeted ablations of planning and action space. We find that: (1) Context management becomes increasingly valuable as the context-window budget tightens, with most of its benefit coming from preventing context-overflow failures. (2) Staging rule-based elision before LLM-based summarization provides the strongest overall efficiency among the context-management strategies, whereas making elided content recoverable adds machinery that models rarely use and yields no accuracy gain. (3) Planning shifts from an accuracy scaffold for weaker models to a cost saver for stronger models, with little change in accuracy. (4) Predefined tools improve performance for models with weaker bash proficiency, whereas bash-capable models can operate effectively with a bash-only interface and achieve substantially lower cost, especially on command-line-centric tasks. Trajectory-level analysis explains these effects: context management extends execution trajectories without substantially altering agent behavior, planning changes where trajectories stop, and the action space changes the granularity at which code is written. These findings inform model- and budget-aware harness design and provide a modular framework for evaluating future harness components.

한국어 요약

한 줄 요약

코드 생성 에이전트의 하네스 성능을 모듈별로 분석한 실험 연구.

핵심 기여도

핵심 아이디어

기존 연구는 코드 생성 에이전트의 하네스를 전체 시스템으로 평가하여 개별 구성요소의 효과를 분석하지 못했다. 본 연구는 실행 루프를 고정하고, **계획(Planning)**, **액션 공간(Action Space)**, **컨텍스트 관리(Context Management)** 세 가지 핵심 모듈만 변경하여 실험을 수행했다. 이는 모듈별 영향을 분리해 평가할 수 있는 **모듈형 실험 프레임워크**를 제시한다. 특히, 컨텍스트 관리 전략 T4는 **룰 기반 삭제(elision)**를 LLM 요약 전에 적용함으로써, 컨텍스트 오버플로우를 방지하면서도 요약 호출 수를 줄여 효율성을 높였다. 이는 기존의 복잡한 복구 메커니즘(예: `recall_event`)이 모델에 거의 사용되지 않는다는 점을 통해, **간결성과 성능의 균형**이 중요하다는 통찰을 제공한다.

기술적 접근법

주요 결과

의의 및 한계

본 연구는 코드 생성 에이전트의 하네스 설계를 **모델과 예산에 따라 조건부로 최적화**할 수 있음을 입증했다. 특히, 컨텍스트 관리와 액션 공간의 선택은 **태스크 유형**과 **모델 능력**에 따라 달라져야 한다는 점을 명확히 했다. 그러나 실험은 **4가지 Nemotron-3 모델**과 **Mistral-Medium**에만 국한되었으며, 다른 모델 가족이나 더 다양한 태스크 유형에 대한 일반화는 제한적이다. 또한, **사전 정의 도구의 구체적인 구성**이나 **bash 명령어 세트**는 명시되지 않았다.

실용적 활용