Jorge Turbica / blog · Blog ← All articles ES · Leer en español
AI

Repo of the day: Freehand, the Microsoft harness that beats Claude Code with one bash tool

Freehand gives the model a 200-word prompt and one bash tool. With frontier models it beats Claude Code and Codex at lower cost.

About 200 words of prompt and a single tool, bash. With that, Freehand, Microsoft Research's agent harness, beats Claude Code, Codex and Gemini CLI on their own frontier models in its authors' benchmarks, and costs less doing it. The repository, created on November 17, 2026, has 284 stars, its paper reached #1 Paper of the Day on Hugging Face Daily Papers, and version 0.1.0 is already on PyPI.

What it is and how it works

Freehand is a coding and terminal agent harness written in Python, MIT-licensed, and part of Microsoft Research's AgentOpt series. Its thesis comes from "The Bitter Lesson": knowledge you hand-build into an AI system helps at first and is eventually outgrown by general methods. Mainstream harnesses decide a lot on the model's behalf before it has even seen the task: long prompts full of rules and workflows, dozens of predesigned tools, fixed timeouts and automatic context compaction at a threshold. For weaker models that is a crutch; for frontier models, the authors argue, it becomes a cage.

Freehand strips almost all of it out:

  • Strategy: a purely descriptive prompt of about 200 words (roughly 0.35K tokens), with no rules.
  • Execution: a single bash tool. The model builds whatever it needs on top of it, sets each command's timeout and can run jobs detached.
  • Memory: the model manages its own context by editing a transcript.json file instead of relying on automatic compaction.
  • Meter: after every turn it sees its context size, tokens (with the cached share), cost and elapsed time.

The human-facing side is complete: a terminal UI, freehand web in the browser and a beta desktop app, with sessions, resume, per-turn undo, model switching and HTML export. It works with OpenAI (the default), Anthropic, any Chat Completions-compatible API, or a gateway such as LiteLLM.

How to use it

You need macOS or Linux (WSL2 on Windows) and Python 3.10 or later:

bash
pip install freehand-ai          # or: uv tool install freehand-ai
freehand login anthropic         # or with an OpenAI API key: freehand login openai
cd your/project
freehand --provider anthropic    # interactive session in this directory
freehand -p "fix the failing test"   # headless: the final summary goes to stdout

The README also offers a curl … | sh installer that installs uv if it is missing; the PyPI route gets you the same thing without running a remote script.

The warning that matters is in its security model: Freehand has no sandbox and no approval prompt. Every command the model runs executes with your permissions, your network, your SSH keys, your cloud CLIs and your environment variables, without asking, headless runs included. The authors themselves recommend a container or VM for untrusted code and document a Dockerfile for it. Two defences live in ~/.freehand/config.json: a pre_bash hook that sees each command first and can refuse it, and shell_environment_policy, which can drop variables with KEY, SECRET or TOKEN in their names.

The numbers

The authors ran five benchmarks with three frontier model families. These are the Claude Opus 5.5 results against Claude Code, as reported in the README:

BenchmarkFreehand (score · cost per task)Claude Code (score · cost per task)
Terminal-Bench 461.9% · $3.3854.9% · $4.91
Terminal-Bench Science55.2% · $8.1654.3% · $12.86
Agents' Last Exam66.5% · $1.1662.2% · $2.29
OSWorld 2.180.1% · $2.0974.9% · $7.49
AutomationBench54.4% · $0.1947.9% · $0.27

Across all 11 settings, against each model's first-party harness (Codex with GPT-6-astra, Claude Code with Opus 5.5, Gemini CLI with Gemini 4 Carbon), Freehand scores 5.1 points higher on average at 49% lower cost. In a controlled side-by-side rerun on the same machines, the other harnesses took 17% to 62% longer.

And the detail I like most, because the project publishes it itself: with lower-tier models the order flips. On Terminal-Bench 4, Claude Code with Claude Sonnet 5.5 scores 41.6% against Freehand's 34.9%, and Codex with GPT-6 Sol 34.9% against 29.2%.

What convinces me and what doesn't

The idea convinces me, and so does how honestly it is presented: a harness that gives more freedom the better the model is, with results that include the cases where it loses. So does the cost and context meter the model can see, which is exactly what agents usually lack to manage their own budget, and the absence of telemetry.

What doesn't: it is Alpha, with 0.1.0 published at the start of December and 10 open issues; every benchmark comes from the authors; and with no sandbox and no approvals it is unfit to run as is on a machine holding production credentials. There is no native Windows build yet, and the macOS desktop app ships unsigned.

Freehand vs Claude Code

Claude Code is the reference it is most often measured against. The authors group the first-party harnesses under the same approach, and the difference is one of philosophy:

FreehandClaude Code, Codex, Gemini CLI (per the authors)
Prompt~200 words, descriptive onlyDetailed instructions and runtime reminders
ToolsOne: bash20+ preset tools
TimeoutsSet by the model per commandFixed
ContextThe model prunes its own historyAutomatic compaction at a fixed threshold

When to use which: if you work with a frontier model on long terminal tasks inside an isolated environment (a container, a VM, a disposable CI runner), Freehand is worth a try, especially if cost per task matters to you. If you use smaller models, work straight on your laptop with access to real systems, or need a mature product with permission controls, your model's first-party harness is still the sensible choice, and Freehand's own README says as much.

Sources

Jorge Turbica

Software Engineer and SRE. I write about the real challenges I run into in production.

See portfolio ↗