NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Prometheus: Towards Long-Horizon Codebase Navigation for Repository-Level Problem Solving

Yue Pan, Zimin Chen, Siyu Lu, Zhaoyang Chu, Xiang Li, Han Li, Yang Feng, Claire Le Goues, Federica Sarro, Martin Monperrus, He YearXiv 2025

TL;DR

Prometheus is a memory-centric multi-agent framework designed to navigate large-scale software repositories without getting lost in the noise. By combining a unified codebase knowledge graph with a persistent, intent-aware working memory, it ensures continuity across long-horizon reasoning steps. Powered by GPT-5, Prometheus achieves state-of-the-art issue resolution rates on SWE-bench Verified (74.4%) and SWE-PolyBench Verified (33.8%) while slashing LLM API costs by over 45%.

What Problem Does This Paper Address?

While modern Large Language Models (LLMs) boast context windows spanning millions of tokens, coding agents still struggle with repository-level tasks like fixing bugs or implementing features. They routinely fall victim to the "Needle-in-a-Haystack" problem, where critical evidence is overwhelmed by massive volumes of irrelevant code and documentation.

Existing codebase navigation techniques—such as semantic embedding retrieval, file-system searches (grep, find), or structure-aware code graphs—solve parts of this puzzle but suffer from a fatal flaw: they are stateless. They fail to capture the temporal history of the agent's own exploration. Without a persistent memory of what it has already reviewed, an agent will repeatedly traverse the same regions of a repository. This lack of continuity leads to fragmented planning, bloated token consumption, and degraded reasoning over long-horizon workflows.

Methods

Prometheus introduces a memory-centric architecture built on three core pillars:

  1. Repository to Knowledge Graph: The framework transforms a codebase into a lightweight, heterogeneous knowledge graph. It uses three node types: FileNode (capturing directory structures), ASTNode (using Tree-sitter to parse abstract syntax trees for precise function/class hierarchies), and TextNode (for documentation chunks).
  2. Memory-Enhanced Context Retrieval: Instead of relying on raw string matching, Prometheus synthesizes structured "Ternary Queries" consisting of an essential query, extra requirements, and a purpose. Under a "memory-first" protocol, the context engine uses multi-vector weighted retrieval to check its persistent Working Memory Base before executing expensive graph traversals.
  3. Multi-Agent Orchestration: The context engine powers a sequential multi-agent pipeline:
  4. Issue Classification Agent: Categorizes incoming issues (bug, feature, or refactoring) to route them appropriately.
  5. Bug Reproduction Agent: Iteratively writes and executes test scripts within isolated Docker containers to reliably recreate the reported failure.
  6. Patch Generation Agent: Proposes code modifications based on localized context.
  7. Patch Verification Agent: Validates candidate patches against both the reproduction test and relevant regression tests.
Fig. 1. An illustration of existing codebase navigation methods for coding agents.

Datasets

The authors evaluated Prometheus on two prominent software engineering benchmarks:

  • SWE-bench Verified: A human-curated subset of 500 Python tasks from the original SWE-bench, focusing on high-quality problem statements and reliable unit tests for bug fixing.
  • SWE-PolyBench Verified: A challenging multi-language benchmark consisting of 382 instances across four languages (Java, Python, JavaScript, and TypeScript) that expands tasks beyond bug fixing to include feature implementation and refactoring.

Key Insights and Ideas

  • Temporal Trajectory Matters: Mapping the spatial topology of code (dependencies and call graphs) is not enough. Agents need to model their temporal trajectory—remembering what they looked at, why they looked at it, and what they concluded—to maintain logical coherence over long tasks.
  • Intent-Separated Search: Splitting an LLM's search intent into distinct vectors (essential query vs. auxiliary constraints vs. high-level purpose) yields significantly cleaner retrieval results than standard single-vector embeddings.
  • Memory Directly Dictates Cost: A stateless agent is an expensive agent. Preserving query-relevant context across iterative repair steps prevents redundant repository re-indexing and context window stuffing, directly translating to massive financial savings during deployment.

Key Results

  • State-of-the-Art Resolution: Utilizing GPT-5 as its backbone, Prometheus achieved a 74.4% resolution rate on SWE-bench Verified (ranking Top-6 among open-source systems) and a 33.8% resolution rate on SWE-PolyBench Verified (ranking Top-1).
  • Strong Multilingual Generalization: The agent maintained a balanced resolution rate of over 30% across all four languages in SWE-PolyBench, proving it isn't overfitted to Python.
  • Fine-Grained Localization: When evaluated against human-annotated gold standard contexts, Prometheus achieved a 0.807 hit rate at the exact code span level, drastically outperforming leading baselines like Agentless (0.054) and OpenHands (0.541).
  • Ablation Proof: Controlled experiments showed that the working memory mechanism alone improved the issue resolution rate by 25% while reducing total LLM inference costs by 45.4% (dropping from $367.73 down to $200.79 across a 50-issue sample).

Limitations and Future Work

  • Single-Run Constraints: Due to the high computational and API costs associated with running frontier models like GPT-5 over massive codebases, experiments were conducted only once per instance using fixed random seeds. This limits the understanding of the system's performance variance.
  • Real-World Scale vs. Benchmarks: Although SWE-PolyBench introduces multi-language diversity, the authors note that these benchmarks may still not fully capture the sheer scale, architectural messiness, and internal tooling complexities of massive, real-world industrial enterprise systems.

Summary updated

BibTeX
@misc{pan2025prometheus,
  author = {Yue Pan and Zimin Chen and Siyu Lu and Zhaoyang Chu and Xiang Li and Han Li and Yang Feng and Claire Le Goues and Federica Sarro and Martin Monperrus and He Ye},
  title = {{Prometheus: Towards Long-Horizon Codebase Navigation for Repository-Level Problem Solving}},
  year = {2025},
  eprint = {2507.19942},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.19942},
}
Figure