mlsanityData to 7 Oct 2026

Rethinking the Value of Agent-Generated Tests for LLM-Based Software Engineering Agents

arXiv 2602.07900 ↗First posted 8 Feb 2026cs.SE cs.AIcited by 13

On the map: LLM reasoning → Reasoning for agents, planning and code

also in 1 more
Abstract (arXiv)

Large Language Model (LLM) code agents increasingly resolve repository-level issues by iteratively editing code, invoking tools, and validating candidate patches. In these workflows, agents often write tests on the fly, but the value of this behavior remains unclear. For example, GPT-5.2 writes almost no new tests yet achieves performance comparable to top-ranking agents.This raises a central question: do such tests meaningfully improve issue resolution, or do they mainly mimic a familiar software-development practice while consuming interaction budget? To better understand the role of agent-written tests, we analyze trajectories produced by six strong LLMs on SWE-bench Verified. Our results show that test writing is common, but resolved and unresolved tasks within the same model exhibit similar test-writing frequencies. When tests are written, they mainly serve as observational feedback channels, with value-revealing print statements appearing much more often than assertion-based checks. Based on these insights, we perform a prompt-intervention study by revising the prompts used with four models to either increase or reduce test writing. The results suggest that prompt-induced changes in the volume of agent-written tests do not significantly change final outcomes in this setting. Taken together, these results suggest that current agent-written testing practices reshape process and cost more than final task outcomes.

Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 14 of its 59 references that are in the map. First posted on arXiv 8 Feb 2026.

Builds on

14 of 59 references.

Closest ancestors · 3

Same direction, newest first

  1. 2025Towards a Science of Scaling Agent Systems9 Dec
  2. 2025Trae Agent: An LLM-based Agent for Software Engineering with Test-time Scaling31 Jul
  3. 2025CodeMonkeys: Scaling Test-Time Compute for Software Engineering24 Jan

Other references · 11

  1. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 956
  2. 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
  3. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
  4. 2025Darwin Godel Machine: Open-Ended Evolution of Self-Improving Agentscited by 294
  5. 2025A Survey of Self-Evolving Agents: What, When, How, and Where to Evolve on the Path to Artificial Super Intelligencecited by 155
  6. 2025Live-SWE-agent: Can Software Engineering Agents Self-Evolve on the Fly?cited by 91
  7. 2024SpecRover: Code Intent Extraction via LLMscited by 71
  8. 2024MarsCode Agent: AI-native Automated Bug Fixingcited by 68
  9. 2025EXPEREPAIR: Dual-Memory Enhanced LLM-based Repository-Level Program Repaircited by 34
  10. 2025Understanding Automated Program Repair Agents Through the Lens of Traceability: An Empirical Studycited by 16
  11. 2025An Empirical Study on Failures in Automated Issue Solvingcited by 15

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 13.

13 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation
  2. 2026Tangent: An Empirical Study of Testing Practices for LLM-Based Agent Applications
  3. 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skills
  4. 2026Are Coding Agents Generating Over-Mocked Tests? An Empirical Study
  5. 2026Automated structural testing of LLM-based agents: methods, framework, and case studies
  6. 2023Towards Autonomous Testing Agents via Conversational Large Language Models
  7. 2024The Potential of LLMs in Automating Software Testing: From Generation to Reporting
  8. 2026On the risk of coding before testing: An empirical study on LLM-based test generation workflow