mlsanityData to 13 Oct 2026

AutoHarness: improving LLM agents by automatically synthesizing a code harness

arXiv 2603.03329 ↗First posted 10 Feb 2026cs.CL cs.AIcited by 73

On the map: LLM agents and tool use → Reinforcement learning for LLM agents

Abstract (arXiv)

Despite significant strides in language models in the last few years, when used as agents, such models often try to perform actions that are not just suboptimal for a given state, but are strictly prohibited by the external environment. For example, in the recent Kaggle GameArena chess competition, 78% of Gemini-2.5-Flash losses were attributed to illegal moves. Often people manually write "harnesses" around LLMs to prevent such failures. In this paper, we demonstrate that Gemini-2.5-Flash can automatically synthesize such a code harness, using a small number of rounds of iterative code refinement given feedback from the (game) environment. The resulting harness prevents all illegal moves in 145 different TextArena games (both 1-player and 2-player), enabling the smaller Gemini-2.5-Flash model to outperform larger models, such as Gemini-2.5-Pro. Pushing our technique to the limit, we can get Gemini-2.5-Flash to generate the entire policy in code, thus eliminating the need to use the LLM at decision making time. The resulting code-policy receives a higher average reward than Gemini-2.5-Pro and GPT-5.2-High on 16 TextArena 1-player games. Our results show that using a smaller model to synthesize a custom code harness (or entire policy) can outperform a much larger model, while also being more cost effective.

Key facts. Cited by 73 papers in the map (data through 13 Oct 2026). Placed in Reinforcement learning for LLM agents, one of 16 directions in LLM agents and tool use. Builds on 17 of its 19 references that are in the map. First posted on arXiv 10 Feb 2026.

Builds on

17 of 19 references.

Closest ancestors · 2

Same direction, newest first

  1. 2023Voyager: An Open-Ended Embodied Agent with Large Language Models25 May
  2. 2023Reflexion: Language Agents with Verbal Reinforcement Learning20 Mar

Other references · 15

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,376
  2. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,181
  3. 2022Competition-Level Code Generation with AlphaCodecited by 1,445
  4. 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,186
  5. 2025AlphaEvolve: A coding agent for scientific and algorithmic discoverycited by 819
  6. 2023Eureka: Human-Level Reward Design via Coding Large Language Modelscited by 549
  7. 2023On the Planning Abilities of Large Language Models : A Critical Investigationcited by 310
  8. 2024GTBench: Uncovering the Strategic Reasoning Limitations of LLMs via Game-Theoretic Evaluationscited by 118
  9. 2025Gold-medalist Performance in Solving Olympiad Geometry with AlphaGeometry2cited by 95
  10. 2025Winning Gold at IMO 2025 with a Model-Agnostic Verification-and-Refinement Pipelinecited by 80
  11. 2025Proof or Bluff? Evaluating LLMs on 2025 USA Math Olympiadcited by 72
  12. 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoffcited by 50
3 more
  1. 2024LMAct: A Benchmark for In-Context Imitation Learning with Long Multimodal Demonstrationscited by 32
  2. 2025Code World Models for General Game Playingcited by 25
  3. 2025ACPBench Hard: Unrestrained Reasoning about Action, Change, and Planningcited by 7

Built on by

Cited by year (2026 to 13 Oct)

Citing papers per year: 2026: 73.

73 papers.

Sort:

By area:

  1. 2026Natural-Language Agent Harnessescited by 58
  2. 2026Code as Agent Harnesscited by 44
  3. 2026Agent-World: Scaling Real-World Environment Synthesis for Evolving General Agent Intelligencecited by 39
  4. 2026Stop Comparing LLM Agents Without Disclosing the Harnesscited by 32
  5. 2026Recursive Harness Self-Improvementcited by 27
  6. 2026From Failed Trajectories to Reliable LLM Agents: Diagnosing and Repairing Harness Flawscited by 26
  7. 2026HarnessForge: Joint Harness and Policy Evolution for Adaptive Agent Systemscited by 20
  8. 2026SafeHarness: Lifecycle-Integrated Security Architecture for LLM-based Agent Deploymentcited by 15
  9. 2026Toward Generalist Autonomous Research via Hypothesis-Tree Refinementcited by 15
  10. 2026Harness-R1: Learning to Edit Executable Runtime Harnesses from Agent Failure Trajectoriescited by 14
  11. 2026AutoSaddler: Automatic Harness Optimization with Durable Updates from Agent Execution Tracescited by 14
  12. 2026Evo-Harness: Context-to-Harness Skill Compilation for Self-Evolving Agentscited by 13
38 more
  1. 2026Who&When Pro: Can LLMs Really Attribute Failures in AI Agents?cited by 12
  2. 2026JIT-Agent: Scaling Harness Intelligence via Just-in-Time Harness Evolutioncited by 12
  3. 2026Agentic Forecasting using Sequential Bayesian Updating of Linguistic Beliefscited by 10
  4. 2026Self-Evolving Embodied Agents via Skill-Harness Evolutioncited by 9
  5. 2026WikiSkill: Compiling Agent Experience into Persistent Knowledge for Skill Evolutioncited by 8
  6. 2026AutoPyVerifier: Learning Compact Executable Verifiers for Large Language Model Outputscited by 7
  7. 2026Training with Harnesses: On-Policy Harness Self-Distillation for Complex Reasoningcited by 7
  8. 2026FutureSim: Replaying World Events to Evaluate Adaptive Agentscited by 7
  9. 2026Phantom Guardrails: When Self-Improving Agent Harnesses Fix Failures That Never Happenedcited by 7
  10. 2026Verify Smarter, Evolve Further: Efficient Harness Evolution through Behavior-Aware Verificationcited by 7
  11. 2026ModularRSI: Modular and Generalizable Recursive Harness Self-Improvementcited by 7
  12. 2026Automated Discovery Has No Universally Superior Harnesscited by 6
  13. 2026Hierarchical Self-Improvement: A Framework for Task-Specific Evolvable Agent Harnessescited by 6
  14. 2026DemoEvolve: Overcoming Sparse Feedback in Agentic Harness Evolution with Demonstrationscited by 5
  15. 2026COMFYCLAW: Self-Evolving Skill Harnesses for Image Generation Workflowscited by 5
  16. 2026RRSI: Regularized Recursive Self-Improvement of Agent Harnessescited by 5
  17. 2026PILOT in the Loop: Live Self-Improvement for Long-Horizon Agentscited by 3
  18. 2026Harness-of-Harness: Multi-Day Autonomous Software Development with Continual Improvementcited by 3
  19. 2026SoL-Pi: Recursively Scaling Auto-Research Loops for Efficient Agent Harnesscited by 3
  20. 2026FlashEvolve: Accelerating Agent Self-Evolution with Asynchronous Stage Orchestrationcited by 2
  21. 2026Governed Evolution of Agent Runtimes through Executable Operational Cognitioncited by 2
  22. 2026Autonomous heterogeneous catalyst discovery with a self-evolving multi-agent digital twincited by 2
  23. 2026Grow the Harness, Not the Context: From Strategy-Free Scaffolds to Reusable Specialist Agentscited by 2
  24. 2026Harnessing Pre-Resolution Signals for Future Prediction Agentscited by 1
  25. 2026Agentic MIP Research: Accelerated Constraint Handler Generationcited by 1
  26. 2026Think-Before-Speak: From Internal Evaluation to Public Expression in Multi-Agent Social Simulationcited by 1
  27. 2026Agent Against Agent: An Agentic System for Automatic Prompt Injection Red Teamingcited by 1
  28. 2026EvoHarness-RL: Learning Self-Evolving Runtime Harness for Long-Horizon LLM Agentscited by 1
  29. 2026ADIAS: Automated Design of Interactive Agentic Systemscited by 1
  30. 2026Terminal Agents: A Survey of AI Agents in Command-Line Environmentscited by 1
  31. 2026The Agent Use of Agent Beings: Agent Cybernetics Is the Missing Science of Foundation Agentscited by 0
  32. 2026Draw2Think: Harnessing Geometry Reasoning through Constraint Engine Interactioncited by 0
  33. 2026MUSE: A Unified Agentic Harness for MLLMscited by 0
  34. 2026Agent-Native Immune System: Architecture, Taxonomy, and Engineeringcited by 0
  35. 2026Eta Given Delta: Defining LLM Tool Efficiency With Marginal Tool Utilitycited by 0
  36. 2026DocAtlas: Long-Document Understanding as Mutable-State Interactioncited by 0
  37. 2026SBCO: Self-Supervised, Verifier-Grounded Harness Optimization For Planning Agentscited by 0
  38. 2026CTIFoundry: An Agent-Native Corpus Scaffold for Cyber Threat Intelligencecited by 0

50 most cited of 73 All 73 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2026Exploring the Agentic Frontier of Verilog Code Generation
  2. 2025AutoPDL: Automatic Prompt Optimization for LLM Agents
  3. 2025AutoAgent: A Fully-Automated and Zero-Code Framework for LLM Agents
  4. 2026OptiArena: Can LLMs Improve Executable Algorithms under Fixed Resource Budgets?
  5. 2026Environment-Grounded Automated Prompt Optimization for LLM Game Agents
  6. 2024Executable Code Actions Elicit Better LLM Agents
  7. 2024Game Agent Driven by Free-Form Text Command: Using LLM-based Code Generation and Behavior Branch
  8. 2026Distilling Game Code World Model Generation into Lightweight Large Language Models