ArXiv TLDR

ReCodeAgent: A Multi-Agent Workflow for Language-agnostic Translation and Validation of Large-scale Repositories

🐦 Tweet
2604.07341

Ali Reza Ibrahimzada, Brandon Paulsen, Daniel Kroening, Reyhaneh Jabbarvand

cs.SE

TLDR

ReCodeAgent is a multi-agent system that autonomously translates and validates large code repositories across multiple programming languages with high accuracy.

Key contributions

  • Introduces ReCodeAgent, an autonomous multi-agent system for language-agnostic repository translation.
  • Achieves 60.8% higher test pass rates than prior methods on 118 real-world projects across 6 PLs.
  • First technique to provide high translation success and validation for large-scale, multi-PL repositories.
  • Demonstrates procedural efficiency and the superiority of multi-agent over single-agent architectures.

Why it matters

This paper introduces a significant advancement in automated code translation, moving beyond single language pairs to handle entire repositories across diverse programming languages. Its multi-agent approach drastically improves accuracy and efficiency, making large-scale code migration and interoperability more feasible and cost-effective.

Original Abstract

Most repository-level code translation and validation techniques have been evaluated on a single source-target programming language (PL) pair, owing to the complex engineering effort required to adapt new PL pairs. Programming agents can enable PL-agnosticism in repository-level code translation and validation: they can synthesize code across many PLs and autonomously use existing tools specific to each PL's analysis. However, state-of-the-art has yet to offer a fully autonomous agentic approach for repository-level code translation and validation of large-scale programs. This paper proposes ReCodeAgent, an autonomous multi-agent approach for language-agnostic repository-level code translation and validation. Users only need to provide the project in the source PL and specify the target PL for ReCodeAgent to automatically translate and validate the entire repository. ReCodeAgent is the first technique to achieve high translation success rates across many PLs. We compare the effectiveness of ReCodeAgent with four alternative neuro-symbolic and agentic approaches to translate 118 real-world projects, with 1,975 LoC and 43 translation units for each project, on average. The projects cover 6 PLs (C, Go, Java, JavaScript, Python, and Rust) and 4 PL pairs (C-Rust, Go-Rust, Java-Python, Python-JavaScript). Our results demonstrate that ReCodeAgent consistently outperforms prior techniques on translation correctness, improving test pass rate by 60.8% on ground-truth tests, with an average cost of $15.3. We also perform process-centric analysis of ReCodeAgent trajectories to confirm its procedural efficiency. Finally, we investigate how the design choices (a multi-agent vs. single-agent architecture) influence ReCodeAgent performance: on average, the test pass rate drops by 40.4%, and trajectories become 28% longer and persistently inefficient.

📬 Weekly AI Paper Digest

Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.