Freehand, Microsoft's minimal harness for strong LLMs
Microsoft Research released Freehand, an open-source 200-word single-bash agent harness beating Codex and Claude Code by 5.1 points at 49% lower cost.
By Dillip Chowdary • Dec 03, 2026 • Source: github.com

At a glance
- Developer
- Microsoft Research (AgentOpt)
- Prompt size
- ~200 words (0.35K tokens)
- Tools provided
- Single bash tool
- Frontier margin
- +5.1 pts score, -49% cost
- Platforms
- macOS, Linux, WSL2 (Python 3.10+)
- Security
- Alpha, no built-in sandbox
In this post
Microsoft Research released Freehand, an open-source minimal agent harness in its AgentOpt series that replaces complex system prompts and tool suites with a 200-word runtime description, one bash tool, and model-managed context. According to github.com's report, Freehand outperformed Codex, Claude Code, and Gemini CLI across five benchmarks while cutting per-task costs by 49 percent when paired with frontier models.
This article breaks down Freehand's architecture, controlled benchmark numbers across three frontier model families, smaller-model tradeoffs, and installation workflow. It targets AI systems engineers, CLI coding-agent users, and platform teams deciding between prescriptive agent frameworks and lightweight shell harnesses.
01Minimal runtime prompt and single bash tool
Mainstream agent harnesses embed workflow rules, dozens of specialized tools, fixed command timeouts, and threshold-based context compaction inside long system prompts. Freehand strips those presets away so the language model sees roughly 0.35K tokens at task start, one bash tool, and a live turn-by-turn meter tracking context size, cached tokens, cost, and elapsed time.
| Decision | Typical harness | Freehand |
|---|---|---|
| Strategy | Long rules and workflow prompts | Descriptive 200-word runtime prompt |
| Tools | Dozens of pre-designed tools | Single bash tool |
| Execution | Fixed timeouts and polling | Model-chosen timeouts and detached jobs |
| Memory | Fixed-threshold compaction | Model manages context at runtime |
On the human side, Microsoft ships a terminal CLI, a browser interface launched with freehand web, and an optional beta desktop app with file trees, Git views, streaming Markdown, per-turn undo, and HTML export.
02Frontier benchmark gains across five evaluations
Microsoft evaluated Freehand across 11 settings spanning five benchmarks using GPT-6-astra, Claude Opus 5.5, and Gemini 4 Carbon against first-party harnesses plus OpenCode, Pi, DeepSeek Harness, and mini-swe-agent. Across first-party comparisons, Freehand averaged 5.1 percentage points higher at 49 percent lower cost, while rival harnesses took 17 to 62 percent longer in side-by-side reruns.
| Benchmark | Model | Freehand score and cost | First-party harness score and cost |
|---|---|---|---|
| Terminal-Bench 4 | GPT-6-astra | 57.1% · $3.12 | Codex 54.6% · $5.88 |
| Terminal-Bench 4 | Claude Opus 5.5 | 61.9% · $3.38 | Claude Code 54.9% · $4.91 |
| Terminal-Bench 4 | Gemini 4 Carbon | 57.1% · $8.76 | Gemini CLI 49.5% · $13.72 |
| OSWorld 2.1 | Claude Opus 5.5 | 80.1% · $2.09 | Claude Code 74.9% · $7.49 |
| Agents' Last Exam | GPT-6-astra | 67.5% · $1.92 | Codex 63.6% · $4.45 |
| AutomationBench | Claude Opus 5.5 | 54.4% · $0.19 | Claude Code 47.9% · $0.27 |
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
On Terminal-Bench Science, Freehand also led with GPT-6-astra (63.8 percent at $7.71 versus Codex 58.1 percent at $12.99) and Claude Opus 5.5 (55.2 percent at $8.16 versus Claude Code 54.3 percent at $12.86).
03Reversal with smaller and mid-tier models
The minimal harness advantage depends strictly on strong underlying reasoning models. Microsoft's measurements show that when running smaller or lower-tier models, prescriptive first-party harnesses regain the lead because weaker models benefit from structured tool schemas and built-in workflows.
On Terminal-Bench 4, Codex outperformed Freehand with GPT-6 Sol (34.9 percent versus 29.2 percent), Claude Code beat Freehand with Claude Sonnet 5.5 (41.6 percent versus 34.9 percent), and DeepSeek Harness led with DeepSeek V4.1 Flash (28.9 percent versus 23.8 percent). Engineers running mid-tier models should keep their vendor-native harness.
04Installation, providers, and desktop builds
Freehand runs natively on macOS and Linux, as well as Windows through WSL2, with native Windows support listed as coming soon. Users install via curl -LsSf https://raw.githubusercontent.com/microsoft/FreeHand/main/install.sh | sh or pip install freehand-ai / uv tool install freehand-ai on Python 3.10+.
Authentication supports OpenAI (via ChatGPT Plus or Pro sign-in with freehand login, or an API key), Anthropic (freehand login anthropic), any OpenAI-compatible Chat Completions endpoint, and gateways such as LiteLLM. The beta desktop app requires Node 22.12 or later and builds from source via npm run app inside FreeHand/desktop, sharing sessions and settings with the terminal CLI.
05Unsandboxed execution and AgentOpt ecosystem
Note: Freehand is in alpha and runs without a sandbox or confirmation prompts, executing model commands directly under the user's local file, network, and credential permissions.
Microsoft recommends running Freehand inside a container or virtual machine when inspecting untrusted repositories, and notes that AGENTS.md and project skills only load inside explicitly trusted folders. Freehand sends no telemetry, communicating only with configured model endpoints and MCP servers. It joins Microsoft Research's broader AgentOpt lineup alongside SkillLens, SkillOpt, Resource2Skill, EnvOpt, and EvalOpt.
Frequently asked questions
What makes Microsoft Freehand different from Claude Code or Codex?
Instead of prescribing rules, dozens of built-in tools, and fixed compaction thresholds, Freehand gives the model a 200-word descriptive prompt, one bash tool, and direct control over timeouts and context management.
Does Freehand beat first-party harnesses on every model?
No. Freehand won across all 11 settings tested with frontier models like GPT-6-astra, Claude Opus 5.5, and Gemini 4 Carbon, but Codex, Claude Code, and DeepSeek Harness scored higher when tested with GPT-6 Sol, Claude Sonnet 5.5, and DeepSeek V4.1 Flash.
How much cheaper and faster was Freehand in Microsoft's benchmarks?
Across the five frontier benchmarks, Freehand cost 49 percent less on average than first-party harnesses, while competing harnesses took 17 to 62 percent longer per task in controlled reruns.
Is Freehand safe to run on untrusted repositories?
Freehand is an alpha tool with no built-in sandbox or approval prompts, so Microsoft advises running untrusted code inside a container or VM.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement