Meta-Harness: Agents Begin Automatically Optimizing Their Own Context and Running Code
Submitted on March 30, 2026, Meta-Harness automatically searches for LLM application harness code: text classification improves by 7.7 points with 4x reduction in context tokens, mathematical reasoning improves by an average of 4.7 points across five held-out models, and it surpasses the TerminalBench-2 manual baseline.
Model effectiveness increasingly depends on external storage, retrieval, and context organization code. Meta-Harness turns this manual engineering into an outer-loop search object, indicating that agent optimization will expand from prompts to the entire runtime framework.
The outer-loop agent can access candidate source code, scores, and historical execution traces, and propose new harness implementations accordingly. It leverages experience from the full file system to iterate across candidates, and validates transfer effects on classification, RAG math, and coding tasks respectively.
Context engineering, memory, and tool orchestration may form an automatic optimization layer, weakening the barriers of fixed prompt templates while increasing the importance of regression testing, version auditing, and security sandboxing.
Teams should treat harnesses as versioned software assets, using held-out sets and cost budgets to accept automatic optimization results, rather than directly allowing agents to self-modify runtime logic in production.
Need to examine search cost, overfitting, cross-data distribution stability, as well as permission, malicious code, and interpretability risks when automatically modifying harnesses.