Build1 publisher3 min readPublished
Hermes deleted 365,463 lines of its own code against a test suite that never changed
Nous Research spent about $19,300 on 1,393 subagents to take 34.4 percent out of Hermes's non-test Python in 19 hours. Test line count moved 0.06 percent, so the guardrail was the suite the team already had.
The Engineer · Build desk

What happened
- Nous Research asked its Hermes Agent on 2 September 2026 to clean up the Hermes codebase across the whole project, and the resulting pull request was merged two days later.
- The main run consumed 19 hours of agent working time and commanded 1,393 subagents, with as many as 218 of them running at once.
- Non-test Python fell 34.4 percent, from 1,063,826 lines to 698,363, and functions longer than 300 lines went from 192 to 2.
- The team put the cost at $19,300 for the main run, about $25,000 with follow-ups, against its own $150,000 to $1,800,000 estimate for a small team doing the same cleanup by hand.
- Test line count moved by 0.06 percent, because the tests stayed as they were while the code they cover was rewritten.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- decision Cleanup the team kept deferring because it pulls engineers off features and bug fixing now competes for a token budget an engineering lead can sign off alone, so staffing stops being the gate on it.
- constraint Anyone copying the method inherits the coverage of their own suite: wherever the tests are thin, a third of the code can be rewritten while behaviour goes unchecked.
- contradiction The same evidence supports both 93 times and 7.8 times, because one side of the ratio is a bill for tokens and the other is the team's estimate of its own labour.
- capability One standing goal plus an accumulated skill file replaced 36 separate worker briefings, so the human effort scales with reviewing the output.
The first agent left the source files alone. It measured the codebase, split it into 36 non-overlapping groups, wrote the work tickets from the standing goal, read the workers' reports, merged branches and ran the checks [25][29]. Each worker got a git worktree, a separate checkout where two agents cannot edit the same file [26]. Some workers delegated again, so the tree ran three levels deep below the first agent [28]. Every ticket named three things: the code to simplify, the interfaces to preserve, and the checks that had to pass before a commit [27].
The objective stayed live through a `/goal` command, which holds the goal and prompts Hermes to continue at the point where it would otherwise stop [19]. In Nokka's Thai rendering, the prompt asks for at least 30 percent off total lines, god files broken up, shared helpers merged, less if-if-if-else routing, and then tells the agent to finish everything with no excuses and without waiting on his decisions [20]. Nokka wrote that this instruction is the key, because jobs with hundreds of subagents tend to die at the moment one of them stops to ask [33].
Divide the main run's bill across its subagents and each one cost about $13.86 [3]. The deletion came to 365,463 lines of non-test Python [1], or roughly 5.3 cents a line [2].
The test suite stayed as it was. In Nokka's translation, the gist the team published says the suite that guards behaviour is the same suite [18]. Two counts went up: functions by 25 percent and Python files by 34.5 percent, because the big ones were broken apart [16]. If both counts cover the same file set, mean lines per Python file fall to about 49 percent of what they were [5].
The two ends of the team's manual estimate differ by a factor of twelve [6], so the multiple depends on which end you take. Nokka's account divides out about 93 times at the top and about 7.8 times at the bottom [7], and Nous Research titled the post around turning $19,000 of tokens into $1.8 million of value [8]. The token bill was paid; the upper bound is the team's own estimate of what it would have spent on a small team working for as long as two years [6].
For the ratio to transfer, a codebase has to start roughly where this one started: a single `gateway/run.py` of 34,847 lines [10], a longest function of 7,310 lines that came out at 566 [14], peak complexity of 1,075 falling to 84 [15], and 1,338 functions over 100 lines coming down to 139 [13]. It also needs the skill file. `hermes-agent-dev` grew out of daily work, with Hermes recording the reusable lesson itself whenever the team settled on a method or corrected one of its mistakes [21], in Markdown files that it writes and edits mid-run [22]. One instruction in it tells the agent to reproduce a failure on `origin/main` HEAD in a clean environment before assuming its own work caused it [23]. Months of ordinary sessions went into that file before the September run, and the team hands it to other engineers to install in their own Hermes [24].
Nokka wrote that the four places where the team set out its own limits matter more than the 93 times figure [30]. The account, published on 16 September 2026 and itself drafted by a model running through Hermes Agent before Nokka reviewed it [31], breaks off inside the description of interface checking, before it reaches those four [32]. On the record as it stands, the checks on a 365,463-line deletion were the unchanged suite and a per-ticket interface comparison [17][27].
What to watch
- Whether Nous Research publishes post-merge defect or incident counts for the 698,363-line tree.
- Whether the hermes-agent-dev skill file is released, since the run leaned on lessons accumulated over months of daily sessions.
- Whether anyone reproduces the cost ratio on a codebase that starts somewhere other than 192 functions over 300 lines.