Freehand: The Bitter Lesson Comes to Agent Harnesses

Zezi Zeng, Yuke Zhao, Muzhao Tian, Yifan Yang, Qi Dai, Bei Liu, Kai Qiu, Bohan Zhuang, Jihua Zhu, Chong LuoarXiv 2026

TL;DR

Mainstream AI agent harnesses wrap language models in heavy scaffolding—detailed behavioral prompts, dozens of specialized tools, fixed timeouts, and automatic memory compaction. This paper shows that while these presets act as a helpful crutch for weaker models, they become a cage for frontier models. By stripping away the scaffolding and giving the model just a bash shell, its own editable memory file, and a resource meter, Freehand outperforms first-party harnesses across every tested frontier setting—achieving higher accuracy (+5.1 percentage points on average) at roughly half the cost (49% reduction) and in less time.

What Problem Does This Paper Address?

Rich Sutton’s famous Bitter Lesson argues that human-engineered domain knowledge in AI systems helps at first, but is eventually outperformed by general-purpose methods that scale with compute. The authors argue this exact dynamic is now playing out in agent harnesses—the software loops that connect an LLM to its environment.

Today’s popular harnesses (like Codex, Claude Code, Gemini CLI, OpenCode, Pi, and DeepSeek Harness) make three major decisions before the model ever sees a task:

  1. Strategy: Multi-thousand-word system prompts and runtime reminders dictating how to plan, search, and verify work.
  2. Execution: 10 to 34 specialized tools (e.g., dedicated file readers, GUI clickers) paired with hardcoded command timeouts.
  3. Memory: Threshold-based auto-compaction that summarizes or truncates conversation history once it hits a fixed token limit.

These presets were built to prevent earlier models from getting stuck or losing track of context. But as frontier models have grown better at reasoning from in-task evidence, those same presets override better judgment, force inefficient tool-calling loops, and burn tokens on every turn.

Methods

The authors introduce Freehand, a general-purpose harness built on a single rule: give the model a shell, its own memory, and a meter—and let it decide everything else.

Architecture comparison between mainstream harnesses and Freehand

Instead of prescriptive scaffolding, Freehand exposes three minimal components:

  • A ~200-word descriptive prompt: Explains how the loop works without imposing workflows, coding conventions, or tool-use rules.
  • A single bash(command, timeout_s?) tool: Replaces dozens of specialized wrappers. The model sets its own command timeouts (waiting for long jobs instead of polling) and writes custom scripts or tools on the fly.
  • Editable memory (transcript.json) + a status meter: The conversation history lives in the environment as a mutable JSON file in the provider’s native message format. Using bash, the model can prune stale logs, condense finished subtasks, or even base64-encode screenshots into its own context to view them. After every turn, a one-line footer reports the turn count, context size, tokens, cost, and elapsed time—giving the model feedback without telling it what to do.

Datasets

The authors evaluate Freehand across five existing, cross-domain benchmarks (no new benchmarks are introduced):

  • Terminal-Bench 4: 63 systems and security tasks.
  • Terminal-Bench Science: 70 scientific computing tasks.
  • Agents’ Last Exam (ALE): 105 research and engineering tasks.
  • OSWorld 2.1: 108 Ubuntu GUI tasks.
  • AutomationBench: 600 enterprise workflow tasks.

Evaluations span three frontier model families (GPT-6-astra, Claude Opus 5.5, and Gemini 4 Carbon) as well as three lower-tier models (DeepSeek V4.1 Flash, GPT-6 Sol, and Claude Sonnet 5.5) to test how harness effects shift with model capability.

Key Insights and Ideas

  • The "crutch-to-cage" reversal: On lower-tier models, first-party harnesses still win, outscoring Freehand by 5.1–6.7 percentage points on Terminal-Bench 4. On frontier models, the order flips completely: Freehand beats every first-party harness across all 11 settings.
  • Presets—not just missing features—hurt performance: Controlled ablations show that restoring Codex’s prompt and specialized tools inside Freehand’s loop drops accuracy by 2.5–3.8 points while inflating cost by 53–68%. Meanwhile, removing Freehand’s self-managed memory leaves accuracy unchanged but raises costs by 7–19% on long-horizon tasks.
  • Returning control beats mere simplicity: A bash-only baseline (mini-swe-agent) that still enforces a fixed workflow and a hardcoded 30-second timeout trails Freehand by 3.5 points at 35% higher cost on Terminal-Bench 4, because the 30-second cutoff interrupts 60% of tasks and forces repetitive polling loops.
  • Models adapt their behavior naturally: Freed from presets, frontier models write task-specific scripts (85.1% of calls on ALE vs. 51.5% in Codex), eliminate polling loops (0 PTY polls vs. 11.6 in Codex), and prune context only when needed (0.2% of tasks on short AutomationBench workflows vs. 58.6–64.3% on multi-hour Terminal-Bench Science tasks).
  • Fewer false refusals: Heavy first-party prompts can trigger unnecessary refusals. Swapping Codex’s prompt into Freehand caused Turn-1 refusals in 10/10 runs on a benign HIV protease docking task, whereas unmodified Freehand passed 10/10.

Key Results

Performance and cost of mainstream harnesses and Freehand

Performance and cost of mainstream harnesses and Freehand
  • Beats first-party harnesses everywhere: Across all 11 frontier settings, Freehand outscores Codex, Claude Code, and Gemini CLI by +5.1 percentage points on average, cuts mean per-task cost by 49% ($3.73 vs. $7.34), and runs fastest (other harnesses take 17–62% longer in a controlled side-by-side rerun).
  • Stronger, cheaper, and faster than third-party harnesses: Averaged across 10 GPT-6-astra and Claude Opus 5.5 settings, Freehand scores 63.2% (vs. 58.4% first-party, 59.3% Pi, 57.4% DeepSeek Harness, and 56.8% OpenCode) at $3.23 per task (vs. $6.70, $4.49, $12.76, and $5.16) and 31.7 minutes net runtime.
  • Wins even on GUI tasks: Without any domain-specific GUI tools, Freehand beats GUI-equipped harnesses on OSWorld 2.1 for both GPT-6-astra (76.2% at $3.96) and Claude Opus 5.5 (80.1% at $2.09) at roughly a quarter of the first-party cost and half the runtime.

Limitations and Future Work

The authors note several open directions:

  • Mapping the crossover point: Precisely characterizing how model scale, reasoning budget, and task horizon shift the threshold where harness presets stop helping and start hurting.
  • Post-training for minimal harnesses: Today’s frontier models are post-trained heavily on first-party tool schemas; training models directly with a shell, editable memory, and a meter could widen these gains.
  • Multi-agent extension: Applying the same principle to let models decide how to divide work among sub-agents and allocate explicit time and cost budgets.
  • Environment-level safety: Because Freehand delegates boundaries to the host rather than prompt rules, it pairs naturally with OS-level sandboxing and scoped permissions—an approach the authors suggest is both more capable and easier to secure.

Summary updated

BibTeX
@misc{zeng2026freehand,
  author = {Zezi Zeng and Yuke Zhao and Muzhao Tian and Yifan Yang and Qi Dai and Bei Liu and Kai Qiu and Bohan Zhuang and Jihua Zhu and Chong Luo},
  title = {{Freehand: The Bitter Lesson Comes to Agent Harnesses}},
  year = {2026},
  eprint = {2612.02442},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.02442},
}

Loading related content...

Figure