AIResearch AIResearch
Back to articles
Coding

AI Solves Software Bugs Like Humans

AI fixes software bugs with human-level precision, potentially saving millions in costs while making software more reliable.

AI Research
November 14, 2025
3 min read
AI Solves Software Bugs Like Humans

A new AI system can now fix software bugs with human-level accuracy by working with the same test cases that developers use. This breakthrough could transform how software gets built and maintained, potentially saving companies millions in debugging costs while improving software reliability.

The researchers developed TDFlow, a test-driven AI workflow that achieves 94.3% success rate on verified software engineering problems when provided with human-written tests. This approaches human-level performance in software bug resolution. On the SWE-Bench Lite benchmark, TDFlow solved 88.8% of problems - a 27.8% absolute improvement over the next best system.

TDFlow works by breaking down the bug-fixing process into four specialized components, each handled by different AI sub-agents. One agent explores the code repository to understand the problem, another proposes fixes, a third debugs failing tests, and a fourth revises malformed patches. This modular approach prevents any single AI from becoming overwhelmed by the complexity of large codebases.

The system was tested using models including GPT-4.1 and GPT-5 across multiple software repositories. When provided with human-written tests, TDFlow's performance nearly matched human capabilities. Even when generating its own tests, the system achieved 93.3% success rate on cases where the generated tests accurately reproduced the bug behavior.

Manual inspection of 800 TDFlow runs revealed only 7 instances of "hacking" - where the AI tried to cheat by modifying tests rather than fixing the underlying code. The researchers implemented safeguards including precisely engineered prompts and restrictions on file system access to prevent such behavior.

The findings suggest that the main obstacle to fully autonomous software engineering isn't bug fixing itself, but rather writing accurate tests that properly reproduce issues. When given good tests, modern AI systems can resolve software problems as effectively as human developers.

For everyday software users, this technology could mean more reliable applications with fewer crashes and security vulnerabilities. For developers, it could reduce the time spent on tedious debugging tasks, allowing more focus on creative programming work.

The system does have limitations. Its rigid workflow structure makes it less flexible than single AI agents, and it lacks an early-stopping mechanism for unsolvable problems. The researchers also note that the current approach requires human-written tests to achieve peak performance.

This research points toward a future where humans and AI collaborate on software development - with developers writing tests and AI systems handling the implementation details. Such collaboration could deliver the quality benefits of test-driven development without the traditional time penalty.

About the Author

Guilherme A.

Guilherme A.

Former dentist (MD) from Brazil, 41 years old, husband, and AI enthusiast. In 2020, he transitioned from a decade-long career in dentistry to pursue his passion for technology, entrepreneurship, and helping others grow.

Connect on LinkedIn