{"slug": "microsoft-freehand-harness", "title": "Microsoft FreeHand Harness", "summary": "Microsoft released Freehand, an open-source agent harness that gives a frontier model a roughly 200-word runtime description, a single `bash` tool and control over its own context, publishing the code as `freehand-ai` on PyPI and a paper on arXiv (2612.02442). Microsoft reports Freehand scored highest, cost least and was fastest on average against Codex, Claude Code, Gemini CLI, OpenCode, Pi and DeepSeek Harness across five benchmarks and three model families, though traditional harnesses still do better with weaker models. The alpha release has no sandbox — model commands run with the user's permissions and nothing asks first — and supports macOS and Linux, with native Windows listed as coming soon.", "body_md": "**English** · [简体中文](https://github.com/microsoft/FreeHand/blob/main/README.zh-CN.md) · [日本語](https://github.com/microsoft/FreeHand/blob/main/README.ja.md) · [한국어](https://github.com/microsoft/FreeHand/blob/main/README.ko.md) · [Français](https://github.com/microsoft/FreeHand/blob/main/README.fr.md) · [Español](https://github.com/microsoft/FreeHand/blob/main/README.es.md)\n\n🧭 **Freehand is part of the AgentOpt series**, which covers each part of an agent system: [SkillLens](https://microsoft.github.io/SkillLens/) · [SkillOpt](https://microsoft.github.io/SkillOpt/) · [Resource2Skill](https://microsoft.github.io/Resource2Skill/) · [EnvOpt](https://microsoft.github.io/EnvOpt/) · [EvalOpt](https://microsoft.github.io/EvalOpt/) · **Freehand**. See the [AgentOpt series page](https://microsoft.github.io/SkillOpt/agentopt/).\n\n**An agent harness that leaves the decisions to the model.**\n\nFreehand gives a frontier model a runtime description of about 200 words, one `bash` tool, and control over its own\ncontext. Against Codex, Claude Code, Gemini CLI, OpenCode, Pi and DeepSeek Harness, on five benchmarks with three model\nfamilies, it scored highest and cost least in every setting we ran, and it was fastest on average.\n\n**Use it with a frontier model.** Freehand leaves the decisions to the model, so it pays off when the model can make\nthem well: with weaker models, traditional harnesses still do better ([Results](#results)).\n\n[Quick start](#quick-start) · [Paper](https://arxiv.org/abs/2612.02442) · [Usage](https://github.com/microsoft/FreeHand/blob/main/docs/usage.md) · [Gateways](https://github.com/microsoft/FreeHand/blob/main/docs/gateway.md) ·\n[Benchmarks](https://github.com/microsoft/FreeHand/blob/main/docs/benchmarks.md) · [Security](https://github.com/microsoft/FreeHand/blob/main/docs/security.md) · [Changelog](https://github.com/microsoft/FreeHand/blob/main/CHANGELOG.md)\n\nAlpha. **Freehand has no sandbox:** the model's commands run with your permissions and nothing asks first. Use a\ncontainer or VM for code you do not trust ([how](https://github.com/microsoft/FreeHand/blob/main/docs/container.md)), and read the\n[security model](https://github.com/microsoft/FreeHand/blob/main/docs/security.md).\n\n- **[2026.12]** 🏆**Freehand** ranked**#1 Paper of the Day** and**#2 Trending Paper** on[Hugging Face Daily Papers](https://huggingface.co/papers/2612.02442) !\n- **[2026.12]** 📄 Released the[Freehand paper](https://arxiv.org/abs/2612.02442) and open-sourced`freehand-ai` on[PyPI](https://pypi.org/project/freehand-ai/) .\n\nSupported platforms: **macOS and Linux**. The CLI and web interface also run in Linux under WSL2.\n**Native Windows: coming soon.** Desktop builds target macOS (Apple Silicon and Intel) and Linux (x64);\nsee [desktop/README.md](https://github.com/microsoft/FreeHand/blob/main/desktop/README.md) for build details.\n\nOn macOS or Linux:\n\n```\ncurl -LsSf https://raw.githubusercontent.com/microsoft/FreeHand/main/install.sh | sh\n```\n\nOr install from [PyPI](https://pypi.org/project/freehand-ai/) (Python 3.10+):\n\n```\npip install freehand-ai\n# or: uv tool install freehand-ai\n```\n\nThe script installs [uv](https://docs.astral.sh/uv/) if it is missing, then Freehand with its own Python 3.12. If you\nalready have uv, the same thing is `uv tool install --python 3.12 git+https://github.com/microsoft/FreeHand`.\n`freehand update` upgrades the uv tool installation. To work on Freehand itself, see [Development](#development).\n\n```\nfreehand login            # Continue with ChatGPT (Plus or Pro); or an API key: freehand login openai | anthropic\ncd your/project\nfreehand                  # interactive session in this directory\nfreehand -c               # continue the last session here\nfreehand -p \"fix the failing test\"   # headless: activity on stderr, the final summary on stdout\nfreehand web              # the same sessions in a browser window\n```\n\nEvery command, key, slash command and setting is in [docs/usage.md](https://github.com/microsoft/FreeHand/blob/main/docs/usage.md) and\n[docs/config.md](https://github.com/microsoft/FreeHand/blob/main/docs/config.md).\n\n<sub>GPT-6-astra in the desktop app, from launch. The model's 22 seconds of work play at 2× speed.</sub>\n\nThe desktop app is optional. It puts files, changes, Git and a terminal next to the conversation, and shares its sessions and settings with the terminal, so a session started in one continues in the other.\n\nUnsigned preview installers (macOS Apple Silicon `.dmg`/`.zip` and Linux `.AppImage`, `.deb` and `.rpm`) are\navailable on [GitHub Releases](https://github.com/microsoft/FreeHand/releases). Because signed and notarized macOS\nbuilds are not published yet, drag **Freehand.app** into **Applications** and clear the quarantine attribute once\nbefore opening:\n\n```\nxattr -cr /Applications/Freehand.app\n```\n\nOr build it from source (Node 22.12 or later, and `freehand` from [Install](#install)):\n\n```\ngit clone https://github.com/microsoft/FreeHand.git && cd FreeHand/desktop\nnpm install\nnpm run app        # builds desktop/dist/mac-arm64/Freehand.app; `npm start` runs it without building\n```\n\nSign in from the app, or with `freehand login`. More in [desktop/README.md](https://github.com/microsoft/FreeHand/blob/main/desktop/README.md),\n[docs/web-ui.md](https://github.com/microsoft/FreeHand/blob/main/docs/web-ui.md) and [docs/workbench.md](https://github.com/microsoft/FreeHand/blob/main/docs/workbench.md).\n\n## freehand-aperture-readme.mp4\n\nThe Bitter Lesson holds that knowledge built into AI systems helps at first and is eventually outgrown by general\nmethods. Mainstream harnesses build in a great deal: prompts prescribe how to approach a task, tool suites and\ntimeouts fix how to act, and threshold compaction decides what to remember, all before the model has seen the task.\nFor weaker models these presets are a crutch; for frontier models they become a cage. Freehand follows one rule:\n**give the model a shell, its own memory, and a meter, and let it decide everything else.**\n\n| Decision | Typical harness | Freehand | \n|---|---|---|\n| How to approach the task (strategy) | rules, workflows and reminders in a long system prompt | a purely descriptive runtime prompt, with no rules | \n| What tools to use (execution) | dozens of pre-designed tools | one `bash` tool, from which the model builds what the task needs | \n| How long a command runs (execution) | fixed timeouts and poll intervals | the model sets each command's timeout and can run jobs detached | \n| What stays in context (memory) | automatic compaction at a fixed threshold | the model manages its own context at runtime | \n\nBefore the task begins the model sees about 0.35K tokens and one tool. After every turn it also sees its own meter: context size, tokens (with the cached share), cost and elapsed time.\n\nThe model-facing side stays this small on purpose. The human-facing side is complete: the desktop app (beta), a\nbrowser interface (`freehand web`) and a terminal interface, with streaming Markdown, interrupt, sessions and resume,\nper-turn undo, model switching, cost and context display, and HTML export.\n\nAcross 11 settings (five benchmarks with GPT-6-astra, Claude Opus 5.5 and Gemini 4 Carbon), Freehand had the highest score and the lowest cost in every one, and the shortest mean time per task. Against the first-party harnesses it scored 5.1 points higher at 49% lower cost, and it also beat OpenCode, Pi, DeepSeek Harness and the bash-only mini-swe-agent. In a controlled side-by-side rerun on the same machines and API endpoints, each of the other harnesses took 17–62% longer.\n\n| Benchmark | Model | Freehand (score · cost per task) | First-party harness (score · cost per task) | \n|---|---|---|---|\n| Terminal-Bench 4 | GPT-6-astra | **57.1%** ·**$3.12** | Codex 54.6% · $5.88 | \n|  | Claude Opus 5.5 | **61.9%** ·**$3.38** | Claude Code 54.9% · $4.91 | \n|  | Gemini 4 Carbon | **57.1%** ·**$8.76** | Gemini CLI 49.5% · $13.72 | \n| Terminal-Bench Science | GPT-6-astra | **63.8%** ·**$7.71** | Codex 58.1% · $12.99 | \n|  | Claude Opus 5.5 | **55.2%** ·**$8.16** | Claude Code 54.3% · $12.86 | \n| Agents' Last Exam | GPT-6-astra | **67.5%** ·**$1.92** | Codex 63.6% · $4.45 | \n|  | Claude Opus 5.5 | **66.5%** ·**$1.16** | Claude Code 62.2% · $2.29 | \n| OSWorld 2.1 | GPT-6-astra | **76.2%** ·**$3.96** | Codex 68.3% · $14.94 | \n|  | Claude Opus 5.5 | **80.1%** ·**$2.09** | Claude Code 74.9% · $7.49 | \n| AutomationBench | GPT-6-astra | **49.5%** ·**$0.56** | Codex 44.8% · $0.89 | \n|  | Claude Opus 5.5 | **54.4%** ·**$0.19** | Claude Code 47.9% · $0.27 | \n\nWith lower-tier models the order reverses. On Terminal-Bench 4 the first-party harness scores higher with GPT-6 Sol (Codex 34.9% vs. 29.2%), Claude Sonnet 5.5 (Claude Code 41.6% vs. 34.9%) and DeepSeek V4.1 Flash (DeepSeek Harness 28.9% vs. 23.8%). Freehand is built for frontier models; with a smaller model, that model's first-party harness may serve you better.\n\nThe other baselines, ablations and analysis are in the paper; [docs/benchmarks.md](https://github.com/microsoft/FreeHand/blob/main/docs/benchmarks.md) shows how to\nrun the benchmarks with Freehand.\n\n| Provider | How to sign in | \n|---|---|\n| OpenAI (default) | `freehand login` , with a ChatGPT Plus or Pro plan, or`freehand login openai` with an API key | \n| Anthropic | `freehand login anthropic` , then`freehand --provider anthropic` | \n| Any OpenAI-compatible Chat Completions API | `freehand --provider openai-chat --api-base <url> --api-key-env <VAR>` | \n| A gateway such as LiteLLM, for GPT, Claude and Gemini behind one key | [docs/gateway.md](https://github.com/microsoft/FreeHand/blob/main/docs/gateway.md) | \n\n`/model` switches the model, and the provider with it, in a running session.\n\nFreehand is a local tool that acts with your permissions. It has no sandbox and no approval prompt: you draw the boundary around Freehand, and inside it every decision is the model's.\n\n- Commands run as you, with your files, network, credentials and environment variables.\n- For code you do not trust, use a container or VM: [docs/container.md](https://github.com/microsoft/FreeHand/blob/main/docs/container.md) .\n- Repository content is untrusted input. `AGENTS.md` and project skills load only in folders you have trusted.\n- No telemetry. Freehand talks only to the model service and MCP servers you configure (in the web and desktop\ninterfaces, public web links in replies also load site favicons from Google's favicon service; see\n[docs/security.md](https://github.com/microsoft/FreeHand/blob/main/docs/security.md) ).\n\nThe full model, including undo, local files and the browser interface, is in [docs/security.md](https://github.com/microsoft/FreeHand/blob/main/docs/security.md). To\nreport a vulnerability, see [SECURITY.md](https://github.com/microsoft/FreeHand/blob/main/SECURITY.md).\n\n```\ngit clone https://github.com/microsoft/FreeHand.git && cd FreeHand\nuv sync --extra dev\nuv run pyflakes src tests\nuv run pytest -q\n```\n\nThe code layout and the rules for a change are in [CONTRIBUTING.md](https://github.com/microsoft/FreeHand/blob/main/CONTRIBUTING.md) and [AGENTS.md](https://github.com/microsoft/FreeHand/blob/main/AGENTS.md).\n\nFreehand is part of the **AgentOpt** series from Microsoft Research. Each project tackles one part of an agent system: its skills, its training environments, the evaluator that judges it, or the harness it runs in. Projects are listed by release date.\n\n| Project | What it does | Paper | Code | Project page | \n|---|---|---|---|---|\n| SkillLens | Studies what makes model-generated skills useful, from experience to extraction to use | [arXiv](https://arxiv.org/abs/2605.23899) | [Code](https://github.com/microsoft/SkillLens) | [Project page](https://microsoft.github.io/SkillLens/) | \n| SkillOpt | Trains reusable natural-language skills for frozen agents | [arXiv](https://arxiv.org/abs/2605.23904) | [Code](https://github.com/microsoft/SkillOpt) | [Project page](https://microsoft.github.io/SkillOpt/) | \n| Resource2Skill | Distills human tutorials and resources into executable agent skills | [arXiv](https://arxiv.org/abs/2606.29538) | [Code](https://github.com/microsoft/Resource2Skill) | [Project page](https://microsoft.github.io/Resource2Skill/) | \n| EnvOpt | Builds the training environments an agent needs | [arXiv](https://arxiv.org/abs/2611.41901) | [Code](https://github.com/microsoft/EnvOpt) | [Project page](https://microsoft.github.io/EnvOpt/) | \n| EvalOpt | Evolves evaluators for open-ended tasks from human feedback | [arXiv](https://arxiv.org/abs/2612.02431) | [Code](https://github.com/microsoft/EvalOpt) | [Project page](https://microsoft.github.io/EvalOpt/) | \n| **Freehand** (this repo) | An agent harness that leaves the decisions to the model | [arXiv](https://arxiv.org/abs/2612.02442) | [Code](https://github.com/microsoft/FreeHand) | [Project page](https://microsoft.github.io/FreeHand/) | \n\nMore AgentOpt projects are on the way. Overview: [AgentOpt series page](https://microsoft.github.io/SkillOpt/agentopt/).\n\nThis project welcomes contributions and suggestions. See [CONTRIBUTING.md](https://github.com/microsoft/FreeHand/blob/main/CONTRIBUTING.md).\n\nIf you find Freehand useful in your research, please cite:\n\n```\n@article{zeng2026freehand,\n  title  = {Freehand: The Bitter Lesson Comes to Agent Harnesses},\n  author = {Zeng, Zezi and Zhao, Yuke and Tian, Muzhao and Yang, Yifan and Dai, Qi and Liu, Bei and Qiu, Kai\n            and Zhuang, Bohan and Zhu, Jihua and Luo, Chong},\n  journal = {arXiv preprint arXiv:2612.02442},\n  year   = {2026}\n}\n```\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft\ntrademarks or logos is subject to and must follow\n[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft\nsponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.\n\nFreehand is not affiliated with or endorsed by OpenAI, Anthropic or Google. ChatGPT, Codex, Claude, Claude Code, Gemini and Gemini CLI are trademarks of their owners and are named here only to describe compatibility.\n\nMIT. See [LICENSE](https://github.com/microsoft/FreeHand/blob/main/LICENSE).", "url": "https://wpnews.pro/news/microsoft-freehand-harness", "canonical_source": "https://github.com/microsoft/FreeHand", "published_at": "2026-12-03 08:42:13+00:00", "updated_at": "2026-12-03 09:17:59.465875+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-research", "ai-safety"], "entities": ["Microsoft", "Freehand", "freehand-ai", "Codex", "Claude Code", "Gemini CLI", "OpenCode", "DeepSeek Harness"], "also_reported_by": [], "takeaway": "Freehand replaces a large harness with a ~200-word runtime description and a single bash tool, and Microsoft reports it beat Codex, Claude Code, Gemini CLI, OpenCode, Pi and DeepSeek Harness on score, cost and average speed across five benchmarks and three model families — but only with frontier mod", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/microsoft-freehand-harness", "markdown": "https://wpnews.pro/news/microsoft-freehand-harness.md", "text": "https://wpnews.pro/news/microsoft-freehand-harness.txt", "jsonld": "https://wpnews.pro/news/microsoft-freehand-harness.jsonld"}}