Failure as a Process: An Anatomy of CLI Coding Agent Trajectories
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Large language model (LLM) coding agents are increasingly deployed to autonomously perform software engineering tasks in terminal-based environments, making their reliability a growing concern. Existing empirical studies investigate why coding agents fail, yet they largely treat failure as a final outcome rather than a temporal process, providing limited insight into how failures emerge, evolve, and become unrecoverable. We present the first large-scale empirical study of CLI coding-agent failure trajectories, introducing a process-oriented framework that analyzes failure through its onset, evolution, and recovery across execution trajectories. We first collect 3,843 execution trajectories generated by seven frontier models across three coding-agent scaffolds (OpenHands, MiniSWE, and Terminus2) on Terminal-Bench, then carefully filter them to obtain 1,794 complete and valid trajectories for manual annotation (over 63,000 execution steps), from which we derive 14 findings spanning failure occurrence, root causes, recovery, and cross-system consistency. Our findings show that coding-agent failures are predominantly driven by epistemic errors, typically begin within the first few execution steps, and often remain hidden until recovery is no longer possible, suggesting that improving coding-agent reliability requires earlier validation and intervention rather than relying solely on final-outcome evaluation.
Key facts. Cited by 11 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 35 of its 44 references that are in the map. First posted on arXiv 10 Jul 2026.
Builds on
35 of 44 references.
Closest ancestors · 17
Same direction, newest first
- 2026How Coding Agents Fail Their Users: A Large-Scale Analysis of Developer-Agent Misalignment in 20,574 Real-World Sessions28 May
- 2026TrajAudit: Automated Failure Diagnosis for Agentic Coding Systems26 May
- 2026Beyond Resolution Rates: Behavioral Drivers of Coding Agent Success and Failure2 Apr
- 2026LongCLI-Bench: A Preliminary Benchmark and Study for Long-horizon Agentic Programming in Command-Line Interfaces15 Feb
- 2026CLI-Gym: Scalable CLI Task Generation via Agentic Environment Inversion11 Feb
- 2025Understanding Code Agent Behaviour: An Empirical Study of Success and Failure Trajectories31 Oct
- 2025Where LLM Agents Fail and How They can Learn From Failures29 Sep
- 2025Who is Introducing the Failure? Automatically Attributing Failures of Multi-Agent Systems via Spectrum Analysis17 Sep
- 2025Prometheus: Towards Long-Horizon Codebase Navigation for Repository-Level Problem Solving26 Jul
- 2025Understanding Software Engineering Agents: A Study of Thought-Action-Result Trajectories23 Jun
- 2025Which Agent Causes Task Failures and When? On Automated Failure Attribution of LLM Multi-Agent Systems30 Apr
- 2025Why Do Multi-Agent LLM Systems Fail?17 Mar
5 more
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024MAGIS: LLM-Based Multi-Agent Framework for GitHub Issue Resolution26 Mar
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair25 Mar
Other references · 18
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 515
- 2024AutoCodeRover: Autonomous Program Improvementcited by 272
- 2025Establishing Best Practices for Building Rigorous Agentic Benchmarkscited by 94
- 2026Endless Terminals: Scaling RL Environments for Terminal Agentscited by 43
- 2025Repo2Run: Automated Building Executable Environment for Code Repository at Scalecited by 39
- 2025EnvBench: A Benchmark for Automated Environment Setupcited by 36
- 2026On Data Engineering for Scaling LLM Terminal Capabilitiescited by 34
- 2026TermiGen: High-Fidelity Environment and Robust Trajectory Synthesis for Terminal Agentscited by 24
- 2025Exploring Autonomous Agents: A Closer Look at Why They Fail When Completing Taskscited by 20
6 more
- 2025On the Effectiveness of LLM-as-a-judge for Code Generation and Summarizationcited by 17
- 2026AgentLens: Revealing The Lucky Pass Problem in SWE-Agent Evaluationcited by 13
- 2026CodeTracer: Towards Traceable Agent Statescited by 11
- 2026TerminalWorld: Benchmarking Agents on Real-World Terminal Taskscited by 10
- 2026CLI-Universe: Towards Verifiable Task Synthesis Engine for Terminal Agentscited by 7
- 2026TUA-Bench: A Benchmark for General-Purpose Terminal-Use Agentscited by 7
Built on by
Citing papers per year: 2026: 11.
11 papers.
- 2026SearchAuditor: Auditing and Attributing Failures in Long-Horizon Search Agentscited by 1
- 2026Engineering Reliable Coding Agents: Evaluating and Operating the System Around the Modelcited by 1
- 2026LongRCA Bench: Root-Cause Localization in Long-Horizon Agent Trajectoriescited by 1
- 2026The Working Set of a Coding Agent: Coherence Debt in Repository-Scale Taskscited by 1
- 2026When and How Context Rot Appears in Coding Agents: A White-Box Study of Agent Skills in Code Auditingcited by 0
- 2026Terminal Agents: A Survey of AI Agents in Command-Line Environmentscited by 0
- 2026Between the Commits: Process, Error, and Claim Reliability in a Wholly AI-Authored Codebasecited by 0
- 2026Thinking Before Thinking: Scaling Agentic Inference Through Meta-Reasoningcited by 0
- 2026Can Terminal Agents Trust Their Own Verification? Diagnosing and Improving Self-Verificationcited by 0
- 2026DeFA: Dependency-Guided Failure Attribution for LLM Agentscited by 0
- 2026Trajectory-Guided Fault Localization for Agent Skill Evolutioncited by 0
- 2026Trajectory-Guided Fault Localization for Agent Skill Evolution8 Oct 2026
- 2026DeFA: Dependency-Guided Failure Attribution for LLM Agents1 Oct 2026
- 2026Can Terminal Agents Trust Their Own Verification? Diagnosing and Improving Self-Verification30 Sep 2026
- 2026Thinking Before Thinking: Scaling Agentic Inference Through Meta-Reasoning29 Sep 2026
- 2026Between the Commits: Process, Error, and Claim Reliability in a Wholly AI-Authored Codebase24 Sep 2026
- 2026Terminal Agents: A Survey of AI Agents in Command-Line Environments20 Aug 2026
- 2026The Working Set of a Coding Agent: Coherence Debt in Repository-Scale Tasks17 Aug 2026
- 2026LongRCA Bench: Root-Cause Localization in Long-Horizon Agent Trajectories15 Aug 2026
- 2026Engineering Reliable Coding Agents: Evaluating and Operating the System Around the Model14 Aug 2026
- 2026SearchAuditor: Auditing and Attributing Failures in Long-Horizon Search Agents5 Aug 2026
- 2026When and How Context Rot Appears in Coding Agents: A White-Box Study of Agent Skills in Code Auditing20 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2026XAI for Coding Agent Failures: Transforming Raw Execution Traces into Actionable Insights
- 2026Coherence Collapse: Diagnosing Why Code Agents Fail After Reaching the Right Code
- 2026What Breaks When LLMs Code? Characterizing Operational Safety Failures of Agentic Code Assistants
- 2026ProcCtrlBench: Evaluating Process-Level Defects and Control Preservation in LLM Coding Agents
- 2026Self-Evolving Coding Agents
- 2025An Empirical Study on Failures in Automated Issue Solving
- 2026Inside the Scaffold: A Source-Code Taxonomy of Coding Agent Architectures
- 2025Beyond Final Code: A Process-Oriented Error Analysis of Software Development Agents in Real-World GitHub Scenarios