Freehand, an open-source agent harness from a team led by Microsoft Research Asia, gives a model one Bash tool instead of a menu of specialized tools and lets it decide how to manage its conversation history. Across 11 comparisons involving three frontier models, the researchers reported a 5.1% average score improvement over the models’ official harnesses. Average cost per task fell 49.2%, from $7.34 to $3.73. On a separate terminal benchmark, however, all three lower-tier models tested scored higher with their official harnesses.
What Freehand leaves to the model
An agent harness is the software that connects a model to its tools and manages the interaction as it works. In an audit of six harnesses, the team found that many prescribed a workflow before the model saw the task. Codex, for example, used roughly 3,300 words of instructions that included how to search files and when to read them in parallel. Other design choices, such as automatically summarizing a conversation at a fixed threshold, left the model little say over which details to retain.
Freehand replaces those workflow instructions with about 200 words explaining how the harness works. The model sets its own command timeout when needed. After each turn, the harness writes the conversation to a local transcript.json file in the API’s native message format. The model can edit that file to remove a lengthy log while keeping a test result it still needs. A one-line meter shows context size, token usage, cost and elapsed time, so the model can decide when to trim its history.
Where the results diverged
In their paper, the researchers evaluated GPT-6-astra, Claude Opus 5.5 and Gemini 4 Carbon against their respective official harnesses: Codex, Claude Code and Gemini CLI. The evaluation covered Terminal-Bench 4, Terminal-Bench Science, Agents’ Last Exam, OSWorld 2.1 and AutomationBench, spanning terminal tasks, scientific computing, knowledge work, desktop control and workflow automation.
In a five-way simultaneous retest on the same machine and network endpoint, Freehand averaged 6.25 minutes per task, the fastest of the harnesses tested. In experiments that varied individual features, the team attributed the score gains primarily to removing prescribed workflows and specialized tool interfaces. It attributed token savings on longer tasks to the model’s ability to trim its own transcript.
The lower-tier comparison was limited to Terminal-Bench 4:
| Model | Official harness score | Freehand score | Difference |
|---|---|---|---|
| GPT-6 Sol | 34.9% (Codex) | 29.2% | −5.7 percentage points |
| Claude Sonnet 5.5 | 41.6% (Claude Code) | 34.9% | −6.7 percentage points |
| DeepSeek V4.1 Flash | 28.9% (DeepSeek Harness) | 23.8% | −5.1 percentage points |
The team interprets the contrast as evidence that preset workflows can still help lower-tier models even when they constrain frontier models. The tests do not establish the capability level at which that trade-off changes.
Researchers from Xi’an Jiaotong University, Zhejiang University and Fudan University collaborated on Freehand. The code is available on GitHub under the MIT license, and the package is on PyPI. Freehand has no built-in sandbox or command-approval prompt: commands run with the local user’s permissions. Developers trying it should use an isolated container or virtual machine, as the researchers did in their evaluation.