Analysis AI

7 min read · Dec 6, 2026

Microsoft Freehand Cuts Agent Cost 49% With One Bash Tool, Yet Smaller Models Drop Up to 6.7 Points

An open-source Microsoft Research harness drops multi-thousand-word workflows, 20-plus preset tools, and forced auto-compaction in favor of a single shell, an editable transcript file, and a turn meter. Across five benchmarks, frontier models score 5.1 points higher for roughly half the bill—until you swap in smaller models or skip container isolation.

7 min read Checked Dec 5, 2026 4 primary sources
Editorial slope chart comparing Codex at $14.94 against Microsoft Freehand at $3.96 and +7.9 points on OSWorld 2.1
Graphic: The Benchmarque (Microsoft Research arXiv:2612.02442 & microsoft/FreeHand, Dec 6, 2026) PRIMARY VISUAL

The short version

VERDICT // SUMMARY

Use Microsoft Freehand inside a container or VM when running top-tier frontier models (GPT-6-astra, Claude Opus 5.5, Gemini 4 Carbon) on long-horizon coding, GUI, or scientific workflows where preset timeouts and heavy tool schemas burn half your token budget. Keep first-party harnesses (Codex, Claude Code, DeepSeek Harness) for mid-tier or smaller models like Claude Sonnet 5.5, GPT-6 Sol, and DeepSeek V4.1 Flash—where Freehand loses 5.1 to 6.7 percentage points—and never run Freehand unsandboxed against untrusted repositories.

KEY NUMBERS // VERIFIED READOUT 4 METRICS AUDITED
  • Frontier score gain

    +5.1 pts

    Beat Codex, Claude Code, and Gemini CLI in all 11 frontier benchmark settings.

    arXiv:2612.02442

  • Per-task cost cut

    -49%

    Mean cost drops from $7.83 to $3.45 on GPT-6-astra and $5.56 to $3.00 on Opus 5.5.

    Microsoft Research

  • Static prefix size

    0.35K tok

    About 200 words and 1 bash tool vs. 15.1K tokens / 23 tools in Codex CLI.

    Table 1 audit

  • Mid-tier reversal

    -6.7 pts

    Claude Sonnet 5.5 falls from 41.6% in Claude Code to 34.9% in Freehand.

    Terminal-Bench 4

On OSWorld 2.1, running GPT-6-astra inside OpenAI’s official Codex harness averages $14.94 per task and solves 68.3% of desktop challenges. Running the exact same model inside Microsoft Research’s open-source Freehand harness—which deletes 22 dedicated tools, drops 15.1K tokens of static instructions down to ~0.35K tokens (~200 words), and hands the model nothing but bash—solves 76.2% of tasks at $3.96 per run.

That single reversal captures the central argument of Microsoft Research’s December 2026 paper, Freehand: The Bitter Lesson Comes to Agent Harnesses (arXiv:2612.02442). Over the past two years, coding-agent teams poured thousands of engineering hours into multi-thousand-word behavioral prompts, 20-to-34-tool suites, fixed command timeouts, and automatic context compaction. Microsoft Research’s controlled audit across five domains and three frontier model families suggests those guardrails now behave like an architectural tax on top-tier models—while remaining indispensable crutches for cheaper, mid-tier silicon.

Executive Verdict: Across all 11 frontier-model settings tested by Microsoft Research, stripping harness prescriptions boosted average benchmark scores by 5.1 percentage points while cutting per-task API cost by 49% and making competing harnesses 17% to 62% slower. The catch is equally sharp: on smaller models (Claude Sonnet 5.5, GPT-6 Sol, DeepSeek V4.1 Flash), Freehand drops 5.1 to 6.7 points behind first-party harnesses, and the tool ships in alpha with no sandbox and no confirmation prompts.

The Crutch-to-Cage Inversion

"A harness preset pays off only while the errors it prevents outweigh the better adjustments it blocks—and for frontier models, that balance has already flipped."

In Section 2 of the paper, Microsoft Research audited the actual wire payloads and source code of eight mainstream agent harnesses—Codex CLI, Gemini CLI, Claude Code, DeepSeek Harness, OpenCode, Pi, GitHub Copilot CLI, and Aider. Every mainstream harness makes three strategic decisions before the model has even read the user’s repository: how to plan (strategy), which wrapped tools and timeouts to invoke (execution), and when to summarize away conversation history (memory).

Editorial risograph illustration contrasting a tangled mechanical cage of gears and locks against a single minimal terminal key in open space
Illustration: The Benchmarque. Mainstream agent harnesses wrap models in up to 15.1K tokens of rules and 34 preset tools; Freehand hands back a single shell, an editable transcript file, and a cost meter.

Table 1 of the paper exposes how thick that pre-task scaffolding has become:

Agent Harness Static Prefix Default Tools Default Context Management Prescribed Rules (Examples)
Codex CLI ~15.1K tokens 23 Auto-summarization at 90% window ~3.3K-word prompt: rg-first search, parallel batching, test rules
Gemini CLI ~9.5K tokens 16 Threshold compression + output masking ~3.9K-word prompt: Research -> Strategy -> Execution; loop checker from turn 30
Claude Code ~8.5K tokens 22 Auto-summarization + output clearing Read-before-edit rules, tool priority, recurring runtime reminders
DeepSeek Harness ~6.5K tokens 34 8,192-char pruning + 80% auto-summary Concurrent sub-agents, read-before-edit, mid-run reminders
OpenCode ~5.2K tokens 10 Overflow summary + recent-tail retention ~1.5K-word prompt: dedicated tools over shell, apply_patch edits
Pi ~1.2K tokens 4 Auto-summarization near window limit Explicit read/edit/write tool rules
Freehand (Microsoft) ~0.35K tokens 1 (bash) Model edits its own transcript file ~200-word runtime description; zero workflow rules

Why does removing that scaffolding save half the bill? The paper’s trajectory audit isolates a concrete culprit: fixed command timeouts. A static 30-second cutoff protects an agent stuck at an interactive prompt, yet on a long optimization run inside Terminal-Bench 4, that fixed cutoff turned a single background wait into 334 separate polling calls—costing more than 10x what an agent spent when allowed to choose its own command timeout.

Freehand’s actual prompt (src/freehand/prompt.md) is just four short paragraphs. Instead of forbidding behaviors, it gives the model three clean levers:

  1. A self-timed shell (bash): The model chooses per-command timeouts, runs detached jobs, and writes ad-hoc Python or shell scripts instead of chaining 20 wrapped tool calls.
  2. Memory as a native file ({transcript_path}): The harness writes the live conversation transcript in the provider’s native message format after every turn. Because the model can prune stale build logs or drop finished subtasks directly via bash, it trims context at natural subtask boundaries—and can even inject a screenshot as an image part into its own transcript to inspect GUIs without a dedicated vision tool.
  3. A turn meter instead of nag rules: Every turn appends one telemetry line reporting turn count, current context size, tokens (including cached share), cumulative cost, and elapsed time. The harness reports facts and never tells the model what to do about them.

Inside the Numbers: 11 Frontier Settings, Zero Losses

Across five benchmarks (Terminal-Bench 4, Terminal-Bench Science, Agents' Last Exam, OSWorld 2.1, and AutomationBench) and three frontier families (GPT-6-astra, Claude Opus 5.5, and Gemini 4 Carbon), Freehand posted both the highest accuracy and the lowest cost per task in every single run:

Benchmark Model Freehand Score & Cost First-Party Harness Score & Cost Score Delta Cost Reduction
Terminal-Bench 4 GPT-6-astra 57.1% · $3.12 Codex: 54.6% · $5.88 +2.5 pts -46.9%
Terminal-Bench 4 Claude Opus 5.5 61.9% · $3.38 Claude Code: 54.9% · $4.91 +7.0 pts -31.2%
Terminal-Bench 4 Gemini 4 Carbon 57.1% · $8.76 Gemini CLI: 49.5% · $13.72 +7.6 pts -36.2%
Terminal-Bench Science GPT-6-astra 63.8% · $7.71 Codex: 58.1% · $12.99 +5.7 pts -40.6%
Terminal-Bench Science Claude Opus 5.5 55.2% · $8.16 Claude Code: 54.3% · $12.86 +0.9 pts -36.5%
Agents' Last Exam GPT-6-astra 67.5% · $1.92 Codex: 63.6% · $4.45 +3.9 pts -56.9%
Agents' Last Exam Claude Opus 5.5 66.5% · $1.16 Claude Code: 62.2% · $2.29 +4.3 pts -49.3%
OSWorld 2.1 GPT-6-astra 76.2% · $3.96 Codex: 68.3% · $14.94 +7.9 pts -73.5%
OSWorld 2.1 Claude Opus 5.5 80.1% · $2.09 Claude Code: 74.9% · $7.49 +5.2 pts -72.1%
AutomationBench GPT-6-astra 49.5% · $0.56 Codex: 44.8% · $0.89 +4.7 pts -37.1%
AutomationBench Claude Opus 5.5 54.4% · $0.19 Claude Code: 47.9% · $0.27 +6.5 pts -29.6%

Look past the first-party matchups to the five-benchmark averages in Figure 1 of the paper, and the gap against third-party harnesses is even starker. On GPT-6-astra, Freehand averaged 62.8% at $3.45 per task—beating Pi (60.1% · $4.85), OpenCode (58.9% · $6.45), Codex (57.9% · $7.83), and DeepSeek Harness (55.0% · $20.25, nearly six times Freehand’s cost). On Claude Opus 5.5, Freehand averaged 63.6% at $3.00 per task versus DeepSeek Harness (59.9% · $5.27), Claude Code (58.8% · $5.56), Pi (58.5% · $4.14), and OpenCode (54.8% · $3.86).

Crucially, Microsoft Research’s ablations prove that “bash-only” by itself is not the magic trick: mini-swe-agent—which also exposes only bash, yet retains fixed workflows, fixed timeouts, and append-only history—still trailed Freehand at higher cost. Accuracy gains came primarily from deleting rigid workflows and wrapped tool suites, while the steep cost reductions came from self-managed context pruning and model-chosen timeouts.

The Tradeoffs That Don’t Fit in a Viral Headline

Removing every guardrail creates real operational hazards that teams must price in before switching from Codex or Claude Code:

  • Zero sandbox and zero approval prompts: The microsoft/FreeHand repository states it bluntly: Freehand is alpha software with no sandbox and no confirmation dialog. Every shell command executes immediately under the host user’s permissions, with full access to local files, SSH keys, credentials, environment variables, and network endpoints. Microsoft’s own security documentation instructs developers to draw an external boundary around Freehand using a Docker container or VM for any untrusted codebase.
  • Platform gaps: Freehand (pip install freehand-ai or uv tool install freehand-ai) targets macOS and Linux (plus Linux inside WSL2). Native Windows support is listed as “coming soon,” and the optional Electron desktop app ships unsigned macOS preview builds requiring manual quarantine removal (xattr -cr /Applications/Freehand.app).
  • Benchmark meter normalization: Per docs/benchmarks.md, the Harbor benchmark adapter disables streaming and prompt_cache_key and injects flat meter pricing ($10 input / $1 cached input / $50 output per million tokens) so cross-harness runs stay apples-to-apples. Real-world production bills with live prompt-cache hit rates and provider-specific tiers will vary from Harbor’s standardized cost meter.
Where this thesis breaks (Who should NOT switch to Freehand): Microsoft Research's own lower-tier model table shows the exact point where minimal harnesses collapse. On Terminal-Bench 4, swapping from flagship weights to mid-tier models flips every single result back to the first-party harness: Claude Sonnet 5.5 drops from 41.6% in Claude Code to 34.9% in Freehand (-6.7 pts); GPT-6 Sol drops from 34.9% in Codex to 29.2% (-5.7 pts); and DeepSeek V4.1 Flash falls from 28.9% in DeepSeek Harness to 23.8% (-5.1 pts). Teams standardizing on faster, lower-cost models—or enterprise security orgs that require per-command approval policies and managed sandboxing—still get higher accuracy and lower operational risk from heavy first-party harnesses.

What Engineering Teams Should Do Now

  • Frontier-model power users (GPT-6-astra, Claude Opus 5.5, Gemini 4 Carbon): Test freehand-ai inside an isolated Docker container or disposable dev VM on long-running repo refactors, build-debug loops, and multi-step automation tasks. The biggest immediate savings appear on GUI/browser work (OSWorld 2.1, 72%–74% cheaper) and heavy terminal suites where polling timeouts kill token budgets.
  • Mid-tier & local-model workflows: Keep structured harnesses (Claude Code, Codex, OpenCode, or Pi) when routing tasks to Sonnet-class, Sol-class, or compact open-weight models—the scaffolding still prevents more mistakes than it blocks.
  • Harness builders: Even if you never adopt Freehand directly, audit three defaults in your existing agent stack today: eliminate rigid 30-second command cutoffs, expose an explicit per-turn cost/context meter to the model, and stop injecting 10K+ tokens of redundant tool schemas on every turn.
How we verified this: All benchmark scores, per-task dollar averages, static prefix token counts, tool inventories, and security constraints were extracted directly from Microsoft Research's arXiv preprint (arXiv:2612.02442v1, Dec 1, 2026) and the official microsoft/FreeHand GitHub repository (README.md, src/freehand/prompt.md, and docs/benchmarks.md) on December 6, 2026. No independent re-runs were claimed or fabricated.

Frequently Asked Questions

How much cheaper is Microsoft Freehand compared to Codex and Claude Code?

Across all 11 frontier-model settings in Microsoft Research’s paper (arXiv:2612.02442), Freehand cut per-task cost by 49% on average while scoring 5.1 percentage points higher. On the five-benchmark average, GPT-6-astra dropped from $7.83 (Codex) to $3.45 (Freehand), and Claude Opus 5.5 dropped from $5.56 (Claude Code) to $3.00 (Freehand), with the steepest cuts exceeding 72% on OSWorld 2.1.

Why does Freehand perform worse on smaller models like Claude Sonnet 5.5 and GPT-6 Sol?

Freehand removes preset workflows, dedicated editing tools, and forced auto-compaction, relying on the model to write its own scripts, choose sensible timeouts, and prune its own transcript file. Mid-tier models make more planning and context-management errors without those guardrails—losing 6.7 points on Claude Sonnet 5.5 (34.9% vs. 41.6%), 5.7 points on GPT-6 Sol (29.2% vs. 34.9%), and 5.1 points on DeepSeek V4.1 Flash (23.8% vs. 28.9%) on Terminal-Bench 4.

Is Microsoft Freehand safe to run directly on a main developer laptop?

Not on untrusted repositories. Freehand is alpha software with no built-in sandbox and no approval prompt—every bash call runs immediately with your host user’s files, network access, and credentials. Microsoft explicitly recommends running Freehand inside a container or VM whenever working on untrusted code.

Primary Sources

  1. Freehand: The Bitter Lesson Comes to Agent Harnesses — Microsoft Research (arXiv:2612.02442, Dec 1, 2026)
  2. microsoft/FreeHand Official GitHub Repository & Benchmark Tables
  3. Freehand 200-Word System Prompt (src/freehand/prompt.md)
  4. Freehand Harbor Benchmark Configuration (docs/benchmarks.md)
LIVE DESK // BENCHMARQUE TOOLS

Track live street prices in the Hardware Market, check Hot Deals, or compare configurations in the PC and Local AI Builder and Benchmarks Leaderboard.

Sources & Primary Filings

4 cited
  1. Microsoft Research Paper: Freehand: The Bitter Lesson Comes to Agent Harnesses (arXiv:2612.02442, Dec 1, 2026) arxiv.org
  2. GitHub: microsoft/FreeHand Repository, Architecture & Results github.com
  3. GitHub: Freehand System Prompt (src/freehand/prompt.md) github.com
  4. GitHub: Freehand Harbor Benchmark Adapter (docs/benchmarks.md) github.com

The Monday Hardware & AI Briefing

Verified street-price drops, buy-or-wait signals, and reproducible benchmark tables every Monday morning. Zero popups, one-click unsubscribe.

Reader focus

Sponsor a benchmark series or hardware briefing on The Benchmarque. View media kit and sponsorship options.