Newsroom Wire

US12-06 12:13⏱ 6 min read

MSRA open-sources FreeHand, an agent framework that beats OpenAI, Anthropic and Google's official harnesses with one bash tool

Researchers from Microsoft Research Asia (MSRA), Xi'an Jiaotong University, Zhejiang University and Fudan University have open-sourced FreeHand, a minimalist agent harness that swaps multi-thousand-word system prompts and dozens of preset tools for about 200 words of instructions, one bash tool with a model-set timeout, an editable memory file and a live cost dashboard. Across five benchmark domains and three frontier models (GPT-6-astra, Claude Opus 5.5, Gemini 4 Carbon), FreeHand averaged +5.1% higher scores than the official harnesses (Codex, Claude Code, Gemini CLI), cut average per-task cost from 7.34 to 3.73 (down 49.2%) and ran fastest in same-machine retests. The team's ablations tie the gains to removing hard-coded workflow prompts and specialized interfaces, while preset rules still help weaker models. FreeHand is on GitHub under the MIT license and available on PyPI.

Tear out the carefully engineered agent scaffolding, leave only a bash terminal, and the result can outperform the native frameworks from OpenAI, Anthropic and Google.

A research team from Microsoft Research Asia (MSRA), working with researchers from Xi'an Jiaotong University, Zhejiang University and Fudan University, recently released an open-source agent harness: FreeHand.

In FreeHand, the team removed the system-prompt rulebooks that often run to thousands of words, the dozens of preset specialized tools, and the automatic context compression with fixed thresholds.

In their place, the model gets roughly 200 words of operating instructions, a bash tool whose timeout it sets itself, a local memory file it can edit on its own, and a resource dashboard that prints one line of live spend per turn.

In an evaluation spanning five benchmark domains and three frontier models (GPT-6-astra, Claude Opus 5.5 and Gemini 4 Carbon), FreeHand scored on average 5.1% higher than the vendors' official harnesses (Codex, Claude Code and Gemini CLI), cut average per-task cost by 49%, and posted the fastest average speed in same-machine, simultaneous retests.

The project is now open-sourced on GitHub under the MIT license and live on PyPI, ready to try.

The approach echoes the judgment of Richard Sutton, the father of reinforcement learning, in "The Bitter Lesson" that hand-crafted rules will eventually be surpassed by general methods, and the FreeHand team argues that today's agent frameworks are almost all doing addition: system prompts keep piling up longer, specialized tools keep getting bundled in, and when the context fills up, another layer of external compression logic is wrapped on top.

To measure how much hand-crafted prior is mixed into today's agent scaffolding, the team audited mainstream frameworks including Codex CLI, Claude Code, Gemini CLI, DeepSeek Harness, OpenCode and Pi, using source-code review and API packet captures.

The audit found that, before the model even sees a specific task, the major frameworks have typically already preset three things:

The researchers argue that for early, weaker models, these nanny-grade presets did a real job of blocking infinite loops and basic mistakes.

But for frontier models that are now smart enough, these hard-coded rules become restrictions and shackles when facing concrete error messages and test feedback, and every turn burns a large amount of static tokens for nothing.

FreeHand therefore takes a minimalist design: give the model a shell, a memory of its own and a dashboard, and leave the rest to the model.

On the model-facing side, FreeHand's initial static prefix is cut to only about 0.35K tokens, and the core design has four components:

The system prompt only objectively explains how the loop works, which tools exist, how to modify the memory file, and what each number in the status bar means. It prescribes no specific workflow and injects no extra reminders mid-run.

Only one interface is exposed, bash(command, timeout_s?), with the model choosing its own timeout (default 120 seconds, selectable from 1 to 86,400 seconds). For long-running tasks, the model can wait for completion in a single call or move the job to the background; when it needs a specific parser or batch script, it can write one on the spot.

At the end of each turn, FreeHand writes the full conversation to transcript.json in the native API message format. In later bash calls, the model can modify that file with scripts to clean up logs or compress history. When it needs to view a screenshot, it can insert the image directly into the file as a native image block, with no separate vision-tool entry point.

[harness] turn <t> | context <c> tokens | total in <i> (cached <k>) out <o> | $<d> | <m> min elapsed

The dashboard objectively shows the bill, the turn count, the context size and elapsed time, so the model can reference them on long tasks and decide for itself whether to clean up the context.

On the user-facing side, FreeHand supports streaming Markdown in the terminal, interruption, session resume, per-turn recall, provider switching, plus a browser interface and a desktop client.

One caveat: FreeHand currently ships with no built-in sandbox or execution-approval dialogs, and commands run with local user privileges, so anyone trying it out is advised to test inside an isolated container or virtual machine.

To validate the idea, the team ran experiments in isolated Docker containers and QEMU/KVM virtual machines, evaluating on Terminal-Bench 4 (terminal operation tasks), Terminal-Bench Science (frontier scientific computing), Agents' Last Exam/ALE (high-difficulty knowledge work), OSWorld 2.1 (system-level computer control on Ubuntu desktop GUIs) and AutomationBench (end-to-end complex workflow automation).

The models covered GPT-6-astra, Claude Opus 5.5 and Gemini 4 Carbon, pitted against the vendors' official harnesses as well as third-party frameworks such as OpenCode, Pi and DeepSeek Harness.

First, on frontier models, FreeHand beat the official harnesses on both score and cost.

In the combined comparison covering 11 frontier-model groups, FreeHand's average score gain reached +5.1%, while average per-task cost fell from 7.34 to 3.73, nearly halved at a 49.2% drop.

In addition, in a five-way simultaneous retest on the same machine and network endpoint, FreeHand averaged just 6.25 minutes per task, running 17% to 62% faster than the rival frameworks.

Ablation experiments further confirmed that the key to the performance gains lies in shedding the hard-coded workflow prompts and the bulky specialized interfaces.

The huge token savings over long interactions come down to the model's ability to actively read, write and prune transcript.json according to its actual intent.

Second, once mid- and lower-tier models are swapped back in, the official vendor harnesses regain the advantage.

The team ran a reverse validation on Terminal-Bench 4 with mid- and lower-tier models from the same families:

The results showed that preset rules still clearly help weaker models, while on frontier models they can become a limitation.

Finally, the team writes that next steps include further probing the key capability boundary where the "crutch" and the "cage" reverse roles, developing model post-training methods designed specifically for minimal base interfaces, and extending similar principles to multi-agent collaboration.

The project was led by Microsoft Research Asia (MSRA), with researchers from Xi'an Jiaotong University, Zhejiang University and Fudan University.

Notably, FreeHand is part of MSRA's AgentOpt series of projects; the team has previously open-sourced related work including SkillLens, SkillOpt, Resource2Skill, EnvOpt and EvalOpt, continuing to explore optimization of the individual components of agent systems.

References: [1] Paper: https://arxiv.org/abs/2612.02442 [2] GitHub repository: https://github.com/microsoft/FreeHand [3] Project page: https://microsoft.github.io/FreeHand/

Snapshot for aggregated reading; content from the public web, © the original publishers.

AI NewsCove

Opening article…