A stripped-down agent harness from Microsoft Research outscored each major AI lab's own coding tool in all 11 test settings its authors ran, according to a paper posted to arXiv this month. The setup, called Freehand, scored 5.1 percentage points higher on average than first-party harnesses such as Codex and Claude Code, at 49% lower cost per task, the paper says.
A harness is the software loop around a language model, as the paper defines it. It sends the model context, runs the actions the model picks and feeds back the results. The paper, led by Zezi Zeng and Chong Luo, argues that today's harnesses make too many of those choices for the model.
What Freehand leaves out
Mainstream tools have grown heavy, the authors wrote. Codex pairs a multi-thousand-word behavioral specification with more than 20 callable entry points, they say, while Claude Code bundles more than 20 tools with recurring runtime reminders.
Freehand gives the model a runtime description of about 200 words, a single bash tool and control over its own memory, according to Microsoft's GitHub README. After every turn, the model also sees a meter showing context size, tokens, cost and elapsed time, the README says. The model sets its own command timeouts and decides what to prune from its history.
The authors tie the idea to the Bitter Lesson, an essay arguing that knowledge built into AI systems helps at first and is later outgrown by general methods. "For weaker models these presets are a crutch; for frontier models they become a cage," the paper says.
The numbers
The team tested GPT-6-astra and Claude Opus 5.5 on five benchmarks, plus Gemini 4 Carbon on Terminal-Bench 4, according to the paper. The benchmarks cover terminal work, scientific computing, research tasks, desktop computer use and enterprise workflows.
The widest gap came on OSWorld 2.1, a test of operating a Linux desktop. With GPT-6-astra, Freehand scored 76.2% at $3.96 per task, against 68.3% at $14.94 for Codex, according to the README. Averaged across settings, Freehand cost $3.73 per task against $7.34 for the first-party harnesses.
In a side-by-side rerun on the same machines and API endpoints, each rival harness took 17% to 62% longer, the paper says. Freehand also beat four third-party harnesses, including OpenCode and Pi, according to the authors.
Why fixed rules cost money
The paper traces much of the waste to presets. On one Terminal-Bench 4 task, mini-swe-agent, a minimal bash-only harness with a 30-second command timeout, polled 334 times across 403 calls and spent $70.77. Freehand set its own timeout, waited up to 24 minutes in a single call and finished in 42 calls for $2.28, the paper says.
The authors also found that swapping Codex's system prompt into Freehand alone triggered false refusals of a harmless task.
The limits
The advantage reversed with smaller models. On Terminal-Bench 4, Codex scored 34.9% with GPT-6 Sol against Freehand's 29.2%, and Claude Code scored 41.6% with Claude Sonnet 5.5 against 34.9%, according to the README. Microsoft tells users to run Freehand with a frontier model.
The results are the authors' own and haven't been independently reproduced. The paper notes that usage logs for some baseline runs were incomplete, which it says makes those cost figures a lower bound.
Freehand also has no sandbox and no approval prompt. The README says the model's commands run with the user's own permissions, and it advises using a container or virtual machine for untrusted code.
Microsoft released the code under the MIT license, and it installs from PyPI as freehand-ai, according to the repository. It had about 3,000 GitHub stars on Dec. 6.
Source: arXiv, Zeng et al., Microsoft Research, “Freehand: The Bitter Lesson Comes to Agent Harnesses”
Additional sources: GitHub, Microsoft, “Freehand repository and README”
