English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Meta-Harness Explained: Stanford's AI That Automatically Optimizes Its Own Model Harness

Forum topic · 小凯 · 2026-04-04

Summary

Meta-Harness is a joint research project from Stanford, MIT, and KRAFTON (arXiv:2603.28052) that automates the optimization of LLM harnesses—the code surrounding a model that decides what information to store, retrieve, and present. Instead of hand-designing harnesses or using text optimizers that aggressively compress feedback, Meta-Harness lets a coding agent (Claude Code) browse a file system containing all historical candidates, full execution traces, and scores—up to 10 million tokens of context, roughly 300-10,000x more than prior methods. On online text classification, it beats the hand-designed SOTA (ACE) by 7.7 points while using 4x fewer tokens. A single discovered harness transfers across five unseen models with an average +4.7 point gain on 200 IMO-level retrieval-augmented math problems, and it outperforms hand-built harnesses on TerminalBench-2 agentic coding. The key insight: full access to execution traces, not summaries, enables the agent to form causal hypotheses about failures and iteratively improve harness code.

Overview

Meta-Harness: End-to-End Optimization of Model Harnesses is a research paper from Stanford, MIT, and KRAFTON (arXiv: 2603.28052, 2026-03-30) by Yoonho Lee, Roshen Nair, Qizheng Zhang, Kangwook Lee, Omar Khattab, and Chelsea Finn. Its core proposition: harness engineering should not be done by hand—let a coding agent automatically search and optimize it.

What is a Harness?

A harness is the code surrounding an LLM that determines:

  • What information to store
  • How to retrieve it
  • What to present to the model
  • The paper notes that changing the harness of a fixed LLM can produce a 6x performance gap on the same benchmark—as important as the model itself. Yet harnesses remain largely hand-designed, and existing text optimizers compress feedback too aggressively, retaining only scalar scores or short summaries and losing critical diagnostic signal.

    Core Idea

    The approach is deliberately "brute-force":

    > Don't compress anything. Store everything, and let a coding agent browse, analyze, and summarize it to write better harnesses.

    Search Loop

    1. A file system D stores all history: candidate harness source code, execution traces (prompts, tool calls, outputs), and evaluation scores. 2. A coding agent (Claude Code) queries the file system with standard tools (grep, cat). 3. The agent generates a new harness, which is evaluated. 4. Results are saved back to the file system, and the loop repeats.

    | Design | Traditional methods | Meta-Harness | |---|---|---| | History | Last N candidates | Full history | | Feedback | Scalar scores or brief summaries | Full source + traces | | Retrieval | Prompt input | File system queries | | Context | Up to ~26K tokens | Up to 10M tokens |

    Compared to Self-Refine, OPRO, TextGrad, MIPRO, AlphaEvolve, GEPA, Feedback Descent, and TTT-Discover (which use 0.001M–0.026M tokens per iteration), Meta-Harness uses 10.0M—roughly 300–10,000x more context.

    Experimental Results

    Online Text Classification

    | Method | Accuracy | Context tokens | |---|---|---| | ACE (hand-designed SOTA) | 40.9% | 50.8K | | Meta-Harness | 48.6% | 11.4K |

    Meta-Harness matches in 4 iterations what other optimizers need 60 iterations for, and finishes 10+ points ahead.

    Retrieval-Augmented Math (IMO-level)

    On 200 IMO-level problems, a single Meta-Harness-discovered harness averaged +4.7 points across five held-out models: GPT-OSS-20B, GPT-5.4-nano, GPT-5.4-mini, Gemini-3.1-Flash-Lite, and Gemini-3-Flash.

    Agentic Coding (TerminalBench-2)

    | Model | Harness | Pass rate | |---|---|---| | Claude Opus 4.6 | Terminus-KIRA (hand-made) | 74.7% | | Claude Opus 4.6 | Meta-Harness | 76.4% (#2) | | Claude Haiku 4.5 | Goose (best reported) | 35.5% | | Claude Haiku 4.5 | Meta-Harness | 37.6% (#1) |

    Why It Works

    1. Information preservation: Full execution traces let the agent trace failures back to specific harness decisions and form causal hypotheses ("this change caused that regression"). Summaries do not recover the missing signal. 2. Code-space search: Small harness changes may only show effects many steps later, so local heuristics fit poorly; code representation also provides natural regularization, since coding models propose coherent algorithms. 3. Autonomous diagnosis: Search trajectories show the agent isolating structural changes from prompt rewrites after observing regressions, then shifting to safer additive modifications.

    Build to Delete

    Citing Anthropic's practice: the Opus 4.5 harness was heavy (GAN-adversarial architecture, three-agent division of labor, $200 / 6 hours), while the Opus 4.6 harness was simplified (no sprint decomposition, $125 / 3.8 hours) and performed better. Harnesses must evolve continuously as model capabilities move.

    Implications

  • Paradigm shift: from hand-designed, one-off harnesses to data-driven, continuously evolving ones.
  • Relation to DSPy: co-author Omar Khattab created DSPy; Meta-Harness extends declarative LLM program optimization to end-to-end harness code search.
  • For agent systems: file system as uncompressed memory, coding agent as optimizer, and a minimal outer loop (evaluate → save → analyze → generate → repeat).
  • Key Quotes

    > "The performance of large language model (LLM) systems depends not only on model weights, but also on their harness: the code that determines what information to store, retrieve, and present to the model."

    > "Full access to execution traces is the most important component of the interface: summaries do not recover the missing signal."

    References

  • arXiv: https://arxiv.org/abs/2603.28052
  • PDF: https://arxiv.org/pdf/2603.28052
  • Author page: https://yoonholee.com/meta-harness/
  • Video: https://www.bilibili.com/video/BV1rQ9JBoECh/

Tags

#meta-harness#llm-optimization#stanford#coding-agents#harness-engineering#dspy#automated-optimization#agentic-coding

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177169533