TLDR: Meta’s new Engineering Agent uses a neuro-symbolic approach with Llama-based LLMs, static analysis, and test execution feedback to automatically fix code from test failures. In production, 25.5% of its generated fixes were successfully landed by human engineers, demonstrating the viability of large-scale agentic program repair. Key findings include the effectiveness of specialized LLMs and the ‘search-and-replace’ diff format, alongside valuable insights from engineer feedback.
Automated Program Repair (APR) has long been a significant goal in software engineering, aiming to fix software bugs without human intervention. Traditionally, APR systems relied on rule-based methods and test suites. However, with the rise of large language models (LLMs), the capabilities of APR have expanded dramatically, enabling more complex tasks like fault localization and patch generation. This advancement has opened new avenues for deploying program repair solutions at scale within large organizations.
Meta’s Engineering Agent: A Neuro-Symbolic Approach to Program Repair
Researchers at Meta have developed an innovative Engineering Agent designed to automatically fix source code based on test failures across their vast and diverse software offerings. This agent represents a sophisticated step forward in automated program repair, leveraging a neuro-symbolic approach that combines the power of LLMs with traditional static analysis and test execution feedback.
The process begins when a rule-based Test Failure Management Bot (TFMB) identifies a test failure. This failure is then passed to the Engineering Agent, which sets up a development environment to replicate the issue. Using Llama as its foundational LLM, the agent employs a ReAct (Reasoning and Acting) harness. This allows the agent to ‘reason’ about the problem and execute a series of actions, ranging from reading files to generating a code patch. A crucial aspect of this system is the continuous feedback loop: the agent receives input from static analysis tools and test execution results, enabling it to refine its proposed solution iteratively. Once the patch passes these internal validations, a separate LLM-as-a-Judge evaluates its quality to ensure it meets Meta’s internal standards. Finally, a human reviewer is notified to review and potentially land the change in the company’s monorepository.
Key Findings from Benchmarks
The team conducted extensive offline evaluations using curated benchmarks. One significant finding was that a specialized 70B Llama model, fine-tuned internally for patch generation, performed comparably to a much larger, vanilla Llama-405B model. This highlights the effectiveness of specialized training. The format of the code diffs also played a critical role; the ‘search-and-replace’ format significantly outperformed the standard unified diff format, proving to be more natural and effective for LLMs. An ablation study further demonstrated the value of the neuro-symbolic approach: the ReAct harness, when combined with symbolic information from static analysis tools and test execution traces, achieved a solve rate of 42.3% with an average of 11.8 feedback iterations. This was a substantial improvement over using the ReAct agent alone, which had a solve rate of 28.5%.
Real-World Impact: Production Findings and Engineer Feedback
The Engineering Agent was then deployed in a production environment for a three-month trial. During this period, 80% of the generated fixes were reviewed by human engineers, and an impressive 31.5% of those reviewed (25.5% of the total generated fixes) were accepted and landed. This acceptance rate is notable, especially considering the complexity of generating entire solutions to broken tests, compared to simpler AI-assisted code completions.
Qualitative feedback from engineers provided valuable insights. Positive comments included quick approvals, expressions of gratitude for saving time, and even surprise when the agent fixed issues they were unaware of. However, there were also areas for improvement. Feedback highlighted challenges such as test flakiness, which led to the development of a more isolated environment for the agent. Engineers also noted difficulties in finding appropriate reviewers for agent-generated diffs and identified instances where the agent lacked certain debugging tools or failed to understand broader production environment contexts. Interestingly, even partially correct solutions were found to be highly valuable, serving as excellent starting points for human engineers and initiating discussions that sometimes led to deeper code improvements.
Also Read:
- Crafting Code with AI: How MemoCoder Learns and Adapts to Fix Programming Errors
- Assessing LLM Code Generation: Introducing ReCatcher for Regression Testing
Looking Ahead
The success of Meta’s Engineering Agent demonstrates the significant viability of agentic program repair at scale. By combining advanced LLMs with robust feedback mechanisms and a human-in-the-loop validation process, the system effectively addresses complex software issues. The insights gained from both benchmark evaluations and real-world production deployment provide a strong foundation for future advancements. The researchers anticipate that this methodology and architecture can be extended to solve a wider range of problems within the Software Development Life Cycle, including code modernization, technical debt reduction, quality improvement, test synthesis, and performance optimization. For a deeper dive into the technical details, you can read the full research paper here.


