Command Palette
Search for a command to run...
Freehand: 에이전트 하네스에 도달한 쓰라린 교훈
Freehand: 에이전트 하네스에 도달한 쓰라린 교훈
Zezi Zeng Yuke Zhao Muzhao Tian Yifan Yang Qi Dai Bei Liu Kai Qiu Bohan Zhuang Jihua Zhu Chong Luo
초록
쓰라린 교훈(The Bitter Lesson)은 AI 시스템에 내장한 지식이 초기에는 도움이 되지만 결국 범용적 방법에 의해 능가된다는 것을 말한다. 우리는 이 교훈이 이제 에이전트 하네스에도 도달했음을 보인다. 주류 하네스는 모델을 대신해 많은 것을 결정한다. 프롬프트는 과제에 접근하는 방식을 규정하고, 도구 모음과 시간 제한은 행동 방식을 고정하며, 임계값 기반 압축은 무엇을 기억할지 결정한다. 그리고 이러한 모든 결정은 모델이 과제를 보기도 전에 고정된다. 약한 모델에게 이러한 사전 설정은 목발이 되지만, 최첨단 모델에게는 감옥이 된다. 우리는 하나의 규칙 위에 구축된 범용 하네스인 Freehand를 소개한다. 모델에게 셸, 자체 메모리, 그리고 측정기를 제공하고 나머지는 모두 모델이 결정하게 하는 것이다. 다섯 개의 도메인과 세 개의 최첨단 모델 계열에 걸쳐 Freehand는 동시에 더 우수하고, 더 저렴하며, 더 빠르다. Freehand는 11개 모든 설정에서 각 모델의 자사 하네스(Codex, Claude Code, Gemini CLI)를 능가하며, 평균 5.1포인트 높은 점수를 49% 낮은 비용으로 달성하고, 평균적으로 가장 빠르게 실행된다. 통제된 병행 재실행에서 다른 하네스들은 각각 17~62% 더 오래 걸렸다. 또한 OpenCode, Pi, DeepSeek Harness, 그리고 여전히 워크플로와 시간 제한을 고정하는 bash 전용 하네스보다 뛰어난 성능을 보였지만, 하위 계층 모델에서는 자사 하네스가 다시 우세했다. 모델이 강해질수록 최고의 하네스는 가장 적게 결정하는 하네스이다.
One-sentence Summary
Researchers from Xi’an Jiaotong University, Zhejiang University, Fudan University, and Microsoft Research propose Freehand, a general-purpose harness that gives a model a shell, its own memory, and a meter and lets it decide everything else, and across five domains and three frontier model families it outscores Codex, Claude Code, and Gemini CLI in all 11 settings by 5.1 points on average at 49% lower cost while also running fastest on average.
Key Contributions
- Freehand is a general-purpose agent harness built on the rule of giving the model a shell, its own memory, and a meter, while leaving all other decisions such as prompts, tools, timeouts, and memory compaction to the model.
- This work demonstrates a crutch-to-cage reversal in harness design: fixed external presets help lower-tier models but become counterproductive for frontier models, indicating that stronger models perform best when the harness decides least.
- Across five domains and three frontier model families, Freehand outscores Codex, Claude Code, and Gemini CLI in all 11 settings by 5.1 points on average at 49% lower cost, runs fastest in controlled side-by-side reruns where the other harnesses take 17 to 62 percent longer, and also outperforms OpenCode, Pi, DeepSeek Harness, and a bash-only harness that still fixes workflow and timeouts, while lower-tier models still favor first-party harnesses.
Introduction
In agentic coding systems, mainstream single-agent harnesses such as Codex, Gemini CLI, Claude Code, DeepSeek Harness, OpenCode, Pi, GitHub Copilot CLI, and Aider share a ReAct-style observe-reason-act loop but surround it with growing external control: prescriptive behavioral prompts, specialized action and observation interfaces, and threshold-driven context compaction. Prior harness engineering has largely treated these external presets as necessary for long-horizon reliability, and audits show hidden instruction stacks, especially tool definitions, expanding sharply across releases. However, these presets are increasingly a crutch for weaker models and can override better task-specific decisions on frontier models. The authors instead propose Freehand, which removes simultaneous external prescriptions across strategy, action interfaces, and context management, leaving the model with only a shell, its own memory, and a meter, and they evaluate this minimal harness across multiple domains and frontier model families.
Method
The authors propose Freehand, a general-purpose harness designed to unlock model agency by retaining only the core observe-reason-act loop while returning strategy, execution, and working memory entirely to the model. Unlike mainstream harnesses that wrap the model in extensive behavioral rules, preset tool suites, and threshold-based auto-compaction, Freehand minimizes external prescriptions to let the model operate with maximum autonomy.
The framework of Freehand is built upon three fundamental modules that strip away conventional scaffolding:
First, for task-solving behavioral guidance, the authors replace lengthy system prompts and runtime reminders with a descriptive prompt of approximately 200 words. This prompt solely describes how the execution loop operates, the available interface, and the resource metrics in the status footer. It explicitly leaves task organization, coding conventions, and tool-use preferences to the model without injecting any runtime directives or workflow constraints.
Second, regarding the action and observation interface, Freehand exposes a single function tool, bash(command, timeout_s?), devoid of any task-specific wrappers or auxiliary tools. Instead of relying on a fixed vocabulary of pre-packaged operations, the model wields a general, Turing-complete execution primitive. This allows the model to set execution durations, freely invoke system utilities, and write custom scripts or domain tools on the fly at the exact granularity demanded by the problem. Replying without a tool call cleanly terminates the loop.
Third, for context management, the authors implement direct context self-management and cost feedback. Instead of delegating memory to fixed-threshold compactors, Freehand exposes the active conversation history as a mutable JSON file named transcript.json within the environment. The model can inspect, prune, condense, or reorganize historical turns and bulky outputs directly via bash. Because the transcript uses the native message schema of the provider, the model can even base64-encode screenshots and insert them as native image blocks for visual inspection, pruning them when no longer needed. After each turn, the harness appends a concise one-line status footer reporting the turn index, active context size, cumulative tokens, cost, and elapsed time. Armed with this explicit resource feedback, the model autonomously decides whether, when, and how to curate its working memory, leaving short trajectories untouched while pruning stale intermediate outputs at natural subtask boundaries during long-horizon tasks.
Experiment
The experiments evaluate Freehand against first-party and third-party agent harnesses on five cross-domain benchmarks using frontier and lower-tier models. Main results show Freehand attains the highest scores and lowest costs, with ablations tracing these gains to removing prescriptive prompts, specialized tools, fixed timeouts, and external workflow scaffolds in favor of direct bash execution and adaptive context management. Controlled comparisons further find that harness presets help weaker models but constrain frontier models, and qualitative case studies confirm that restricted tool spaces, polling behaviors, and heavy prompts reduce efficiency and can induce false refusals.
An audit of representative agent harnesses shows that mainstream designs add substantial per-turn scaffolding: multi-thousand-token static prefixes, preset operational rules, many built-in tools, and automatic context management. A minimal bash-only configuration removes most of this scaffolding, using a much smaller static prefix and leaving context management to the model. The comparison links this reduced scaffolding to lower per-task input token counts, with cumulative input tokens falling substantially across settings. Static prefix overhead ranges from roughly 0.35K tokens in the minimal setup to about 15.1K tokens in Codex CLI, with built-in tool schemas and preset instructions driving most of the difference. Default tool counts vary widely across mainstream harnesses, from 4 to 34 tools, while the minimal setup exposes only a single bash tool. Mainstream harnesses automate context management through summarization, output pruning, threshold compression, or clearing, whereas the minimal setup uses direct model-side context self-management. Removing preset workflows and tool scaffolding is associated with large relative reductions in cumulative input tokens, reported as 44% to 91% lower across evaluated settings.
Freehand outperforms all evaluated harnesses across the reported model-benchmark settings, achieving the highest scores while also recording the lowest per-task costs and fastest average runtime. The gains are attributed to removing prescribed workflow overhead, replacing fragmented tool calls with direct command and script execution, and returning control to the model. These changes reduce cumulative input tokens and per-task execution cost without requiring more time. Freehand achieves the highest official score and lowest per-task cost across every reported model-benchmark setting, with the fastest average runtime. Across the main GPT-6-astra and Claude Opus 5.5 settings, Freehand scores about 4 to 6 percentage points higher than other harnesses and costs roughly half or less of the first-party and DeepSeek harness costs. Removing prescribed workflows and external abstractions reduces mean per-task execution cost by roughly half, with savings observed across all settings. Cumulative input tokens drop substantially relative to first-party harnesses, reflecting a much smaller persistent tool prefix and fewer repetitive tool calls. On Terminal-Bench 4 with GPT-6-astra, Freehand improves on all listed baselines in score, cost, and runtime.
The first experiment audits agent harness scaffolding and shows that mainstream designs add large static prefixes, preset rules, many built-in tools, and automatic context management, while a minimal bash-only setup removes most of this scaffolding and yields substantially lower input token usage. The second experiment evaluates Freehand against these harnesses and finds that removing prescribed workflow overhead and tool abstractions in favor of direct command and script execution leads to higher benchmark scores, lower per-task costs, and faster runtimes across all reported settings. Overall, the results indicate that reducing scaffolding and returning context and tool control to the model improves efficiency without sacrificing performance.