TL;DR
Researchers have introduced HERMES, a framework that shifts the paradigm of AI software engineering from monolithic agents to modular Dev-Primitives. By turning passive code files into "active" participants—each with its own resident LLM—HERMES improves task success rates by an average of 12.4% while significantly reducing inference costs through a "brain-and-worker" heterogeneous model approach.
What Problem Does This Paper Address?
Current Large Language Model (LLM) agents are surprisingly good at writing snippets of code, but they tend to break down during "long-horizon" workflows—tasks that require sustained interaction across large, complex repositories.
The authors identify three main bottlenecks:
- Context Explosion: As an agent interacts with a terminal and multiple files, the conversation history grows too large for the model to process effectively.
- Semantic Drift: Over long tasks, agents often lose track of the original goal or make inconsistent changes across different files.
- State Reconstruction: A monolithic agent must constantly "re-read" the entire state of the repository (source code, tests, configs, dependencies) to understand the impact of a single change.
In short, asking one "brain" to hold a whole software ecosystem in its head is inefficient and error-prone.
Methods
The core innovation is the Dev-Primitive (Development Primitive). Instead of one agent looking at many files, HERMES assigns a "resident LLM" to each repository artifact (a source file, a config, or a test).
The HERMES framework manages these primitives through a four-stage loop:
- Dynamic Activation: Rather than activating every file in a repo (which would be wasteful), HERMES uses a dependency-aware mechanism to identify only the components likely involved in a specific bug or feature request.
- Collaboration: Activated Dev-Primitives "talk" to each other using natural language. For example, a primitive for
api.pymight tell the primitive fortest_api.py, "I changed the return type of this function; you need to update your assertions." - Execution: The modified repository is run in a real environment (terminals, unit tests, etc.).
- Bug Diagnosis: If execution fails, a diagnosis module maps the error traces back to the specific components that need further revision, triggering a new round of localized edits.
Datasets
The authors evaluated HERMES across four diverse benchmarks to prove its versatility:
- SWE-bench Verified: Real-world GitHub issue resolution.
- SWE Refactor Bench: Whole-repository migration and cross-file refactoring.
- Terminal-Bench 4.0: Tasks requiring complex, interactive terminal usage.
- DevOps-Gym: End-to-end workflows including build configuration, monitoring, and test generation.
Key Insights and Ideas
- Artifact-Bound Reasoning: By attaching reasoning to the file itself, the "state" of that file stays localized. The LLM doesn't need to remember the whole repo; it just needs to know its own code and the messages it receives from its neighbors.
- Harness Design > Model Size: One of the most striking findings is that the structure of how agents interact (the "harness") can be more important than the raw power of the underlying model.
- Heterogeneous Scaling: The authors found they could use a powerful "frontier" model (like GPT-5.6) for high-level planning and diagnosis, while using much smaller, cheaper models (like Qwen3-8B) for the individual Dev-Primitives. This setup achieved performance nearly identical to using the expensive model for everything, but at a fraction of the cost.
Key Results
HERMES consistently outperformed baseline harnesses (like mini-SWE-agent and Claude Code) across the board.
- Performance Boost: On average, HERMES improved success rates by 12.4 percentage points.
- Refactoring Excellence: On the difficult SWE Refactor Bench, HERMES with GPT-5.6 Sol jumped from a 6.5% success rate (baseline) to 31.0% (medium effort).
- Cost Efficiency: On Terminal-Bench 4.0, the heterogeneous configuration (GPT-5.6 for the harness, Qwen3-8B for primitives) reduced inference costs by 26.2% while remaining within 4.5% of the performance of an all-GPT-5.6 system.
Limitations and Future Work
While powerful, HERMES does introduce some overhead:
- Latency: Invoking multiple LLMs and running iterative execution cycles can be slower than a single-shot attempt.
- Activation Sensitivity: If the initial "Dynamic Activation" misses a crucial file, the framework may struggle to resolve the issue unless the diagnosis module catches the omission later.
- Granularity: Currently, primitives are defined at the file level. The authors suggest that moving to finer-grained primitives (e.g., at the function or class level) could be a promising direction for even more complex software systems.
Ultimately, HERMES demonstrates that the future of AI software engineering might not be one giant model, but a collaborative ecosystem of specialized, file-bound agents.
Summary updated