Newshot

MSRA Open-Sources New Agent Framework, Beating the Official Harnesses of Three Major Vendors with a Single bash

AI summary

Agent frameworks also have bitter lessons to learn.

Translation(model translation, not the source's own text)

MSRA Open-Sources a New Agent Framework: One bash Beats All Three Official Harnesses

Agent frameworks also have bitter lessons

henry reporting from Non-House 凹 | Quantum位 | WeChat公众号 QbitAI

Tear down the entire carefully designed Agent scaffold and leave only one bash terminal—and it actually outperforms the native frameworks from OpenAI, Anthropic, and Google!

Recently, a research team from Microsoft Research Asia (MSRA), together with Xi'an Jiaotong University, Zhejiang University, and Fudan University, released an open-source Agent Harness—

In Freehand, the team removed the system prompt rules that ran to thousands of words, the dozens of preset specialized tools, and the fixed-threshold automatic context compression.

What replaced them: about 200 words of operating instructions for the large model, a single bash tool with a self-settable timeout, a local memory file the model can edit on its own, and a resource dashboard that shows cost in real time in one line per turn.

In a comprehensive evaluation spanning 5 major domain benchmarks and 3 frontier models (GPT-6-astra, Claude Opus 5.5, Gemini 4 Carbon), Freehand not only scored 5.1% higher on average than the official harnesses (Codex, Claude Code, Gemini CLI), but also cut the average cost per task by 49%, and in same-machine synchronized re-tests it achieved the fastest average speed.

The project is now open-sourced on GitHub (under the MIT license) and officially released on PyPI—those interested can try it out!

Freehand: When "The Bitter Lesson" Collides with Agent Scaffolds

Echoing RL pioneer Sutton's judgment in "The Bitter Lesson" that "hand-crafted rules will eventually be surpassed by general methods," the Freehand team points out that current Agent frameworks are almost all doing addition: system prompts grow longer and longer, specialized tools get wrapped in greater numbers, and when context fills up, yet another layer of external compression logic is bolted on.

In short, everyone is desperately stuffing various human priors into the scaffold.

And to figure out just how much human prior is mixed into today's Agent scaffolds, the research team audited mainstream frameworks—Codex CLI, Claude Code, Gemini CLI, DeepSeek Harness, OpenCode, Pi—through source-code review and API traffic capture.

The result: even before the model sees a specific task, the major frameworks typically presuppose three things in advance:

  • Policy guidance: hard-coding workflows into system prompts of thousands of words. For example, Gemini CLI rigidly specifies a "research → strategy → execution" lifecycle; Codex uses about 3.3K words to mandate rg-first retrieval and parallel reads; Claude Code enforces "read before edit" and repeatedly injects <system-reminder> during runs.
  • Execution interface: splitting operations that could be solved in a terminal into a dozen or even thirty-plus specialized tools, with hard-coded timeouts and polling intervals.
  • Memory management: conversation history only grows and never shrinks; the model has no autonomous right to delete or modify it, and can only wait for context to hit the hard 80% or 90% threshold, at which point the external framework bluntly truncates it or forces summarization.

The research argues that, for early models with weaker capabilities, these nanny-style presets did indeed block infinite loops and low-level mistakes.

But for today's frontier models that are already intelligent enough, these hard-coded rules become constraints and shackles when facing specific error messages and test feedback, and every turn of interaction wastes a large amount of static tokens.

So Freehand adopted a minimalist design: give the model a shell, its own memory, and a dashboard, and leave the rest to the model.

On the model-facing side of Freehand, the initial static prefix is cut to only about 0.35K tokens, and the core design contains four components:

1. An objective, descriptive prompt of about 200 words

The system prompt only objectively explains how the loop operates, what tools exist, how to modify the memory file, and what the numbers in the status bar mean—it does not specify a concrete workflow, nor insert extra reminders during the run.

2. A bash interface with a self-settable timeout

Only one interface is exposed: bash(command, timeout_s?), with the timeout parameter specified by the model itself (default 120 seconds, selectable from 1 to 86,400 seconds). For long-running tasks, the model can wait it out in one go or move it to the background; when a specific parser or batch script is needed, the model can write it on the spot.

3. A native memory file the model edits fully autonomously

After each turn, Freehand writes the current full conversation into transcript.json in native API message format. In subsequent bash executions, the model can use scripts to directly modify that file to clean logs or compress history. When it needs to view screenshots, it can also insert images directly into that file as native image blocks—no separate visual tool entry point needed.

4. A one-line-per-turn resource dashboard (Meter)

At the end of each turn, the framework appends a line of status data:

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

It objectively shows the bill, turn count, context size, and elapsed time, for the model to reference during long tasks and judge for itself whether to clean up context.

On the user-interaction side, Freehand supports streaming Markdown in the terminal, interruption, session resumption, per-turn rollback, and provider switching, and offers a browser UI and desktop client.

It is worth noting, however, that Freehand currently has no built-in sandbox and no execution-approval popup; commands run with local user privileges, so those who want to try it had best do isolated testing in a container or virtual machine.

Evaluation and Experimental Conclusions

In the experimental phase, to verify the correctness of this approach, the team ran evaluations in isolated Docker containers and QEMU/KVM virtual machines on Terminal-Bench 4 (terminal manipulation tasks), Terminal-Bench Science (frontier scientific computing), Agents' Last Exam/ALE (high-difficulty knowledge work), OSWorld 2.1 (Ubuntu desktop GUI system-level computer control), and AutomationBench (end-to-end complex workflow automation).

The models covered were GPT-6-astra, Claude Opus 5.5, and Gemini 4 Carbon, pitted against each vendor's official native harness as well as third-party frameworks such as OpenCode, Pi, and DeepSeek Harness.

Specifically, the team drew the following three main conclusions from the experiments:

First, in frontier-model evaluations, Freehand beats the official harnesses on both score and cost.

In a comprehensive comparison covering 11 frontier-model dimensions, Freehand gained an average of +5.1%, and the average cost per task nearly halved from 7.34 to 3.73 (a 49.2% plunge)!

Moreover, in a 5-way synchronized re-test on the same machine and same network endpoint, Freehand took only 6.25 minutes per problem on average, running 17% to 62% faster than the other competing frameworks.

Ablation experiments further confirmed: the key to the performance gain lies in removing the hard-coded workflow prompts and the elaborate specialized interfaces.

And the reason it saves enormous token expense in long-horizon interactions is precisely that the model can, according to its true intent, actively read, write, and trim transcript.json.

Second, once switched back to mid- and low-tier models, the official native harnesses regain the advantage.

The team then ran a reverse validation on same-family mid- and low-tier models on Terminal-Bench 4:

Mid/low-tier modelFirst-party official harness scoreFreehand scoreDifference (Freehand − first-party)
GPT-6 Sol (Codex)34.9%29.2%-5.7 pp
Claude Sonnet 5.5 (Claude Code)41.6%34.9%-6.7 pp
DeepSeek V4.1 Flash (DeepSeek Harness)28.9%23.8%-5.1 pp

The results show that preset rules still have a clear assisting effect on weaker models, while on frontier models they may constitute a constraint.

Finally, at the end of the paper, the team will further investigate the critical capability boundary at which the "crutch" and the "cage" reverse, explore model post-training methods specifically aimed at minimalist base interfaces, and extend similar principles to multi-agent collaboration.

Author Team

Finally, let's briefly introduce the research team behind freehand.

The project is led by Microsoft Research Asia (MSRA), jointly completed with researchers from Xi'an Jiaotong University, Zhejiang University, and Fudan University:

  • Zezi Zeng: co-first author, student at Xi'an Jiaotong University, intern at Microsoft Research Asia.
  • Yuke Zhao: co-first author, master's student at Zhejiang University ZIP Lab (advisor Bohan Zhuang), intern at Microsoft Research Asia.
  • Muzhao Tian: master's student at the School of Computer Science, Fudan University, intern at Microsoft Research Asia.
  • Yifan Yang: co-corresponding author, senior researcher at Microsoft Research Asia, holds a bachelor's degree from Tongji University and a master's degree from Peking University; research interests include self-evolving AI systems, general agents, and foundation model post-training.

Article title: MSRA's new open-source Agent framework: a single bash script outperforms the official Harnesses of the top three vendors

Main text:

  • Qi Dai: Principal Researcher at Microsoft Research Asia, received a bachelor's degree from East China University of Science and Technology and a PhD from Fudan University. Research interests include computer vision, video understanding and generation, and multimodal learning.
  • Bei Liu: Senior Researcher at Microsoft Research Asia, received a bachelor's degree from Nanjing University and a master's and PhD from Kyoto University. Research interests include multimodal learning, embodied intelligence, human-computer interaction, and agents.
  • Kai Qiu: Senior Researcher at Microsoft Research Asia, received a master's degree from the University of Chinese Academy of Sciences. Research interests include computer vision, video understanding and generation, post-training of multimodal large models, and agents.
  • Bohan Zhuang: Hundred Talents Program Researcher and doctoral supervisor at the College of Computer Science and Technology, Zhejiang University, formerly an assistant professor at Monash University. Research interests include efficient AI, algorithm-system co-design, and multimodal large models.
  • Jihua Zhu: Co-corresponding author, Professor and doctoral supervisor at the School of Software, Xi'an Jiaotong University, received a PhD from Xi'an Jiaotong University. Research interests include computer vision and machine learning.
  • Chong Luo: Research Science General Manager at Microsoft Research Asia and Head of the Shanghai Lab, IEEE Senior Member, received a bachelor's degree from Fudan University, a master's degree from the National University of Singapore, and a PhD from Shanghai Jiao Tong University. Research interests include multimodal AI, image and video understanding and generation, large models, and agents.

It is worth mentioning that Freehand is one of the projects in Microsoft Research Asia's AgentOpt series. The team has previously open-sourced related work including SkillLens, SkillOpt, Resource2Skill, EnvOpt, and EvalOpt, continuously exploring optimization solutions for various components of agent systems.

Reference links: [1] Paper address: https://arxiv.org/abs/2612.02442 [2] GitHub open-source repository: https://github.com/microsoft/FreeHand [3] Project homepage: https://microsoft.github.io/FreeHand/

  • Just now, Musk's AI used "FSD" to livestream playing Diablo 4, turning autonomous driving into autonomous playing! 2026-12-02
  • Musk watched "Claude breaches RSA", and there was a twist 2026-11-30
  • 20 billion USD… the most expensive AI self-media in history 2026-11-28
  • Google's Tibo personally teaches the internal way to open Gemini 4 Neon! Step one: delete all old rules 2026-11-28

The translation is machine-generated and individual terms may be off. Nothing is rewritten or cut; the original is authoritative.

Published by 量子位
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗