NousResearch used 1,393 subagents over 19 hours to refactor a million-line codebase
_rchaves_ · x · 2026-09-20
NousResearch reports that on Sept 2 they set Hermes Agent loose on 1 million lines of Python: 1,393 subagents and 19 hours later, the codebase was 34.4% smaller, saving nearly $2m in engineering hours.
- The output is a domain-driven refactor PR across the entire monorepo (langwatch/langwatch #7536, draft, 3,215 commits)
- The PR describes the rot: the same integration done six different ways, services sourced from globals/hono/trpc/repositories/fresh instances, and new structure added without removing old code
- Fix approach: singular feature packages with one contract and one service, private repositories, class-based implementations
- Another dev (rchaves) says they're attempting something similar but larger, not yet done
A rare public case of agents autonomously refactoring a real production codebase at scale.
More from coding & agent
- SoL-Pi: Auto-research loops optimize coding agent harnesses, cutting tokens 44-49% — burny_tech · 2026-09-20
- Dev forks MiniMax's terminal coding agent, maintains separate branch with security updates — jasonkneen · 2026-09-20
- Kevin Rose built an offline Grok Bot that turns years of saved IG videos into a searchable md wiki — minchoi · 2026-09-20
- How do teams validate citations in production RAG? Duplicate-source checking called too narrow — No-Profile-6178 · 2026-09-20
- Dev spent a quarter saying "I'm on it" with nothing to show for it — cto_junior · 2026-09-20
- LangChain's Jev-as-a-Judge: cheap, fast semantic verifiers for agent evals — multiply_matrix · 2026-09-20