Prompt
Can you recommend a repo-level agent for running tests and fixing failures across a legacy codebase?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
Yes — for a repo-level agent that can run tests, inspect failures, and make fixes across a legacy codebase, the best fit is usually a tool that has:
- full repository context
- terminal/test execution
- edit/apply patch capability
- good multi-file reasoning
- persistent task loop for “run tests → inspect failures → fix → rerun”
Strong options
1) OpenHands
- Best known open-source option for agentic repo work.
- Can browse/edit code, run commands, and iterate on failing tests.
- Good for legacy codebases because it can work across many files and keep looping on failures.
- If you want something closest to a “software engineer agent,” this is a top choice.
2) SWE-agent
- Purpose-built for fixing issues in repositories by running tests and modifying code.
- Very strong for benchmark-style “find bug, fix bug” workflows.
- Less of a general assistant than OpenHands, but excellent for test-driven repair loops.
3) Aider
- Great if you want a practical coding agent that works directly in git.
- Strong at making targeted edits and can use test output to guide fixes.
- Less autonomous than OpenHands/SWE-agent, but often easier to trust on legacy code because it’s more controlled.
4) Claude Code / similar terminal-based coding agents
- If you have access, these can be very effective on large repos.
- Good at reading code, making multi-file changes, and using terminal feedback.
- Best when paired with a disciplined workflow and human review.
My recommendation
If your goal is specifically:
“run tests, diagnose failures, and keep fixing until green”
I’d recommend:
- OpenHands if you want the most agentic repo-wide automation
- SWE-agent if your workflow is mainly issue/failure fixing
- Aider if you want a safer, more controlled interactive loop
For a legacy codebase, look for these features
Legacy repos tend to need:
- incremental edits
- ability to understand old patterns
- reliable test execution
- minimal hallucinated refactors
- good git hygiene
So prioritize tools that support:
- shell access
- test runner integration
- diff-based edits
- branch isolation
- manual checkpoints
Practical setup suggestion
A good workflow is:
- agent checks out a clean branch
- runs the test suite or targeted failing tests
- reads stack traces and logs
- makes one contained change at a time
- reruns tests
- repeats until stable
- opens a final diff summary
If you want, I can also give you:
- a ranked comparison table of OpenHands vs SWE-agent vs Aider
- a recommended setup for a monorepo/legacy Java/Python/JS codebase
- or a concrete deployment plan for using one of these on your repo.