Skip to main content

Minimal agent harnesses and models managing their own context

Agents in Practice #22 on Freehand’s minimal harness outperforming heavier presets on frontier models, and letting LLMs manage their own context through a collapse API.
llm
agents
agents-in-practice
Author

Ryan Lee

Published

December 5, 2026

Welcome to the 22nd issue of Agents in Practice.

📬 Agents in Practice is a weekly newsletter on agentic AI research and applications. Subscribe here →

Do harnesses still matter?

Comparison between mainstream harnesses and FreeHand

Researchers from Microsoft Research, Xi’an Jiaotong University, Zhejiang University, and Fudan University argued that common harness presets (long prompts, specialized tool suites, fixed timeouts, and automatic compaction) can help weaker models but hold frontier models back. They introduce a minimal harness called Freehand, which only contains a ~200-word runtime prompt, a single Bash tool with model-set timeouts, an editable JSON transcript file, and a per-turn status line for context size, cost, and time.

Across five benchmarks with three frontier models, Freehand beat each model’s first-party harness (Codex, Claude Code, and Gemini CLI) in every tested setting, scoring 5.1 percentage points higher on average at 49% lower cost and running faster overall. It also outperformed the third-party harnesses they tested. However, with lower-tier models (GPT-6 Sol, Claude Sonnet 5.5, and DeepSeek V4.1 Flash) first-party harnesses beat Freehand by 5.1 to 6.7 points on Terminal-Bench 4.

In ablation studies, the authors showed that most of the accuracy gain and cost savings come from removing prescriptive prompts and specialized tools.

Personal Thoughts

“Harness engineering” was considered an important skill, but this paper claims otherwise. As models become more capable, harnesses become more a restriction than a helper. It shows how important it is to have an evaluation suite that checks not only the model but also the harness.

Read more

Manage your own context

Harness-driven Context Management vs. Model-driven Context Management

Researchers from NVIDIA studied whether LLMs can manage their own context instead of relying on automatic harness compaction. In their open-source harness, the authors compared automatic compaction at 80% usage against their “collapse” API that replaces a range of past events with a summary while still allowing the models to fetch those events by archiving them.

They tested four models across 8K–512K budgets on OfficeQA Pro v2 (document research) and MLE-bench Lite. Collapsing delivered the largest gain at tight budgets on OfficeQA Pro v2 and a much smaller one on MLE-bench Lite. Different models also used the collapse API in varying degrees. GPT-6.1 Sol, Kimi K3, and DeepSeek V4 Pro called the API in 42–53% of tasks while Claude Opus 5.5 used it in only 4%.

Personal Thoughts

Compaction has always been a confusing idea to me, especially when there have been multiple studies saying that model performance decreases as context length increases from a certain point. This paper and issue 18’s paper on “compacting after every action” show that perhaps compacting more often is much better, even if it reduces the cache hit rate.

Read more

One-liners

Subscribe to Agents in Practice

Get new issues of Agents in Practice — a newsletter summarizing exciting new research and applications in agentic AI — delivered to your inbox.