Simpler agent software beats Codex and Claude Code at half the cost

A Microsoft Research-led preprint finds that frontier models do better when the software around them decides less: one shell, a self-edited memory file and a cost meter. With weaker models, the vendors' own harnesses still win.

6 min readIIIOpen sourcePreprint, not peer reviewed
Save
A studio still life with an overflowing wooden toolbox of brass tools on the left and an open blue pocket knife on the right.AI illustration
Illustration: AI generated

What the study shows

An AI agent has two parts: the model and the harness. The harness is the loop that feeds the model its context, runs the actions it asks for and returns the results. Popular harnesses such as OpenAI's Codex, Anthropic's Claude Code and Google's Gemini CLI wrap the model in long instruction sets, 16 to 23 built-in tools, fixed command timeouts and automatic summarising of old conversation once memory fills up.

The authors built a harness called Freehand that strips almost all of this away. The model gets a prompt of about 200 words that describes the setup but sets no workflow. It gets one tool, a bash shell (a command line), and sets its own timeout for each command. Its conversation history sits in an editable file, so it can delete or condense old material itself. After every turn, a one-line meter reports context size, tokens, cost and time used.

The team tested Freehand on five public benchmarks covering terminal work, scientific computing, research tasks, desktop software (OSWorld 2.1) and enterprise workflows. They used three frontier models: GPT-6-astra, Claude Opus 5.5 and Gemini 4 Carbon. The authors report that Freehand beat each model's own harness in every one of 11 model and benchmark pairings. On average it scored 5.1 percentage points higher and cost 49% less per task. It also beat three other open harnesses, OpenCode, Pi and DeepSeek Harness, on both score and cost.

The clearest single gain came on desktop tasks. With GPT-6-astra, Freehand scored about 76% against about 68% for Codex, at roughly a quarter of the cost. Freehand did this without the desktop-control tools the other harnesses were given. Instead the model wrote its own scripts and inserted cropped screenshots into its memory file to look at them.

The authors also tested weaker models from the same families on one terminal benchmark. Here the result flipped: the vendor harnesses beat Freehand by 5 to 7 points. The authors call this the move from crutch to cage. The paper is a preprint and has not been peer reviewed.

Our reading

In our reading, the most useful result is not the headline win but the reversal. The same vendor harness helps a weaker model and holds back a stronger one. That suggests harness design should be matched to model strength, rather than treated as a fixed best practice. The statistical test for this reversal is solid in the Claude family and borderline in the GPT-6 family, so the pattern is suggestive rather than settled.

The ablations, where one part is changed at a time, help explain where the gains come from. Putting Codex's prompt and tools back into Freehand lowered accuracy and raised cost by more than half. Swapping the self-managed memory for automatic summarising left accuracy about the same but raised cost. So the accuracy gains come mainly from dropping prescribed workflows and tools, and memory control mostly saves money on long tasks.

A concrete example shows the mechanism. On one long optimisation task, a harness with a fixed 30-second timeout made the model check on a running job 334 times, at about $71. When the model could set its own timeout, it waited once for 24 minutes and finished for about $2. A team running long data-processing or build jobs through an agent could see similar waste.

Free membership

Read the rest of this story

Membership is free. You get every article in full, and can save stories and follow topics.

We send a sign-in link, no password needed. Already a member? Sign in

Readiness assessment

III
Open source
LevelStatusEvidence
I  Lab onlyMetWorking harness built and evaluated in controlled container and virtual machine experiments, with ablations.
II  BenchmarkedMetResults reported on public benchmarks with official verifiers: Terminal-Bench 4, Terminal-Bench Science, Agents' Last Exam, OSWorld 2.1 and AutomationBench. Comparisons cover Codex, Claude Code, Gemini CLI, OpenCode, Pi, DeepSeek Harness and mini-swe-agent.
III  Open sourceMetThe paper lists a code repository at https://github.com/microsoft/FreeHand. We have not checked its contents or licence.
IV  In productionNot yetThe paper documents no use of Freehand by a named organisation in production.

What would move it up
Documented production use by a named organisation, with reported outcomes on real workloads, would move it up a level. Independent replication by groups other than the authors, and security testing of shell-only agents with self-editable memory, would also strengthen the case.

The study

Zezi Zeng, Yuke Zhao, Muzhao Tian et al. Freehand: The Bitter Lesson Comes to Agent Harnesses. arXiv, 1 December 2026. arXiv:2612.02442

Preprint, not peer reviewed · Licence arXiv (no reuse) · Xi'an Jiaotong University, Xi'an · Zhejiang University, Hangzhou · Fudan University, Shanghai

Badge for this study

Notes

  1. Zeng, Zhao, Tian et al. Freehand: The Bitter Lesson Comes to Agent Harnesses. arXiv preprint 2612.02442, December 2026. Not peer reviewed. Source
  2. Code repository listed by the authors. We have not checked its contents or licence. Source
  3. Project page listed by the authors. Source
  4. Headline figures: against first-party harnesses over 11 settings, +5.1 percentage points and 49% lower mean cost ($3.73 against $7.34 per task). Over the 10 GPT-6-astra and Claude Opus 5.5 settings, Freehand averaged 63.2% at $3.23 per task, against 58.4% for first-party harnesses, 59.3% Pi, 57.4% DeepSeek Harness and 56.8% OpenCode.
  5. OSWorld 2.1 with GPT-6-astra: Freehand 76.2% at $3.96 per task; Codex 68.3% at $14.94.
  6. Weaker models on Terminal-Bench 4: Codex beat Freehand by 5.7 points on GPT-6 Sol, Claude Code by 6.7 on Claude Sonnet 5.5, DeepSeek Harness by 5.1 on DeepSeek V4.1 Flash. Interaction test: Claude family +13.7 points (p<0.001); GPT-6 family +8.3 points (p about 0.05).
  7. Ablations with GPT-6-astra: adding Codex prompt and tools cut accuracy by 3.8 points on Agents' Last Exam and 2.5 on Terminal-Bench 4, with cost up 68% and 53%. Replacing self-managed memory with 90% auto-summarising raised cost by 19% and 7% at similar accuracy.
  8. Readiness: level III (open source available), based on public benchmark results and a linked code repository. No documented production use.

Edited and signed by

Stefan PerdalFounder. Twenty-five years of building digital products.244 stories edited

Stefan read the study, set the readiness level and approved this story. An AI system found the paper and wrote the first draft.

How this was made

An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.

No corrections to this article. Found an error? Report it.

More on Agents