Agentic AI
A shell is enough for the model. Production needs the rest.

- Freehand, from Microsoft Research, gives a frontier model a 200-word runtime description, one bash tool, a history it edits and a cost meter. On the paper's benchmarks it beat Codex, Claude Code and Gemini CLI in all 11 settings.
- We agree with its core: stop deciding strategy in advance for frontier models. The result mostly shows that letting a model write code works when the task's context already sits behind a shell.
- With lower-tier models the first-party harnesses won again. Many companies run smaller or self-hosted models, which is where the paper shows the harness matters more.
- A production harness is the operating layer the model does not own: permissions, secrets, when to ask a person, audit logs, spending limits, reuse of past work and evals on every change.
We think the part of an agent harness that the model sees should shrink, and the operating layer around it should grow. Microsoft Research's Freehand makes a strong case for the first half. The second half decides whether an agent survives contact with a company's real work.
Freehand comes from Zezi Zeng, Chong Luo and colleagues at Microsoft Research, Xi'an Jiaotong University, Zhejiang University and Fudan University. The paper appeared on 1 December 2026, with a project page and an MIT-licensed repository marked alpha, which lists it as part of Microsoft's AgentOpt series. The idea has a clear ancestor in Cloudflare's Code Mode from 2025, which had the model write code against an API instead of calling many tools one at a time.
What Freehand takes away
A harness is the code that runs an agent: the prompt, the tools, the loop, and what stays in the model's context. Mainstream harnesses decide much of this before the model sees the task. They ship a long system prompt of rules and workflows, twenty or more preset tools, fixed timeouts, and automatic compaction when the context reaches a set size.
Freehand removes all of that. Before the task begins the model sees about 200 words, roughly 0.35K tokens, that describe the runtime and give no rules. It gets one bash tool and sets each command's timeout itself. The conversation history is a file the model can edit and prune. After every turn it sees a meter with context size, tokens, cost and elapsed time. Automatic compaction is off by default.
The authors call fixed presets "a crutch" for weaker models and "a cage" for frontier ones. Their rule is to give the model "a shell, its own memory, and a meter" and let it decide everything else.
What the paper reports
Across five benchmarks and 11 model settings, the README reports that Freehand scored higher than each model's first-party harness every time, by 5.1 points on average at 49 percent lower cost. These are the authors' own runs, on these benchmarks.
Freehand against each model's own harness
| Freehand | First-party harness | |
|---|---|---|
| OSWorld 2.1, Claude Opus 5.5 | 80.1% at $2.09 a task | Claude Code 74.9% at $7.49 |
| Terminal-Bench 4, GPT-6-astra | 57.1% at $3.12 a task | Codex 54.6% at $5.88 |
| Mean cost over the 11 rows | $3.73 a task | $7.34 a task |
| Terminal-Bench 4, GPT-6 Sol | 29.2% | Codex 34.9% |
| Terminal-Bench 4, Claude Sonnet 5.5 | 34.9% | Claude Code 41.6% |
Freehand
- OSWorld 2.1, Claude Opus 5.5
- 80.1% at $2.09 a task
- Terminal-Bench 4, GPT-6-astra
- 57.1% at $3.12 a task
- Mean cost over the 11 rows
- $3.73 a task
- Terminal-Bench 4, GPT-6 Sol
- 29.2%
- Terminal-Bench 4, Claude Sonnet 5.5
- 34.9%
First-party harness
- OSWorld 2.1, Claude Opus 5.5
- Claude Code 74.9% at $7.49
- Terminal-Bench 4, GPT-6-astra
- Codex 54.6% at $5.88
- Mean cost over the 11 rows
- $7.34 a task
- Terminal-Bench 4, GPT-6 Sol
- Codex 34.9%
- Terminal-Bench 4, Claude Sonnet 5.5
- Claude Code 41.6%
Scores and costs from the results table in the Freehand README. The mean cost is our average of its 11 rows. The last two rows are lower-tier models.
The last two rows are the reversal. With GPT-6 Sol, Claude Sonnet 5.5 and DeepSeek V4.1 Flash, the first-party harness won. The README says so plainly: Freehand is built for frontier models, and with a smaller model that model's own harness "may serve you better".
True, and incomplete
The finding holds for the tasks it measured. A shell, a scratchpad and a short prompt cover most developer work, because developer context already lives in tools a shell can reach: files, git, test runners, logs and package managers. We also think benchmarks like these are well represented in frontier post-training. So a minimal harness scoring well mostly shows that code mode works.
That is a useful result, and the tool makers are moving the same way. Claude Code now has an experimental Code Mode in which Claude writes JavaScript that makes several tool calls in one step.
Practitioners point out where the minimal setup falls short. The context may not be reachable from a shell, because it sits in a system behind single sign-on or in a manager's head. The model may not know where it is. Or the right move is to stop and ask a person.
Models are persistent, and persistence costs money. Picture an agent asked to rotate a key that cannot find the secrets file. It may search folder after folder and spend thousands of tokens, when one question to a person would give it the location or a decision. A benchmark rewards that persistence. A company pays for it.
Freehand's own README carries the sharpest warning: there is no sandbox, commands run with your permissions, and nothing asks first. That is a fair choice for a research harness, and it is the gap a company has to close. A prompt that says no is not a control.
The operating layer the model does not own
The better question is where a harness is worth more than bash and a scratchpad. A CPU plus applications can compute. An operating system or a browser adds what makes that safe to share: resource management, access control, isolation, a consistent interface, and a record of what ran. A production agent harness is that layer for models.
The operating layer a production harness adds
AccessPermissions and sandboxing
Each agent runs in an isolated environment with the least access its task needs. Egress and file access are enforced by infrastructure, not by the prompt.
AccessSecrets
Credentials come from a vault at run time, scoped to the task, and never sit in files the model can read or in its history.
PeopleStop and ask rules
Defined points where the agent hands a decision to a named person: missing context, irreversible actions, low confidence, or a budget about to run out.
RecordAudit log
Every command, tool call, approval and cost is recorded, so anyone can replay what happened and who approved it.
CostSpending limits
The meter shows cost. A limit per task and per day stops the run and escalates instead of letting the model keep searching.
CostReuse of past work
Scripts, skills and answers from earlier runs are stored and found again, so the next run starts from them instead of rediscovering them.
QualityEvals on every change
A set of real cases with known answers runs whenever the model, prompt or tools change, and blocks the release if the score drops.
PeopleInterfaces for people
Reviewers see the work as a page, a diff or a queue they can act on, the same way every time.
We argued earlier that the harness is the product. Freehand sharpens that view. The part the model sees can shrink to a page. The part the company owns, the list above, cannot. Our security and AI governance method covers the access, audit and approval items on it.
Smaller models change the answer
The reversal matters commercially. Many companies run smaller or self-hosted models, for cost, for data residency, or because the work has to stay on their own servers. The paper measured the reversal on one benchmark, Terminal-Bench 4, with three hosted lower-tier models. We think it carries over to self-hosted models of similar size, where the first-party style of harness, with preset tools and rules, should beat the minimal one.
A smaller model needs more of its strategy decided in advance: tighter tools, explicit workflows, compaction it does not have to manage. For an agent platform on your own infrastructure, the harness carries more of the load, not less.
How to decide
Use the minimal harness where it wins, and invest in the operating layer everywhere. For a frontier model on developer tasks, go minimal: one shell, an editable history, a meter, and a sandbox around all of it. For a smaller or self-hosted model, or any business workflow that touches people and systems of record, the harness is where the work is.
To decide for your own case, run one test. Take your eval set and run it twice with the same model, once in a minimal harness with a meter and once in your current harness. If the minimal run wins on score and cost, cut the prompt and the preset tools, and keep every item in the operating layer.
If it loses, the model is telling you it needs the structure. We would begin any agentic AI development project with that comparison.
Sources (4)
- Zeng and others, Microsoft Research, Freehand: The Bitter Lesson Comes to Agent Harnesses, arXiv, 1 December 2026
- Microsoft, Freehand project page and FreeHand repository on GitHub, December 2026
- Cloudflare, Code Mode: the better way to use MCP, 26 September 2025
- Anthropic, Run tool calls from code with Code Mode, Claude Code docs