Microsoft Research has open-sourced Freehand, an agent harness that gives the model one bash tool, a description of its own runtime of about 200 words and control over its own context. The paper says it beat the first-party harness of every model it tried, Codex, Claude Code and Gemini CLI, in all eleven settings, scoring 5.1 points higher on average at 49% lower cost. Bruno Borges flagged it on X. I installed it and ran it against opencode on the same five models and three tasks.
Three decisions handed back
The paper’s argument is that a harness makes three decisions for the model before the model has seen the task. The prompt prescribes how to approach the work, a tool suite and fixed timeouts decide how to act, and threshold compaction decides what to remember. Freehand hands each one back. The model chooses its approach, writes whatever scripts it needs through one shell tool, and manages its own history.

The loop is small. The only tool is bash(command, timeout_s?), and the model sets the timeout on each command itself, with 120 seconds as the default. The conversation lives in a file, transcript.json, in the provider’s native message format, so pruning a stale log or condensing a finished subtask is just another shell action. Automatic compaction exists but is off by default. After every turn the harness appends one status line, and that line is the model’s only gauge of what it has spent.
[harness] turn <t> | context <c> tokens | total in <n> (cached <n>) out <n> | $<cost> | <m> min elapsed

There’s no sandbox and no approval prompt. The model’s commands run with your permissions, so the README tells you to use a container or VM for anything you don’t trust. It’s MIT licensed, labelled alpha, and installs from PyPI as freehand-ai on macOS and Linux. Native Windows isn’t supported yet.
How much each harness says before turn one
The paper measures the static prefix each harness sends on every turn, which is the system prompt plus the tool definitions. Freehand’s is the smallest by a wide margin.

| Harness | Prompt and tool definitions | Tools |
|---|---|---|
| Codex | 15.1K tokens | 23 |
| Gemini CLI | 9.5K tokens | 16 |
| Claude Code | 8.5K tokens | 22 |
| DeepSeek Harness | 6.5K tokens | 34 |
| OpenCode | 5.2K tokens | 10 |
| Pi | 1.2K tokens | 4 |
| Freehand | 0.35K tokens | 1 |
What the paper reports
The authors ran five benchmarks: Terminal-Bench 4, Terminal-Bench Science, Agents’ Last Exam, OSWorld 2.1 and AutomationBench. They used GPT-6-astra and Claude Opus 5.5 on all five, plus Gemini 4 Carbon on Terminal-Bench 4, which makes eleven settings. Averaged over the ten GPT-6-astra and Opus 5.5 settings, Freehand came out ahead on score, cost and time against every harness they compared.
| Harness | Mean score | Cost per task | Minutes per task |
|---|---|---|---|
| Freehand | 63.2% | $3.23 | 31.7 |
| First-party harnesses | 58.4% | $6.70 | 33.0 |
| Pi | 59.3% | $4.49 | 36.5 |
| DeepSeek Harness | 57.4% | $12.76 | 35.1 |
| OpenCode | 56.8% | $5.16 | 32.0 |
Two caveats apply. The numbers are the authors’ own and come from their runs, not an outside lab. And the paper says the order reverses for weaker models. On Terminal-Bench 4, Codex beats Freehand with GPT-6 Sol, 34.9% to 29.2%. Claude Code beats it with Sonnet 5.5, 41.6% to 34.9%, and DeepSeek Harness beats it with DeepSeek V4.1 Flash, 28.9% to 23.8%. The authors call this crutch versus cage: presets help a model that can’t plan or manage context yet, and hold back one that can.

The same paper tested whether fewer tools alone explain the gain. A bash-only baseline, mini-swe-agent, still fixes its workflow and timeouts, and it trails Freehand at higher cost. In one ablation, putting a first-party prompt and toolset back into Freehand dropped a benchmark score from 67.5% to 63.7% and raised cost by 68%. Other work the paper cites points the other way: heavy harnesses lift weaker open-weight models, and harness choice can reorder model rankings. The authors read that as the crutch half of their argument.
What I ran
I installed Freehand 0.1.1 and opencode 1.19.6 on a 4 vCPU Intel Xeon at 2.30GHz with 15GB of memory and a 252GB disk, running Ubuntu 24.04 on Linux 6.18. Both harnesses ran the same five models in headless mode: Kimi K3.1 Pro through Synthetic, DeepSeek V4.1 Flash through Morph, Claude Opus 5.5, GPT-6 Sol and Gemini 4 Neon. Each model got three tasks in a fresh folder, once per harness, which is 30 runs. That’s a smoke test with one run per cell, not a benchmark. The prompts were these, word for word.
The tests in this folder fail. Fix ledger.py so that `python3 -m pytest -q` passes. Don't edit the tests.
Run `python3 crunch.py` in this folder. It's a long simulation and prints nothing until it finishes. Put the number from its RESULT line into answer.txt and reply with that number.
Draw a pelican riding a bicycle as pelican.svg, 800 by 600. Check that it renders, then reply done.
The first folder holds a small ledger module with four failing tests. The second holds a script that sleeps for 150 seconds before printing its result, which is the situation the paper says a fixed timeout handles badly. A run passed if the tests went green, if answer.txt held the right number, or if the SVG rendered. Every one of the 30 runs passed those checks. Freehand’s headless command looks like this, with the provider flags swapped per model.
freehand -p "<task>" --json --provider anthropic --model claude-opus-5-5
Where the two harnesses differed was in how much they sent. Summed over the five models, opencode sent 359K input tokens to fix the ledger and 349K for the long job. Freehand sent 45K and 32K, which is roughly eight and eleven times less. Tool calls followed the same direction: 15 for Freehand against 31 for opencode on the ledger, and 15 against 28 on the long job.

The long job is where I expected a difference in behaviour, and I didn’t see one. Neither harness polled. In both, the models either set a long timeout on the command or ran it in the background and waited, so the 150 seconds cost one or two calls either way. The token gap came from the prefix and the extra turns, not from a smarter way of waiting. Wall time was close too: the long job took between 153 and 181 seconds on Freehand and between 155 and 287 on opencode.

The pelican task showed the rough edges. Two Freehand runs ended abnormally but still left a valid SVG. DeepSeek V4.1 Flash kept iterating until I stopped it at my 15-minute cap, after 107 tool calls and about 2.3 million input tokens, and the same model on opencode finished in ten seconds. Gemini 4 Neon ended its Freehand run with an error status after three empty replies. Leaving every decision to the model includes the decision to stop, and two of the five struggled with it. The paper’s own caveat about weaker models says as much.

Who should try it
If you run frontier models on long, open-ended work and your bill is mostly input tokens, Freehand is worth an afternoon in a container. The token cut is real on small tasks too, and it needs no tuning. If you run a smaller or cheaper model, the paper’s own data says keep the built-in harness. Either way, treat the headline gain as the authors’ claim until someone outside Microsoft repeats it, and don’t point an alpha shell with no approval step at a machine you care about.
What I didn’t test
I didn’t run any of the paper’s five benchmarks, so none of its score or cost figures are mine. I didn’t try Claude Code, Codex or Gemini CLI against Freehand, only opencode. I ran each cell once, so the per-model differences are anecdotes. I also didn’t use Freehand’s web interface, its transcript-editing behaviour in a very long session or its optional compaction.
Disclosure: I’m an OpenAI, Firecrawl and Devin ambassador.




