AutoHarness: improving LLM agents by automatically synthesizing a code harness
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
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Models25 May
- 2023Reflexion: Language Agents with Verbal Reinforcement Learning20 Mar
Other references · 15
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,376
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,181
- 2022Competition-Level Code Generation with AlphaCodecited by 1,445
- 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,186
- 2025AlphaEvolve: A coding agent for scientific and algorithmic discoverycited by 819
- 2023Eureka: Human-Level Reward Design via Coding Large Language Modelscited by 549
- 2023On the Planning Abilities of Large Language Models : A Critical Investigationcited by 310
- 2024GTBench: Uncovering the Strategic Reasoning Limitations of LLMs via Game-Theoretic Evaluationscited by 118
- 2025Gold-medalist Performance in Solving Olympiad Geometry with AlphaGeometry2cited by 95
- 2025Winning Gold at IMO 2025 with a Model-Agnostic Verification-and-Refinement Pipelinecited by 80
- 2025Proof or Bluff? Evaluating LLMs on 2025 USA Math Olympiadcited by 72
- 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoffcited by 50
Built on by
Citing papers per year: 2026: 73.
73 papers.
Sort:
By area:
- 2026Natural-Language Agent Harnessescited by 58
- 2026Code as Agent Harnesscited by 44
- 2026Agent-World: Scaling Real-World Environment Synthesis for Evolving General Agent Intelligencecited by 39
- 2026Stop Comparing LLM Agents Without Disclosing the Harnesscited by 32
- 2026Recursive Harness Self-Improvementcited by 27
- 2026From Failed Trajectories to Reliable LLM Agents: Diagnosing and Repairing Harness Flawscited by 26
- 2026HarnessForge: Joint Harness and Policy Evolution for Adaptive Agent Systemscited by 20
- 2026SafeHarness: Lifecycle-Integrated Security Architecture for LLM-based Agent Deploymentcited by 15
- 2026Toward Generalist Autonomous Research via Hypothesis-Tree Refinementcited by 15
- 2026Harness-R1: Learning to Edit Executable Runtime Harnesses from Agent Failure Trajectoriescited by 14
- 2026AutoSaddler: Automatic Harness Optimization with Durable Updates from Agent Execution Tracescited by 14
- 2026Evo-Harness: Context-to-Harness Skill Compilation for Self-Evolving Agentscited by 13
38 more
- 2026Who&When Pro: Can LLMs Really Attribute Failures in AI Agents?cited by 12
- 2026JIT-Agent: Scaling Harness Intelligence via Just-in-Time Harness Evolutioncited by 12
- 2026Agentic Forecasting using Sequential Bayesian Updating of Linguistic Beliefscited by 10
- 2026Self-Evolving Embodied Agents via Skill-Harness Evolutioncited by 9
- 2026WikiSkill: Compiling Agent Experience into Persistent Knowledge for Skill Evolutioncited by 8
- 2026AutoPyVerifier: Learning Compact Executable Verifiers for Large Language Model Outputscited by 7
- 2026Training with Harnesses: On-Policy Harness Self-Distillation for Complex Reasoningcited by 7
- 2026FutureSim: Replaying World Events to Evaluate Adaptive Agentscited by 7
- 2026Phantom Guardrails: When Self-Improving Agent Harnesses Fix Failures That Never Happenedcited by 7
- 2026Verify Smarter, Evolve Further: Efficient Harness Evolution through Behavior-Aware Verificationcited by 7
- 2026ModularRSI: Modular and Generalizable Recursive Harness Self-Improvementcited by 7
- 2026Automated Discovery Has No Universally Superior Harnesscited by 6
- 2026Hierarchical Self-Improvement: A Framework for Task-Specific Evolvable Agent Harnessescited by 6
- 2026DemoEvolve: Overcoming Sparse Feedback in Agentic Harness Evolution with Demonstrationscited by 5
- 2026COMFYCLAW: Self-Evolving Skill Harnesses for Image Generation Workflowscited by 5
- 2026RRSI: Regularized Recursive Self-Improvement of Agent Harnessescited by 5
- 2026PILOT in the Loop: Live Self-Improvement for Long-Horizon Agentscited by 3
- 2026Harness-of-Harness: Multi-Day Autonomous Software Development with Continual Improvementcited by 3
- 2026SoL-Pi: Recursively Scaling Auto-Research Loops for Efficient Agent Harnesscited by 3
- 2026FlashEvolve: Accelerating Agent Self-Evolution with Asynchronous Stage Orchestrationcited by 2
- 2026Governed Evolution of Agent Runtimes through Executable Operational Cognitioncited by 2
- 2026Autonomous heterogeneous catalyst discovery with a self-evolving multi-agent digital twincited by 2
- 2026Grow the Harness, Not the Context: From Strategy-Free Scaffolds to Reusable Specialist Agentscited by 2
- 2026Harnessing Pre-Resolution Signals for Future Prediction Agentscited by 1
- 2026Agentic MIP Research: Accelerated Constraint Handler Generationcited by 1
- 2026Think-Before-Speak: From Internal Evaluation to Public Expression in Multi-Agent Social Simulationcited by 1
- 2026Agent Against Agent: An Agentic System for Automatic Prompt Injection Red Teamingcited by 1
- 2026EvoHarness-RL: Learning Self-Evolving Runtime Harness for Long-Horizon LLM Agentscited by 1
- 2026ADIAS: Automated Design of Interactive Agentic Systemscited by 1
- 2026Terminal Agents: A Survey of AI Agents in Command-Line Environmentscited by 1
- 2026The Agent Use of Agent Beings: Agent Cybernetics Is the Missing Science of Foundation Agentscited by 0
- 2026Draw2Think: Harnessing Geometry Reasoning through Constraint Engine Interactioncited by 0
- 2026MUSE: A Unified Agentic Harness for MLLMscited by 0
- 2026Agent-Native Immune System: Architecture, Taxonomy, and Engineeringcited by 0
- 2026Eta Given Delta: Defining LLM Tool Efficiency With Marginal Tool Utilitycited by 0
- 2026DocAtlas: Long-Document Understanding as Mutable-State Interactioncited by 0
- 2026SBCO: Self-Supervised, Verifier-Grounded Harness Optimization For Planning Agentscited by 0
- 2026CTIFoundry: An Agent-Native Corpus Scaffold for Cyber Threat Intelligencecited by 0
50 most cited of 73 All 73 (JSON)
- 2026FreeEvolve: Learning to Evolve Beyond Fixed Loops6 Oct 2026
- 2026PhysEvo: Astra Can Act, Let It6 Oct 2026
- 2026Test-Time Adaptation of Reasoning Strategies with Bayesian Nonparametric Memory5 Oct 2026
- 2026MESH-Harness: Self-Improving Agent Harnesses via Bandit-Guided Compositional Evolution4 Oct 2026
- 2026Causal Improvement Graph for Agentic Harness Optimization4 Oct 2026
- 2026Complex Agents, Shallow Tests: Demystifying and Enhancing Test Adequacy of Agent Harness in the Wild4 Oct 2026
- 2026Sentry: Learning to Recover from LLM Agent Failures at Test Time2 Oct 2026
- 2026HASTE: Evolving Agent Harnesses Against Emerging Attacks Using Sparse Evidence2 Oct 2026
- 2026Scaling Trajectories for Complex Tasks through Recursive Self-Rewrite2 Oct 2026
- 2026VideoEvolve: Evolving Agent Harnesses for Video Temporal Grounding1 Oct 2026
- 2026Benchmarking Prompt Optimization of Large Language Models With Chess30 Sep 2026
- 2026Learning from Research: Toward Lifelong Agent Harness Evolution30 Sep 2026
38 more
- 2026VidHarness: Evolving Agent Harnesses for Cost-Efficient Long Video Understanding29 Sep 2026
- 2026Thinking Before Thinking: Scaling Agentic Inference Through Meta-Reasoning29 Sep 2026
- 2026Harness Evolution as Learning: Approximation, Generalization, and Optimization Limits of Self-Improving Personal Agents29 Sep 2026
- 2026Harness Learning Enables Generalizable Test-Time Adaptation28 Sep 2026
- 2026LiteEvo: Automated, Cost-Efficient Harness Evolution for Generalization to Unseen Tasks27 Sep 2026
- 2026HM-ROUTER: Joint Model and Harness Routing for Agentic Systems26 Sep 2026
- 2026Mara Chain: Rethinking Failure as a Stepping Stone for AI System Auto-Evolution25 Sep 2026
- 2026MoMHa: Multi-Objective Optimization of LLM Harnesses over Accuracy, Safety, and Tokens25 Sep 2026
- 2026Qwen-Planner-Agent: A Closed-Loop AI-for-AI Framework for Real-World Mobile Planner Agents24 Sep 2026
- 2026Grow the Harness, Not the Context: From Strategy-Free Scaffolds to Reusable Specialist Agents22 Sep 2026
- 2026RRSI: Regularized Recursive Self-Improvement of Agent Harnesses21 Sep 2026
- 2026SoL-Pi: Recursively Scaling Auto-Research Loops for Efficient Agent Harness17 Sep 2026
- 2026ModularRSI: Modular and Generalizable Recursive Harness Self-Improvement14 Sep 2026
- 2026Harness-of-Harness: Multi-Day Autonomous Software Development with Continual Improvement1 Sep 2026
- 2026CineForge: Self-Improving Agents for Long-Horizon Video Generation30 Aug 2026
- 2026WikiSkill: Compiling Agent Experience into Persistent Knowledge for Skill Evolution27 Aug 2026
- 2026Verify Smarter, Evolve Further: Efficient Harness Evolution through Behavior-Aware Verification27 Aug 2026
- 2026PILOT in the Loop: Live Self-Improvement for Long-Horizon Agents27 Aug 2026
- 2026JIT-Agent: Scaling Harness Intelligence via Just-in-Time Harness Evolution26 Aug 2026
- 2026AutoSaddler: Automatic Harness Optimization with Durable Updates from Agent Execution Traces24 Aug 2026
- 2026Terminal Agents: A Survey of AI Agents in Command-Line Environments20 Aug 2026
- 2026CTIFoundry: An Agent-Native Corpus Scaffold for Cyber Threat Intelligence19 Aug 2026
- 2026Evo-Harness: Context-to-Harness Skill Compilation for Self-Evolving Agents15 Aug 2026
- 2026Self-Evolving Embodied Agents via Skill-Harness Evolution11 Aug 2026
- 2026SBCO: Self-Supervised, Verifier-Grounded Harness Optimization For Planning Agents10 Aug 2026
- 2026Hierarchical Self-Improvement: A Framework for Task-Specific Evolvable Agent Harnesses9 Aug 2026
- 2026EvoHarness-RL: Learning Self-Evolving Runtime Harness for Long-Horizon LLM Agents5 Aug 2026
- 2026Agent Against Agent: An Agentic System for Automatic Prompt Injection Red Teaming5 Aug 2026
- 2026ADIAS: Automated Design of Interactive Agentic Systems3 Aug 2026
- 2026Harness-R1: Learning to Edit Executable Runtime Harnesses from Agent Failure Trajectories3 Aug 2026
- 2026DocAtlas: Long-Document Understanding as Mutable-State Interaction21 Jul 2026
- 2026Automated Discovery Has No Universally Superior Harness20 Jul 2026
- 2026Recursive Harness Self-Improvement17 Jul 2026
- 2026Phantom Guardrails: When Self-Improving Agent Harnesses Fix Failures That Never Happened13 Jul 2026
- 2026Who&When Pro: Can LLMs Really Attribute Failures in AI Agents?10 Jul 2026
- 2026COMFYCLAW: Self-Evolving Skill Harnesses for Image Generation Workflows2 Jul 2026
- 2026Agent-Native Immune System: Architecture, Taxonomy, and Engineering26 Jun 2026
- 2026Toward Generalist Autonomous Research via Hypothesis-Tree Refinement10 Jun 2026
50 newest of 73 All 73 (JSON)
- 2026Code as Agent Harnesscited by 44
- 2026Agent-World: Scaling Real-World Environment Synthesis for Evolving General Agent Intelligencecited by 39
- 2026Stop Comparing LLM Agents Without Disclosing the Harnesscited by 32
- 2026From Failed Trajectories to Reliable LLM Agents: Diagnosing and Repairing Harness Flawscited by 26
- 2026HarnessForge: Joint Harness and Policy Evolution for Adaptive Agent Systemscited by 20
- 2026SafeHarness: Lifecycle-Integrated Security Architecture for LLM-based Agent Deploymentcited by 15
- 2026Harness-R1: Learning to Edit Executable Runtime Harnesses from Agent Failure Trajectoriescited by 14
- 2026AutoSaddler: Automatic Harness Optimization with Durable Updates from Agent Execution Tracescited by 14
- 2026Evo-Harness: Context-to-Harness Skill Compilation for Self-Evolving Agentscited by 13
- 2026Who&When Pro: Can LLMs Really Attribute Failures in AI Agents?cited by 12
- 2026JIT-Agent: Scaling Harness Intelligence via Just-in-Time Harness Evolutioncited by 12
- 2026Agentic Forecasting using Sequential Bayesian Updating of Linguistic Beliefscited by 10
12 most cited of 45 All 45 (JSON)
- 2026FreeEvolve: Learning to Evolve Beyond Fixed Loops6 Oct 2026
- 2026MESH-Harness: Self-Improving Agent Harnesses via Bandit-Guided Compositional Evolution4 Oct 2026
- 2026Causal Improvement Graph for Agentic Harness Optimization4 Oct 2026
- 2026Complex Agents, Shallow Tests: Demystifying and Enhancing Test Adequacy of Agent Harness in the Wild4 Oct 2026
- 2026Sentry: Learning to Recover from LLM Agent Failures at Test Time2 Oct 2026
- 2026VideoEvolve: Evolving Agent Harnesses for Video Temporal Grounding1 Oct 2026
- 2026Learning from Research: Toward Lifelong Agent Harness Evolution30 Sep 2026
- 2026Thinking Before Thinking: Scaling Agentic Inference Through Meta-Reasoning29 Sep 2026
- 2026Harness Evolution as Learning: Approximation, Generalization, and Optimization Limits of Self-Improving Personal Agents29 Sep 2026
- 2026Harness Learning Enables Generalizable Test-Time Adaptation28 Sep 2026
- 2026LiteEvo: Automated, Cost-Efficient Harness Evolution for Generalization to Unseen Tasks27 Sep 2026
- 2026HM-ROUTER: Joint Model and Harness Routing for Agentic Systems26 Sep 2026
12 newest of 45 All 45 (JSON)
- 2026Training with Harnesses: On-Policy Harness Self-Distillation for Complex Reasoningcited by 7
- 2026Think-Before-Speak: From Internal Evaluation to Public Expression in Multi-Agent Social Simulationcited by 1
- 2026The Agent Use of Agent Beings: Agent Cybernetics Is the Missing Science of Foundation Agentscited by 0
- 2026Draw2Think: Harnessing Geometry Reasoning through Constraint Engine Interactioncited by 0
- 2026Test-Time Adaptation of Reasoning Strategies with Bayesian Nonparametric Memorycited by 0
- 2026Test-Time Adaptation of Reasoning Strategies with Bayesian Nonparametric Memory5 Oct 2026
- 2026Think-Before-Speak: From Internal Evaluation to Public Expression in Multi-Agent Social Simulation2 Jun 2026
- 2026Draw2Think: Harnessing Geometry Reasoning through Constraint Engine Interaction20 May 2026
- 2026The Agent Use of Agent Beings: Agent Cybernetics Is the Missing Science of Foundation Agents11 May 2026
- 2026Training with Harnesses: On-Policy Harness Self-Distillation for Complex Reasoning9 May 2026
- 2026Recursive Harness Self-Improvementcited by 27
- 2026ModularRSI: Modular and Generalizable Recursive Harness Self-Improvementcited by 7
- 2026COMFYCLAW: Self-Evolving Skill Harnesses for Image Generation Workflowscited by 5
- 2026SBCO: Self-Supervised, Verifier-Grounded Harness Optimization For Planning Agentscited by 0
- 2026ModularRSI: Modular and Generalizable Recursive Harness Self-Improvement14 Sep 2026
- 2026SBCO: Self-Supervised, Verifier-Grounded Harness Optimization For Planning Agents10 Aug 2026
- 2026Recursive Harness Self-Improvement17 Jul 2026
- 2026COMFYCLAW: Self-Evolving Skill Harnesses for Image Generation Workflows2 Jul 2026
- 2026Natural-Language Agent Harnessescited by 58
- 2026Toward Generalist Autonomous Research via Hypothesis-Tree Refinementcited by 15
- 2026WikiSkill: Compiling Agent Experience into Persistent Knowledge for Skill Evolutioncited by 8
- 2026AutoPyVerifier: Learning Compact Executable Verifiers for Large Language Model Outputscited by 7
- 2026FutureSim: Replaying World Events to Evaluate Adaptive Agentscited by 7
- 2026Automated Discovery Has No Universally Superior Harnesscited by 6
- 2026PILOT in the Loop: Live Self-Improvement for Long-Horizon Agentscited by 3
- 2026Autonomous heterogeneous catalyst discovery with a self-evolving multi-agent digital twincited by 2
- 2026Harnessing Pre-Resolution Signals for Future Prediction Agentscited by 1
- 2026Agent-Native Immune System: Architecture, Taxonomy, and Engineeringcited by 0
- 2026DocAtlas: Long-Document Understanding as Mutable-State Interactioncited by 0
- 2026MoMHa: Multi-Objective Optimization of LLM Harnesses over Accuracy, Safety, and Tokenscited by 0
12 most cited of 17 All 17 (JSON)
- 2026PhysEvo: Astra Can Act, Let It6 Oct 2026
- 2026HASTE: Evolving Agent Harnesses Against Emerging Attacks Using Sparse Evidence2 Oct 2026
- 2026Scaling Trajectories for Complex Tasks through Recursive Self-Rewrite2 Oct 2026
- 2026Benchmarking Prompt Optimization of Large Language Models With Chess30 Sep 2026
- 2026Mara Chain: Rethinking Failure as a Stepping Stone for AI System Auto-Evolution25 Sep 2026
- 2026MoMHa: Multi-Objective Optimization of LLM Harnesses over Accuracy, Safety, and Tokens25 Sep 2026
- 2026WikiSkill: Compiling Agent Experience into Persistent Knowledge for Skill Evolution27 Aug 2026
- 2026PILOT in the Loop: Live Self-Improvement for Long-Horizon Agents27 Aug 2026
- 2026DocAtlas: Long-Document Understanding as Mutable-State Interaction21 Jul 2026
- 2026Automated Discovery Has No Universally Superior Harness20 Jul 2026
- 2026Agent-Native Immune System: Architecture, Taxonomy, and Engineering26 Jun 2026
- 2026Toward Generalist Autonomous Research via Hypothesis-Tree Refinement10 Jun 2026
12 newest of 17 All 17 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026Exploring the Agentic Frontier of Verilog Code Generation
- 2025AutoPDL: Automatic Prompt Optimization for LLM Agents
- 2025AutoAgent: A Fully-Automated and Zero-Code Framework for LLM Agents
- 2026OptiArena: Can LLMs Improve Executable Algorithms under Fixed Resource Budgets?
- 2026Environment-Grounded Automated Prompt Optimization for LLM Game Agents
- 2024Executable Code Actions Elicit Better LLM Agents
- 2024Game Agent Driven by Free-Form Text Command: Using LLM-based Code Generation and Behavior Branch
- 2026Distilling Game Code World Model Generation into Lightweight Large Language Models