Microsoft
May 14, 2026
A GENT L ENS: Revealing The Lucky Pass Problem in SWE-Agent Evaluation Priyam Sahoo1,2, * , Gaurav Mittal2,† , Xiaomin Li2,† , Shengjie Ma2 , Benjamin Steenhoek2 , Pingping Lin2 , Yu Hu2 1 University of Illinois, Urbana-Champaign, IL, USA
arXiv:2605.12925v1 [cs.SE] 13 May 2026
2 Microsoft, Redmond, WA, USA
Evaluation of software engineering (SWE) agents is dominated by a binary signal: whether the final patch passes the tests. This outcome-only view treats a principled solution and a chaotic trial-anderror process as equivalent. We show that this equivalence is empirically false. We evaluate 2,614 OpenHands trajectories from eight model backends on SWE-bench Verified. Of the 60 tasks in this corpus, 47 have enough passing trajectories to construct task-level process references, yielding a 1,815trajectory evaluation subset. Among passing trajectories in this subset, 10.7% exhibit behavior we call a Lucky Pass: regression cycles, blind retries, missing verification, or temporally disordered exploration, implementation, and verification. We introduce A GENT L ENS, a framework for process-level assessment of SWE-agent trajectories, and release A GENT L ENS-Bench, a dataset of 1,815 trajectories annotated with quality scores, waste signals, divergence points, and 47 task-level Prefix Tree Acceptor (PTA) references. A GENT L ENS combines two components. First, it merges multiple passing solutions for the same task into a PTA reference space of correct behaviors. Second, it uses a context-sensitive intent-stage labeler that assigns actions to Exploration, Implementation, Verification, or Orchestration using trajectory history rather than tool identity alone. On A GENT L ENS-Bench, the composite score separates passing trajectories into Lucky, Solid, and Ideal tiers; decomposes Lucky Passes into five recurring mechanisms; and changes how the eight evaluated model backends are ranked compared with pass rate alone. Across these models, A GENT L ENS classifies between 0.5% and 23.2% of successful trajectories as Lucky, and some models move by as many as five rank positions when ranked by quality score instead of pass rate. We release the project repository, including the A GENT L ENS-Bench dataset and A GENT L ENS SDK, at https://github.com/microsoft/code-agent-state-trajectories.
1
Introduction
Software engineering agents have moved quickly from prototypes to systems that resolve real GitHub issues end-to-end. SWE-agent (Yang et al., 2024), OpenHands (Wang et al., 2024b), AutoCodeRover (Zhang et al., 2024), Agentless (Xia et al., 2024), and Devin (Sana Ansari, 2024) all read codebases, edit files, and run test suites without human input. The benchmark anchoring this progress, SWE-bench (Jimenez et al., 2024), evaluates these systems with a binary signal: does the final patch pass the tests? That signal is useful for measuring capability, but insufficient for evaluating behavior. Consider two agents resolving the same issue. One explores the repository in a few targeted steps, identifies the root cause, applies a minimal fix, and verifies it. The other repeatedly attempts similar edits, loops through failed checks, and eventually reaches a working patch through trial and error. Both receive the same SWE-bench label of “resolved.” The behavioral difference is real, important for downstream uses of trajectories, and invisible to outcome-only evaluation. We show that this conflation occurs in practice. Across 1,136 passing agent trajectories from eight model backends on SWE-bench Verified, 10.7% are reached through behavior we call a Lucky Pass: regression cycles, blind retries, missing verification, or temporally disordered exploration, implementation, and verification. A * Work done as a student researcher while at Microsoft. † Co-second authors.
2
AgentLens : Revealing The Lucky Pass Problem in SWE-Agent Evaluation