Freehand’s single-shell design helped frontier AI models but hurt lower-tier models in tests

Researchers led by Microsoft Research Asia have released Freehand, an open-source agent harness that gives an AI model one Bash tool and lets it decide how to work. Across 11 comparisons involving frontier models, the team reports that Freehand improved benchmark scores by an average of 5.1% over the models’ official harnesses while cutting average cost per task by 49.2%. On a separate terminal benchmark comparison, however, all three lower-tier models tested scored better with their official harnesses.

What Freehand leaves to the model

An agent harness is the software around a model that determines how it can act and what information it sees on each turn. In an audit of existing harnesses, the researchers found that some prescribe workflows before the model even sees a 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 when it reaches a fixed size, also leave decisions to the harness rather than the model.

Freehand replaces those workflow rules with about 200 words explaining how the interface works. The model can run a Bash command, set its timeout and write a script when it needs a specialized operation. After each turn, Freehand saves the conversation to transcript.json. The model can then edit that file to remove a lengthy log or condense earlier exchanges rather than waiting for the harness to trigger a summary. A one-line meter shows context size, token usage, cost and elapsed time to inform that decision.

Where the results changed

The research paper describes tests of GPT-6-astra, Claude Opus 5.5 and Gemini 4 Carbon against their respective official harnesses: Codex, Claude Code and Gemini CLI. The evaluation spanned Terminal-Bench 4 for terminal tasks, Terminal-Bench Science for scientific computing, Agents’ Last Exam for knowledge work, OSWorld 2.1 for desktop tasks and AutomationBench for end-to-end workflows.

Across the 11 frontier-model comparisons, the team reports that average cost per task fell from $7.34 to $3.73. In a separate five-way retest run concurrently on the same machine using the same network endpoint, Freehand had the shortest average completion time at 6.25 minutes per task. The researchers attribute the score gains primarily to removing prescribed workflows and specialized interfaces. In longer interactions, they credit token savings to the model’s ability to trim its own transcript.

On Terminal-Bench 4, the lower-tier models showed the opposite pattern:

Model Official harness Freehand
GPT-6 Sol 34.9% (Codex) 29.2%
Claude Sonnet 5.5 41.6% (Claude Code) 34.9%
DeepSeek V4.1 Flash 28.9% (DeepSeek Harness) 23.8%

Those gaps, ranging from 5.1 to 6.7 percentage points, suggest that workflow guidance can still help models on the same kinds of tasks where more capable models benefit from greater discretion. The researchers have not established where that trade-off reverses.

Developed with researchers from Xi’an Jiaotong University, Zhejiang University and Fudan University, Freehand is available on PyPI and GitHub under the MIT license. Freehand has no built-in sandbox or command-approval prompt: commands run with the local user’s permissions. A container or virtual machine is the safer setting for testing it.