Hermes refactors its million-line codebase
Teknium reports a Hermes refactor using 1,393 subagents, a restart and community review before merging a change that reduced non-test Python source by 34.4%.
Original prompt
Shared by the source author. See source notes for context.
I want a massive simplification set of PRs. or a single monolithic PR. I want LOC to drop dramatically. Minimum 30% overall.
Reach people exploring AI agents
See placements →Evidence at a glance
Sourced account- Source author
- Teknium
- Original account
- Read the source ↗
- Published
- 15 Sept 2026
- Source link checked
- 15 Oct 2026
- Reported result
- Teknium reports a Hermes refactor using 1,393 subagents, a restart and community review before merging a change that reduced non-test Python source by 34.4%.
- Human involvement
- Teknium sets the objective, restarts after failure and merges only after follow-up and community review. Cost comparisons exclude review time.
A linked account supports attribution. It does not mean we independently reproduced its result.
Report an issue with this case
Open correction emailOpens your email app with the case link included. Nothing is sent automatically.
How the agent did it
- Teknium gives Hermes a standing simplification goal for its own repository.
- The orchestrator divides the codebase into 36 groups and assigns workers isolated worktrees.
- Workers simplify code while preserving declared interfaces and compare checks with a frozen baseline.
Teknium asked his regular Hermes agent to simplify the Hermes repository, split oversized files and remove at least thirty percent of its source lines. The account says the main run lasted about nineteen active hours and dispatched 1,393 subagents, with as many as 218 running concurrently.
The orchestrator measured the repository and divided it into 36 groups. Workers used isolated Git worktrees, written briefs and explicit interface constraints. The parent coordinated assignments and integration rather than editing source itself. Checks compared behavior with a frozen baseline, including tool schemas and command help output.
The run did not proceed uninterrupted. A provider authentication token expired about fifty minutes in. Existing commits and briefs survived, allowing a separate Hermes session to diagnose the problem and continue. The author describes follow-up work and community review before merging the refactor on September fourth.
The account also records fixes after the merge. The reported reduction was 34.4 percent of non-test Python source. Cost estimates excluded human review, and the staffing comparison was an estimate rather than a measured saving. This is useful evidence for a large cleanup workflow precisely because restart recovery, baseline checks and outside review are part of the outcome. A large subagent count alone does not establish that every change was correct.
Prompt
Original prompt
Source: nousresearch.com · Teknium
Frequently asked questions
Was the run uninterrupted?
No. An expired provider authentication token killed the run; saved worker state supported continuation.
What result was reported?
A merged refactor reducing non-test Python source by 34.4%, after follow-up work and community review.
Is the staffing comparison a measured saving?
No. It is the team's estimate of possible manual effort, and the model-cost figure excludes human review.
More details
Remaining steps
- After token expiry interrupts the run, saved commits and briefs support diagnosis and continuation.
- Human and community review precede a merged refactor with a reported 34.4% source reduction.
About this account
The Hermes orchestrator divided the repository into 36 groups, delegated changes in isolated worktrees, compared checks with a frozen baseline and integrated worker results.
Firsthand account opened and read. Outcome is source-reported, not independently reproduced. Original publication metadata is September 15; run/merge dates are September 2–4. Model costs and staffing comparisons are author estimates. Original prompt box contains a short excerpt of the author's published actual-run instructions.
Credit: Teknium
Source published 15 Sept 2026
Source checked 15 Oct 2026
Tools and topics
Hermes Agent · Git worktrees · Python
Hermes Agent · Git worktrees · Python
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.