Freehand review: should your agent harness decide less?

A new paper gives frontier models one shell, their own memory and a cost meter, and beats Codex, Claude Code and Gemini CLI. With weaker models, it loses.

A hand sketching an abstract geometric drawing in pencil on paper (Photo: Ron Lach / Pexels)
A hand sketching an abstract geometric drawing in pencil on paper (Photo: Ron Lach / Pexels)

The short answer

Freehand, a Microsoft Research-led harness that gives a frontier model only bash, an editable transcript and a cost meter, beat each model's first-party harness in all 11 test settings by 5.1 points on average at 49% lower cost. With weaker models, the first-party harnesses won by 5 to 7 points.

Key takeaways

  • Freehand's model sees a ~200-word prompt, one bash tool with model-set timeouts, its own history as an editable file, and a per-turn cost and time meter.
  • Across 11 settings it beat the first-party harness every time: +5.1 points on average at 49% lower cost per task ($3.73 vs $7.34).
  • Ablations blame prescriptive prompts and specialised tools for most of the loss; self-managed memory mainly cuts cost.
  • With lower-tier models on Terminal-Bench 4, first-party harnesses beat Freehand by 5.1 to 6.7 points, so how much harness you need depends on the model.
  • A companion paper finds best-of-N sampling beats iterative feedback on hard coding problems at the same budget, if you can pick the winner.
  • Doubts: authors evaluated their own system, Gemini appears in one setting, benchmarks have no human in the loop, and the repo ships without a sandbox.

A hand sketching an abstract geometric drawing in pencil on paper

No ruler, no template, just a pencil and judgement. Photo: Ron Lach / Pexels

Most agent harnesses get heavier with every release: more tools, more rules, more reminders. A new preprint from Microsoft Research and three Chinese universities, Freehand, goes the other way. It gives a frontier model a roughly 200-word description of its runtime, one bash tool, its own conversation history as an editable file, and a running cost meter. Then it gets out of the way.

The headline: across 11 model-and-benchmark settings, Freehand beat each model’s own first-party harness (Codex, Claude Code or Gemini CLI) every time, by 5.1 points on average at 49% lower cost per task. The more interesting result is the one most summaries skip. With weaker models, the first-party harnesses won.

Here’s what the paper actually shows, what to take into your own agent, what to doubt, and why a second paper from the same week, on feedback loops, points the same way.

What Freehand actually is

The authors (Zeng, Zhao, Tian et al., posted 1 December 2026) start from a simple framing. Every turn of an agent loop answers three questions:

  • Strategy: what to do next.
  • Execution: how to act, and how long to wait.
  • Memory: what to carry into the next turn.

Mainstream harnesses answer all three before the model sees the task. The paper’s audit (Table 1) puts numbers on it:

Harness Static prefix (tokens) Default tools Context management
Codex CLI ~15.1K 23 Auto-summary at 90% of window
Gemini CLI ~9.5K 16 Threshold compression + output masking
Claude Code ~8.5K 22 Auto-summary + output clearing
DeepSeek Harness ~6.5K 34 Output pruning + 80% auto-summary
OpenCode ~5.2K 10 Overflow summary + recent tail
Pi ~1.2K 4 Auto-summary near window limit
Freehand ~0.35K 1 (bash) The model edits its own history

Freehand hands all three decisions back, along with the means to act on each:

  1. A shell with model-set timeouts. The only tool is bash(command, timeout_s?). The model picks how long each command may run, so it can wait 20 minutes for a training job instead of polling it every 30 seconds.
  2. Memory as a file. The live conversation sits in transcript.json, in the provider’s native message format. The model can prune stale logs, condense finished subtasks or checkpoint to disk with the same shell. Because the format is native, it can even paste a cropped screenshot into its own context to look at it, which gives it vision without a vision tool.
  3. A meter instead of rules. After every turn, a one-line footer reports the turn number, context size, cumulative tokens and cost, and elapsed time. It tells the model where it stands, never what to do about it.

The prompt’s key line is blunt: “Nothing else is decided for you.” The code is public under an MIT licence at github.com/microsoft/FreeHand, with a project page.

The results, checked against the tables

Testing covered GPT-6-astra and Claude Opus 5.5 on five benchmarks (Terminal-Bench 4, Terminal-Bench Science, Agents’ Last Exam, OSWorld 2.1 and AutomationBench), plus Gemini 4 Carbon on Terminal-Bench 4 only. That’s 11 settings, all at high reasoning effort, over 191 evaluation rounds.

The headline claims hold up against the paper’s own tables:

  • +5.1 points on average over the first-party harness (95% confidence interval: +3.3 to +7.0), winning on score and cost in all 11 settings.
  • 49% lower mean cost per task: $3.73 against $7.34, with per-setting savings from 30% to 74%.
  • Fastest on average, at 31.7 normalised minutes per task across the ten GPT and Claude settings. In a controlled rerun on the same machines and API endpoints, the other harnesses took 17–62% longer.

Some per-setting numbers are striking. On OSWorld 2.1, a desktop GUI benchmark, Freehand with GPT-6-astra scored 76.2% at $3.96 a task, against Codex’s 68.3% at $14.94. And it did that with no GUI tools at all: the model scripted mouse and keyboard input itself and checked cropped screenshots.

Others are modest. On Terminal-Bench 4 with GPT-6-astra, the gap over Codex is 2.5 points (57.1% vs 54.6%). Against whichever baseline scored best in each setting, not just the first-party one, Freehand’s lead shrinks to 2.7 points (CI +0.9 to +4.5). That’s still a real, statistically significant gap at 38.6% lower cost. It just isn’t a blowout.

A correction to the common summary: “it beats Codex, Claude Code and Gemini CLI in all 11 settings” isn’t quite what happened. Each setting compares Freehand with one first-party harness, the one built for that model. Codex and Claude Code each appear in five settings. Gemini CLI appears in one.

Where the gains come from

This is the most useful part of the paper for builders. The authors ran controlled ablations inside the same Freehand loop with GPT-6-astra:

  • Restore Codex’s system prompt and tools, keep everything else. Accuracy fell 3.8 points on Agents’ Last Exam at 68% higher cost, and 2.5 points on Terminal-Bench 4 at 53% higher cost. The prescriptive prompt and specialised tools were the main drag.
  • Swap self-managed memory for 90% auto-compaction. Accuracy was statistically unchanged, but cost rose 19% and 7%. So the editable transcript is mostly a cost lever, not a score lever.
  • Give the model only bash but keep a fixed workflow and a 30-second timeout. mini-swe-agent does exactly this. It trailed Freehand by 3.5 points at 35% higher cost. Its hardcoded timeout interrupted 38 of 63 Terminal-Bench 4 tasks.

That last one kills the lazy reading that “fewer tools = better”. What matters is who decides. One trajectory makes it concrete. On a Terminal-Bench optimisation task, mini-swe-agent’s 30-second cutoff turned a single long wait into 334 polling calls costing $70.77. Freehand set its own timeout, waited 24 minutes in one call, and finished the round for $2.28.

Two other case studies are worth knowing about:

  • A prompt that causes refusals. On a benign protein-docking task, Codex refused on turn one in 3 of 3 rounds. Keeping Freehand’s loop and swapping in only Codex’s system prompt triggered refusals in 10 of 10 runs, even though that prompt has no biosecurity clauses. Heavy prompts change behaviour in ways nobody designed.
  • Tool wrappers that bloat context. OpenCode’s read tool loaded a full 78-page financial filing into context, and every later call paid for it again: 9.09M input tokens, $13.09. Freehand ran pdftotext and grepped out the statements it needed, scoring the same (0.915 vs 0.914) for $2.66.

The crutch-to-cage result: the part to remember

The authors’ thesis borrows from Rich Sutton’s essay “The Bitter Lesson”: knowledge you build in helps at first, then gets outgrown. They tested it directly on Terminal-Bench 4 with lower-tier models, and the brief’s third claim holds. First-party harnesses beat Freehand on all three:

Model First-party harness Freehand Gap
GPT-6 Sol Codex 34.9% 29.2% Harness +5.7
Claude Sonnet 5.5 Claude Code 41.6% 34.9% Harness +6.7
DeepSeek V4.1 Flash DeepSeek Harness 28.9% 23.8% Harness +5.1

The same DeepSeek Harness that helps its Flash model by 5.1 points trails Freehand by 6.0 and 4.4 points on the two frontier models. That’s good evidence the reversal is about the model, not a badly built harness.

So the practical lesson isn’t “delete your harness”. It’s that the right amount of harness depends on the model behind it, and that amount is shrinking at the top end. The authors admit they haven’t mapped where the crossover sits.

What to doubt

I like this paper. It’s also a preprint written by the people who built the winning system, so read it with the usual squint.

  • Home-team advantage. The authors designed Freehand and ran the evaluation. All harnesses ran in identical containers with official verifiers, and the stats are thorough (permutation tests, bootstraps, leave-one-benchmark-out). But nothing replaces an independent rerun.
  • The benchmarks have no human in them. Codex, Claude Code and Gemini CLI are products built for interactive use, with approval prompts, safe defaults and conventions that keep a human in the loop. Many of their “presets” exist for those humans, not for benchmark scores. Freehand optimises for fully autonomous runs in a sandbox. That’s a valid goal, but a different one.
  • “Three model families” is thin on one side. Gemini appears in a single setting. Most of the evidence is GPT-6-astra and Claude Opus 5.5.
  • The weak-model reversal rests on one benchmark. The lower-tier test ran only on Terminal-Bench 4.
  • Cost accounting isn’t perfectly symmetric. Some baseline runs had incomplete usage logs, notably Gemini CLI on Terminal-Bench 4 and some Codex and Claude Code trials on Agents’ Last Exam. The authors argue this can only understate baseline cost, which is fair. Costs are at list prices, not what you’d pay on a negotiated plan.
  • Not faster everywhere. On Terminal-Bench Science with GPT-6-astra, Freehand averaged 58.9 minutes a task against Codex’s 35.3. It’s fastest on average, not in every setting.
  • Safety moves out of the prompt, and it has to land somewhere. The repo’s README says plainly that the project is alpha and has no sandbox: commands run with your permissions and nothing asks first. The paper ran everything in isolated containers with scoped credentials, and recommends exactly that. My take: an agent that can rewrite its own transcript also needs an untouched copy of the log kept outside its reach if you care about auditing what happened.

The companion paper: when does feedback help?

Published the same day, When Does Feedback Help? (Banayeeanzade et al., Capital One and University of Southern California) tests a different assumption baked into most harnesses: that a loop of “try, read the feedback, revise” makes an agent better.

The setup is controlled. There are 40 competitive-programming problems from LiveCodeBench-Pro (15 easy, 15 medium, 10 hard), gpt-oss-120b as the main model, other small and open models in the appendix, and a budget of 10 model calls for every method. It compares six feedback types against plain best-of-N sampling:

  • Medium problems: ground-truth hints from the official editorials helped most, lifting the pass rate from 52.9% to 93.3% (+40.4). Failures on LLM-generated tests came next (+24.1).
  • Hard problems: even the ground-truth hints added just 5.3 points. LLM-generated test failures were the best feedback (+20.4). But best-of-N parallel sampling beat every iterative feedback method at the same budget.
  • The mechanism: refinement gains tracked the gap between the first attempt and the best of the parallel samples. The authors call this an “illusion of sequential refinement”. On hard problems, the loop mostly recovers from a bad first draft. It approaches, but doesn’t surpass, what the model could already produce by sampling independently.

Caveats matter here too. Ten hard problems is a small set. These are mid-sized open models on single-file competition code, not frontier agents working in real repositories. And best-of-N gets credit for its highest-scoring candidate on the test suite, which assumes you have a reliable way to pick the winner. An appendix gives refinement the same oracle pick of its best round, and the conclusion holds, but in production that selector is your verifier, and you have to build it.

Why these two belong together

Both papers poke at a habit: encoding our guesses about how a model should work into the loop. Freehand questions prescribed workflows, tools, timeouts and memory rules. The feedback paper questions the assumption that more refinement rounds mean progress on hard problems.

Neither says harnesses don’t matter. Our earlier piece on harness engineering argued you should give an agent a workshop, not just a prompt, and that still holds. Freehand keeps the workshop’s walls (sandboxing, permissions, total budgets) and its instruments (the meter). What it fires is the foreman who tells a skilled worker which screwdriver to use.

What to take into your own agent this week

  1. Measure your static prefix. Add up the tokens in your system prompt and tool schemas. If it’s 10K+ tokens on every call, you’re paying for it on every turn, and the paper suggests it may also cost you accuracy on frontier models.
  2. Hunt for polling loops. Fixed command timeouts and “check again” reminders are where the paper found the ugliest cost blowups. Let the model set a timeout, or at least cap polling.
  3. Put a meter in the loop. Showing tokens, cost and elapsed time each turn is cheap, and it’s the piece that lets a capable model budget for itself. It pairs well with the cost tactics in our guide to cutting your LLM bill.
  4. A/B your rules on your own model. Strip the prescriptive parts of your prompt and run your own eval set. If you’re on a smaller or cheaper model, expect your scaffolding to earn its keep. If you’re on a frontier model, it may not.
  5. On hard tasks, try going wide before going deep. Before adding a fifth critique round, test N independent attempts plus a verifier at the same budget. If you lack a verifier, LLM-written test cases were the most useful feedback signal on hard problems in the second paper.
  6. Keep the boundaries hard. Fewer rules in the prompt means the container, permissions and spending caps do all the safety work. Don’t run a bash-only agent on your laptop with your credentials.

The verdict

Freehand is the most persuasive argument so far that frontier models are being slowed down by harness rules written for older models. The cost results, the ablations and the weak-model reversal hang together, and the code is out for anyone to check. Treat the headline as “worth testing on your own workload”, not “proven everywhere”. It’s one team’s harness on one team’s eval runs, fully autonomous, mostly on two models. The durable lesson is smaller and more useful: every rule in your harness is a bet about your model’s weaknesses. Bets go stale. Re-run them each time you upgrade the model.

Frequently asked questions

What is the Freehand agent harness?

Freehand is an open-source (MIT) agent harness from a team at Microsoft Research, Xi'an Jiaotong, Zhejiang and Fudan universities, described in arXiv 2612.02442. It exposes a single bash tool, lets the model edit its own conversation history in transcript.json, and reports tokens, cost and elapsed time after every turn, with no workflow rules.

Does Freehand beat Claude Code and Codex?

In the paper's tests with GPT-6-astra and Claude Opus 5.5, yes: it scored higher and cost less than Codex and Claude Code in every setting it ran. Each setting compared it with one first-party harness, and Gemini CLI was tested in only one setting. No independent replication exists yet.

Should I use Freehand with a smaller model?

The paper suggests not. On Terminal-Bench 4 with GPT-6 Sol, Claude Sonnet 5.5 and DeepSeek V4.1 Flash, each model's own harness beat Freehand by 5.1 to 6.7 points. The README also recommends using it with frontier models.

Is Freehand safe to run on my own machine?

Not without isolation. The project's README calls it alpha and states it has no sandbox, so commands run with your permissions and nothing asks for approval. Run it inside a container or VM with scoped credentials, as the authors did.

Is best-of-N better than iterative refinement for coding agents?

On hard competitive-programming problems in arXiv 2612.02313, best-of-N parallel sampling beat every feedback-based refinement method at a 10-call budget. On easy and medium problems, feedback such as ground-truth hints did better. Best-of-N also needs a reliable way to choose the best attempt.

Sources

  1. Freehand: The Bitter Lesson Comes to Agent Harnesses (arXiv 2612.02442) arXiv
  2. Freehand paper PDF (v1) arXiv
  3. microsoft/FreeHand repository and README GitHub / Microsoft
  4. Freehand project page Microsoft
  5. When Does Feedback Help? Evaluating Feedback for Iterative Refinement in Coding Agents (arXiv 2612.02313) arXiv
  6. When Does Feedback Help? paper PDF (v1) arXiv

Found this useful?

Clap (up to 50×) so more people find it.

Written by

Noaman

Writer & Editor

Markdown version