# Freehand — Microsoft's one-tool agent harness beats Codex and Claude Code

> A minimal harness bets that frontier models do better when the harness gets out of their way.

- Org: Microsoft Research
- Date: 2026-12-01
- Category: paper, repo, tool
- Source: https://github.com/microsoft/FreeHand
- Canonical page: https://ai-tldr.dev/releases/microsoft-freehand-agent-harness/

## In short

Freehand is Microsoft Research's open agent harness: a 200-word prompt, one bash tool and a context the model manages itself. The paper says it beats Codex, Claude Code and Gemini CLI in all 11 tests at 49% lower cost.

## What it is

Freehand is an open-source agent harness from Microsoft Research, released with the paper "Freehand: The Bitter Lesson Comes to Agent Harnesses". It replaces the detailed rules, 20-plus preset tools and automatic compaction of mainstream harnesses with a prompt of about 200 words and a single bash tool.

## How it works

The model gets a shell, its own memory and a meter that shows context size, tokens, cost and elapsed time after every turn. It sets its own command timeouts, can start background jobs and prunes its own history; automatic compaction is off by default. Freehand ships as a terminal UI, a browser UI and a beta desktop app.

## Why it matters

The authors tested five domains, including Terminal-Bench 4 and OSWorld 2.1, with three frontier model families, and report an average gain of 5.1 points at 49% lower cost than each model's own harness. The result questions how much prompt and tool engineering coding agents still need. The paper also finds that weaker models still do better with first-party harnesses.

## Who it's for

developers running coding agents and agent researchers

## Try it

pip install freehand-ai && freehand login

## Quick facts

- Maker: Microsoft Research
- License: MIT
- Paper: arXiv:2612.02442 (Dec 1, 2026)
- Install: pip install freehand-ai
- Providers: OpenAI, Anthropic, Copilot (experimental), any OpenAI-compatible API
- Platforms: macOS, Linux; WSL2 for CLI and web
- Status: Alpha, no sandbox

## FAQ

### Which models does Freehand work with?

Freehand defaults to OpenAI and can sign in with a ChatGPT Plus or Pro plan or use an OpenAI API key. It also supports Anthropic models, GitHub Copilot as an experimental provider, and any OpenAI-compatible Chat Completions endpoint, so gateways such as LiteLLM can put GPT, Claude and Gemini behind one key.

### Does Freehand beat Claude Code and Codex with every model?

No. The Freehand paper reports wins over the first-party harnesses of Codex, Claude Code and Gemini CLI in all 11 frontier-model settings, but it also says that with lower-tier models the first-party harnesses perform better again. Microsoft's authors argue that fixed harness rules help weaker models while holding frontier models back.

### Is Freehand safe to run on my machine?

Freehand is alpha software and its README warns that it has no sandbox: it runs commands with your own permissions. Microsoft's harness gives the model a real bash shell, so it is best used inside a project directory, container or VM where you accept that the model can change files.

### How much cheaper is Freehand than first-party harnesses?

Across five benchmarks averaged over GPT-6-astra and Claude Opus 5.5, the Freehand README charts a mean cost of $3.23 per task, against $6.70 for the first-party harnesses, $5.16 for OpenCode, $4.49 for Pi and $12.76 for DeepSeek Harness. The paper's headline figure is 49% lower cost on average.

## Links

- [GitHub Repo](https://github.com/microsoft/FreeHand)
- [arXiv Paper](https://arxiv.org/abs/2612.02442)
- [Project Page](https://microsoft.github.io/FreeHand/)
- [HF Papers](https://huggingface.co/papers/2612.02442)
