mlsanityData to 7 Oct 2026

Understanding Code Agent Behaviour: An Empirical Study of Success and Failure Trajectories

arXiv 2511.00197 ↗First posted 31 Oct 2025cs.SE cs.AIcited by 30

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

Abstract (arXiv)

The increasing deployment of Large Language Model (LLM) agents for complex software engineering tasks has created a need to understand their problem-solving behaviours beyond simple success metrics. While these agents demonstrate impressive capabilities in automated issue resolution, their decision-making processes remain largely opaque. This paper presents an empirical study of agent trajectories, namely the execution traces capturing the steps agents take when attempting to resolve software issues. We analyse trajectories from three state-of-the-art code agents (OpenHands, SWE-agent, and Prometheus) on the SWE-Bench benchmark, examining both successful and failed attempts. Our investigation reveals several key insights into agent behaviour. First, we identify how distinct problem-solving strategies, such as defensive programming and context gathering, enable success in different scenarios. Second, we find that failed trajectories are consistently longer and exhibit higher variance than successful ones, with failure patterns differing significantly between agents. Third, our fault localisation analysis shows that while most trajectories correctly identify problematic files (72-81% even in failures), success depends more on achieving approximate rather than exact code modifications. These and other findings unveiled by our study, provide a foundation for understanding agent behaviour through trajectory analysis, contributing to the development of more robust and interpretable autonomous software engineering systems.

Key facts. Cited by 30 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 16 of its 27 references that are in the map. First posted on arXiv 31 Oct 2025.

Builds on

16 of 27 references.

Closest ancestors · 7

Same direction, newest first

  1. 2025Prometheus: Towards Long-Horizon Codebase Navigation for Repository-Level Problem Solving26 Jul
  2. 2025Understanding Software Engineering Agents: A Study of Thought-Action-Result Trajectories23 Jun
  3. 2025Understanding Automated Program Repair Agents Through the Lens of Traceability: An Empirical Study10 Jun
  4. 2025SeaView: Software Engineering Agent Visual Interface for Enhanced Workflow11 Apr
  5. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
  6. 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair25 Mar
  7. 2024Executable Code Actions Elicit Better LLM Agents1 Feb

Other references · 9

  1. 2024Understanding the planning of LLM agents: A surveycited by 414
  2. 2025SE-Agent: Self-Evolution Trajectory Optimization in Multi-Step Reasoning with LLM-Based Agentscited by 66
  3. 2024AgentBank: Towards Generalized LLM Agents via Fine-Tuning on 50000+ Interaction Trajectoriescited by 56
  4. 2021Neural Program Repair with Execution-based Backpropagationcited by 50
  5. 2025Are "Solved Issues" in SWE-bench Really Solved Correctly? An Empirical Studycited by 47
  6. 2022SelfAPR: Self-supervised Program Repair with Test Execution Diagnosticscited by 33
  7. 2023ITER: Iterative Neural Repair for Multi-Location Patchescited by 16
  8. 2024When Fine-Tuning LLMs Meets Data Privacy: An Empirical Study of Federated Learning in LLM-Based Program Repaircited by 10
  9. 2023PreciseBugCollector: Extensible, Executable and Precise Bug-fix Collectioncited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 29.

30 papers.

Sort:

By area:

  1. 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agentscited by 40
  2. 2026Inside the Scaffold: A Source-Code Taxonomy of Coding Agent Architecturescited by 15
  3. 2026AgentLens: Revealing The Lucky Pass Problem in SWE-Agent Evaluationcited by 13
  4. 2026Wink: Recovering from Misbehaviors in Coding Agentscited by 11
  5. 2026How Coding Agents Fail Their Users: A Large-Scale Analysis of Developer-Agent Misalignment in 20,574 Real-World Sessionscited by 11
  6. 2026Failure as a Process: An Anatomy of CLI Coding Agent Trajectoriescited by 11
  7. 2026Who&When Pro: Can LLMs Really Attribute Failures in AI Agents?cited by 11
  8. 2026Where Do AI Coding Agents Fail? An Empirical Study of Failed Agentic Pull Requests in GitHubcited by 10
  9. 2026Beyond Resolution Rates: Behavioral Drivers of Coding Agent Success and Failurecited by 9
  10. 2025Agentic Software Issue Resolution with Large Language Models: A Surveycited by 6
  11. 2026Coherence Collapse: Diagnosing Why Code Agents Fail After Reaching the Right Codecited by 5
  12. 2026What Resolve Rate Hides: Trajectory Structure Diagnostics for Coding Agentscited by 5
18 more
  1. 2026Same Signal, Different Semantics: A Cross-Framework Behavioral Analysis of Software Engineering Agentscited by 4
  2. 2026Fail-Fast, Restart-Smart: Early Failure Prediction and Restart for SWE Agentic Taskscited by 3
  3. 2026EvoPolicyGym: Evaluating Autonomous Policy Evolution in Interactive Environmentscited by 2
  4. 2026Turning Interaction History into Execution State: A Runtime Layer for Long-Horizon Coding Agentscited by 2
  5. 2026The Devil Is in the Interface: Evaluating How Tool Architecture Shapes Coding Agent Behaviorcited by 2
  6. 20261D-Bench: A Benchmark for Iterative UI Code Generation with Visual Feedback in Real-Worldcited by 1
  7. 2026Measuring Cross-Task Behavioral Consistency in Language Model Agentscited by 1
  8. 2026The Working Set of a Coding Agent: Coherence Debt in Repository-Scale Taskscited by 1
  9. 2026BootstrapAgent: Distilling Repository Setup into Reusable Agent Knowledgecited by 0
  10. 2026When and How Context Rot Appears in Coding Agents: A White-Box Study of Agent Skills in Code Auditingcited by 0
  11. 2026From Agent Behaviour to Agent-Friendly Documentation: An Empirical Study of How Coding Agents Discover, Read, and Write Technical Documentationcited by 0
  12. 2026openJiuwen: Beyond Static Harnesses for Long-Horizon Coding Agentscited by 0
  13. 2026Trajectory-Aware Benchmark Subset Selection for Cost-Efficient Software Engineering Agent Regression Testingcited by 0
  14. 2026Analyzing and Mitigating Cost-Inefficient Behaviors in Coding Agentscited by 0
  15. 2026DynBranch: Speculative Subgraph Reuse for Dynamic Agentic LLM Servingcited by 0
  16. 2026Learning When and How to Intervene: A Hindsight-Distilled Sentinel for Coding Agentscited by 0
  17. 2026Code Understanding is a Bottleneck for Coding Agentscited by 0
  18. 2026Trajectory-Guided Fault Localization for Agent Skill Evolutioncited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025An Empirical Study on Failures in Automated Issue Solving
  2. 2025Beyond Final Code: A Process-Oriented Error Analysis of Software Development Agents in Real-World GitHub Scenarios
  3. 2026XAI for Coding Agent Failures: Transforming Raw Execution Traces into Actionable Insights
  4. 2025Where LLM Agents Fail and How They can Learn From Failures
  5. 2025Beyond Accuracy: Behavioral Dynamics of Agentic Multi-Hunk Repair
  6. 2026What Makes Software Issue Resolution Tasks Difficult for Agents?
  7. 2026What Breaks When LLMs Code? Characterizing Operational Safety Failures of Agentic Code Assistants
  8. 2026Rethinking the Value of Agent-Generated Tests for LLM-Based Software Engineering Agents