mlsanityData to 7 Oct 2026

From Failed Trajectories to Reliable LLM Agents: Diagnosing and Repairing Harness Flaws

arXiv 2606.06324 ↗First posted 4 Jun 2026cs.SE cs.MAcited by 21

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

LLM agents increasingly rely on agent harness: the runtime infrastructure around the base model that defines execution environments, tool interfaces, context, lifecycle orchestration, observability, verification, and governance. Existing self-improving agents and automatic harness evolution methods mainly improve agents through runtime supervision, prompt optimization, workflow search, or harness modification based on final outcomes. However, they often fail to diagnose where the responsible evidence lies in failed trajectories and which harness implementation mechanism causes the unreliable behavior, resulting in broad, indirect, or poorly scoped changes. This paper proposes HarnessFix, a trace-grounded and diagnosis-driven framework for repairing agent harnesses. HarnessFix compiles raw execution traces and harness artifacts into a Harness-aware Trace Intermediate Representation (HTIR), which normalizes fragmented trajectory evidence, captures step-level data-flow and control-flow relations, and aligns runtime steps with the harness artifacts that shape their behavior. It then attributes failures to responsible steps and harness artifacts, and consolidates recurring diagnoses into repair-oriented flaw records. Finally, HarnessFix maps these records to scoped repair operators, generates patches under flaw-specific repair specifications, and accepts them through regression-aware validation. We evaluate HarnessFix on four popular benchmarks, and results show that it improves the performance over the initial harnesses by 6.3% to 18.4%, significantly outperforming human-designed and self-evolution baselines. HarnessFix highlights the value of treating failed trajectories not only as feedback signals, but also as structured evidence for diagnosing and repairing the harness mechanisms behind agent failures.

Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 61 of its 80 references that are in the map. First posted on arXiv 4 Jun 2026.

Builds on

61 of 80 references.

Closest ancestors · 24

Same direction, newest first

  1. 2026Agentic Harness Engineering: Observability-Driven Automatic Evolution of Coding-Agent Harnesses28 Apr
  2. 2026AgentEval: DAG-Structured Step-Level Evaluation for Agentic Workflows with Error Propagation Tracking26 Apr
  3. 2026Synthesizing Multi-Agent Harnesses for Vulnerability Discovery22 Apr
  4. 2026SWE-TRACE: Optimizing Long-Horizon SWE Agents Through Rubric Process Reward Models and Heuristic Test-Time Scaling16 Apr
  5. 2026Beyond Resolution Rates: Behavioral Drivers of Coding Agent Success and Failure2 Apr
  6. 2026From Flat Logs to Causal Graphs: Hierarchical Failure Attribution for LLM-based Multi-Agent Systems27 Feb
  7. 2026Wink: Recovering from Misbehaviors in Coding Agents19 Feb
  8. 2026AgentFixer: From Failure Detection to Fix Recommendations in LLM Agentic Systems18 Feb
  9. 2026When Agents Fail: A Comprehensive Study of Bugs in LLM Agents with Automated Labeling21 Jan
  10. 2026MAESTRO: Multi-Agent Evaluation Suite for Testing, Reliability, and Observability1 Jan
  11. 2025DoVer: Intervention-Driven Auto Debugging for LLM Multi-Agent Systems7 Dec
  12. 2025Process-Centric Analysis of Agentic Software Systems2 Dec
12 more
  1. 2025Huxley-G"odel Machine: Human-Level Coding Agent Development by an Approximation of the Optimal Self-Improving Machine24 Oct
  2. 2025Who is Introducing the Failure? Automatically Attributing Failures of Multi-Agent Systems via Spectrum Analysis17 Sep
  3. 2025AgenTracer: Who Is Inducing Failure in the LLM Agentic Systems?3 Sep
  4. 2025Trae Agent: An LLM-based Agent for Software Engineering with Test-time Scaling31 Jul
  5. 2025Understanding Software Engineering Agents: A Study of Thought-Action-Result Trajectories23 Jun
  6. 2025Which Agent Causes Task Failures and When? On Automated Failure Attribution of LLM Multi-Agent Systems30 Apr
  7. 2024Self-Evolving Multi-Agent Collaboration Networks for Software Development22 Oct
  8. 2024AFlow: Automating Agentic Workflow Generation14 Oct
  9. 2024AppWorld: A Controllable World of Apps and People for Benchmarking Interactive Coding Agents26 Jul
  10. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
  11. 2024AutoFlow: Automated Workflow Generation for Large Language Model Agents1 Jul
  12. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May

Other references · 37

  1. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  2. 2023GAIA: a benchmark for General AI Assistantscited by 1,084
  3. 2025A-MEM: Agentic Memory for LLM Agentscited by 1,000
  4. 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 515
  5. 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 449
  6. 2024Automated Design of Agentic Systemscited by 360
  7. 2025Agentic Context Engineering: Evolving Contexts for Self-Improving Language Modelscited by 349
  8. 2024Agent Workflow Memorycited by 342
  9. 2025Darwin Godel Machine: Open-Ended Evolution of Self-Improving Agentscited by 294
  10. 2023Large Language Models as Tool Makerscited by 293
  11. 2026Meta-Harness: End-to-End Optimization of Model Harnessescited by 248
  12. 2025Multi-agent Architecture Search via Agentic Supernetcited by 164
25 more
  1. 2026Trace2Skill: Distill Trajectory-Local Lessons into Transferable Agent Skillscited by 161
  2. 2024AgentSquare: Automatic LLM Agent Search in Modular Design Spacecited by 141
  3. 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
  4. 2023CREATOR: Tool Creation for Disentangling Abstract and Concrete Reasoning of Large Language Modelscited by 90
  5. 2025Agent KB: Leveraging Cross-Domain Experience for Agentic Problem Solvingcited by 90
  6. 2023Impact of Code Language Models on Automated Program Repaircited by 85
  7. 2025MemInsight: Autonomous Memory Augmentation for LLM Agentscited by 84
  8. 2024ToolGen: Unified Tool Retrieval and Calling via Generationcited by 72
  9. 2025MiroThinker: Pushing the Performance Boundaries of Open-Source Research Agents via Model, Context, and Interactive Scalingcited by 72
  10. 2026AutoHarness: improving LLM agents by automatically synthesizing a code harnesscited by 63
  11. 2026Natural-Language Agent Harnessescited by 54
  12. 2026SkillForge: Forging Domain-Specific, Self-Evolving Agent Skills in Cloud Technical Supportcited by 43
  13. 2025EvoTest: Evolutionary Test-Time Learning for Self-Improving Agentic Systemscited by 34
  14. 2026Group-Evolving Agents: Open-Ended Self-Improvement via Experience Sharingcited by 32
  15. 2026The Long-Horizon Task Mirage? Diagnosing Where and Why Agentic Systems Breakcited by 25
  16. 2026ReCreate: Reasoning and Creating Domain Agents Driven by Experiencecited by 22
  17. 2026Inference-Time Scaling of Verification: Self-Evolving Deep Research Agents via Test-Time Rubric-Guided Verificationcited by 19
  18. 2025SCOPE: Prompt Evolution for Enhancing Agent Effectivenesscited by 16
  19. 2026Trajectory-Informed Memory Generation for Self-Improving Agent Systemscited by 16
  20. 2026Autogenesis: A Self-Evolving Agent Protocolcited by 12
  21. 2025Stop Wasting Your Tokens: Towards Efficient Runtime Multi-Agent Systemscited by 11
  22. 2025Maestro: Joint Graph & Config Optimization for Reliable AI Agentscited by 9
  23. 2026AgentDevel: Reframing Self-Evolving LLM Agents as Release Engineeringcited by 6
  24. 2025Instruction-Level Weight Shaping: A Framework for Self-Improving AI Agentscited by 2
  25. 2026View-oriented Conversation Compiler for Agent Trace Analysiscited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 21.

21 papers.

Sort:

By area:

  1. 2026Harness-R1: Learning to Edit Executable Runtime Harnesses from Agent Failure Trajectoriescited by 13
  2. 2026Harness Handbook: Making Evolving Agent Harnesses Readable,Navigable, and Editablecited by 12
  3. 2026HarnessBank: Semantic Gene-Bank Search with Gated Verification for Agent-Harness Self-Evolutioncited by 11
  4. 2026AutoSaddler: Automatic Harness Optimization with Durable Updates from Agent Execution Tracescited by 9
  5. 2026Verify Smarter, Evolve Further: Efficient Harness Evolution through Behavior-Aware Verificationcited by 7
  6. 2026HarnessDev: Can LLMs Create and Evolve Their Own Agent Harness?cited by 7
  7. 2026Tycho: Active Abstraction with Programmatic World Models for ARC-AGI-3cited by 5
  8. 2026Cheap Code, Costly Judgment: A Case Study on Governable Agentic Software Engineeringcited by 2
  9. 2026Self-Evolving Coding Agentscited by 2
  10. 2026Ecdysis: Efficient and Effective Training of Runtime Harnesses for LLM Agentscited by 2
  11. 2026ModularRSI: Modular and Generalizable Recursive Harness Self-Improvementcited by 2
  12. 2026Evidence-Calibrated Runtime Reconstruction for Agent Skills Across Heterogeneous Coding Agentscited by 1
9 more
  1. 2026Graph Engineering in the Era of LLM Agents: From Individual Intelligence to System Intelligencecited by 1
  2. 2026Agents in the Large: Perception-Centered Architecture for Persistent Agentscited by 1
  3. 2026More Programs or More Rolls? Separating Coverage from Specialization in LLM Harnessescited by 1
  4. 2026Capability Sheaves for Compositional Agent-Harness Repair: Controlled Quotients and a Real-Repository Stress Testcited by 0
  5. 2026Adaptive Influence Graphs for Failure Attribution in Multi-Agent Systemscited by 0
  6. 2026CineForge: Self-Improving Agents for Long-Horizon Video Generationcited by 0
  7. 2026Vestrum: Improving Agent Harnesses by Adapting Their Verification, Structure and Memorycited by 0
  8. 2026When Harnesses Lose the Signal: Causal Evaluation of Recovery in LLM Agentscited by 0
  9. 2026GUI-HARVEST: Self-Improving GUI Agents through Evidence-Driven Harness Evolutioncited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026Harness-Bench: Measuring Harness Effects across Models in Realistic Agent Workflows
  2. 2026Self-Harness: Harnesses That Improve Themselves
  3. 2026AgentTether: Graph-Guided Diagnosis and Runtime Intervention for Reliable LLM Agent Operation
  4. 2026AgentBug-Smith: Automatically Reproducing Real-World Harness Bugs in Agentic Systems
  5. 2026AgentDebugX: An Open-Source Toolkit for Failure Observability, Attribution, and Recovery in LLM Agents
  6. 2026Understanding Agent-Reactive Bugs at the Model-Harness Boundary: An Empirical Study of LLM Agent Issue Reports
  7. 2026Auditing Agent Harness Safety
  8. 2026TTHE: Test-Time Harness Evolution