Fix failing tests until they all pass automatically
What it does
Set a goal like 'fix all failing tests until pytest passes' and Hermes Agent autonomously fixes tests across multiple turns without repeated prompts. A judge model evaluates after each turn whether the goal is met; if not, the agent continues.
In the example, the agent fixed all 10 failing tests with the judge checking twice before all passed. The agent pauses after 20 turns by default to prevent endless loops.
Why it's worth it
Eliminates repeated 'keep going' messages and manual restarts during test debugging. Set one goal and the agent handles the full loop of running tests, identifying failures, and applying fixes until all pass.
Ideal for intensive test suites or refactoring projects where dozens of bugs must be fixed iteratively.
Fix all failing tests with one goal instead of constant restarts and prompts.
Step by step
Paste it into Hermes Agent and swap the highlighted parts for your own details.
Before you start Have your [project folder] ready with a [test command] that runs all tests.
Get Hermes Agent to:
- Tell me the [project folder] path and [test command] to run.
- Run the /goal command: '/goal Fix every failing test in [project folder] until [test command] passes'.
- Run the test suite and identify all failing tests.
- For each failure, analyse the error and write a fix.
- Apply the fix to my code and re-run the test suite.
- If tests are still failing, repeat steps 4–5 until all pass.
- Before making changes to my codebase, ask for my approval.
- Report which tests were fixed, what code changed, and confirm all tests pass.
Expected resultAll failing tests fixed and passing without manual agent restarts.