TLDR: TDFlow is a new test-driven agentic workflow that uses specialized AI sub-agents to solve software engineering problems by resolving human-written tests. It achieves high pass rates (88.8% on SWE-Bench Lite, 94.3% on SWE-Bench Verified with human tests) by breaking down complex tasks into focused sub-tasks. The research suggests that LLMs are already human-level at solving tests, with the main challenge being the accurate generation of valid reproduction tests. TDFlow envisions a human-LLM collaboration where humans write tests and AI solves them, combining the benefits of Test-Driven Development with AI efficiency.
A new approach to software engineering, called TDFlow, has been introduced, aiming to streamline the development process by leveraging the power of large language models (LLMs) in a test-driven environment. This novel system frames repository-scale software engineering as a task of resolving human-written tests, proposing a significant leap towards more efficient and reliable code development.
Addressing Software Engineering Challenges with AI
Traditional autonomous coding systems powered by LLMs often face hurdles when dealing with complex, repository-scale software issues. These challenges include managing extensive context, breaking down intricate tasks, and improving performance on specific sub-tasks. While Test-Driven Development (TDD) is a proven methodology for enhancing code quality and reducing bugs, its main drawback has been the increased development time required to write comprehensive tests.
TDFlow, developed by researchers from Carnegie Mellon University, UC San Diego, and Johns Hopkins University, hypothesizes that LLMs can significantly accelerate TDD by taking on the task of solving tests written by human developers. This creates a collaborative human-LLM system where human expertise guides the LLM through ground-truth tests, allowing the LLM to focus on expanding repository functionality.
How TDFlow Works: A Modular Approach
At its core, TDFlow is an agentic workflow composed of several specialized LLM sub-agents. This modular design is a key differentiator, as it decomposes the complex task of software repair into four distinct components, each governed by a respective sub-agent:
- Explore Files: This sub-agent analyzes failing tests and browses the repository to propose a repository-level patch.
- Debug One: When a patch fails, this sub-agent debugs individual failing tests, generating detailed reports on why the test failed.
- Revise Patch: If a proposed patch cannot be applied due to context issues, this sub-agent revises it to ensure proper application.
- Generate Tests (Optional): If human-written tests are not available, this sub-agent can generate reproduction tests based on the issue description.
This forced decoupling of tasks offers several advantages: it reduces the burden of long context on any single sub-agent, allows each sub-agent to focus on specific, predefined sub-tasks, and enables specialized performance improvements for each component. The workflow operates in an algorithmic loop, iteratively proposing, revising, and debugging patches until all tests pass.
Also Read:
- Bridging the Communication Gap: How ToM-SWE Empowers Coding Agents to Understand User Intent
- Advancing Automated Code Repair with Agentic Reinforcement Learning
Impressive Performance and Future Implications
TDFlow has demonstrated remarkable performance. When provided with human-written tests, it achieved an 88.8% pass rate on SWE-Bench Lite, an absolute improvement of 27.8% over the next best baseline. On SWE-Bench Verified, its success rate reached 94.3% with human-written tests. Even when generating its own tests, TDFlow achieved a 69.8% performance on SWE-Bench Verified.
A significant finding from the research is that the primary obstacle to achieving human-level software engineering performance with LLMs lies not in solving tests, but in writing successful reproduction tests. When TDFlow was provided with high-quality, successful reproduction tests (whether human-written or LLM-generated), its pass rate soared to 93.3%, indicating that its test resolution capabilities are already at a human level.
The system also incorporates strategies to minimize “test hacking” – instances where an LLM might propose patches that pass tests without genuinely solving the underlying issue. Through precisely engineered prompts and restricted tool access, TDFlow successfully limited test hacking to only 7 instances across 800 runs.
The researchers envision a future where human developers write tests, and TDFlow-powered LLM systems solve them, combining the quality benefits of TDD with the efficiency of AI. This could mitigate the increased development time typically associated with TDD, paving the way for a new era of collaborative software engineering. You can read the full research paper here.


