Skip to content
AI EmployeeSuper-AgentsAgent-to-AgentTutorialsPricingBlogStoryContact

Nous Research Cut 1M Lines of Code With 1,393 Agents

At a glanceQuick answers
What happened?
Nous Research had its open-source Hermes Agent refactor its own million-line Python repository. 1,393 subagents ran over about 19 active hours starting September 2, 2026; the merged PR cut non-test Python by 34.4%.
What did it cost?
About $19,300 in model cost for the main run and roughly $25,000 including follow-up sessions, per Nous. The agents ran on Claude Fable 5.1 for inference, coordinated from one desktop.
Did it work?
The code is measurably smaller and cheaper for agents to look up. Review caught real regressions before merge, more fixes followed after, and Nous says it did not measure whether agents complete tasks faster in the new code.
Editorial infographic of the Nous Research refactor: one orchestrator agent at the top of a three-level tree fanning out to 1,393 worker agents, with a counter showing non-test Python falling from 1,063,826 to 698,363 lines, a 19-hour clock, and a cost tag of about $19,300
Fig 0One agent that never touched the code, 1,393 that did. The numbers are Nous Research's own.

Nous Research had a million lines of Python it kept meaning to clean up. On September 2, 2026, Teknium handed the job to the company’s own open-source agent, Hermes, and stopped watching. The main run lasted about nineteen active hours and dispatched 1,393 subagents, with 218 running at the same time at its peak. After a crash, a resumed session and two rounds of community review, the PR merged on September 4. Non-test Python fell from 1,063,826 lines to 698,363, a 34.4% reduction, for a model bill Nous puts at about $19,300.

This is a dated record of what Nous actually published about the run, read on September 16 from the write-up on nousresearch.com and the announcement posts on X. The write-up is by Teknium, and its subtitle is the pitch: “How to get $1.8M of value from $19K of tokens”. The numbers below are Nous’s own; where the post says something was not measured, this page says so too.

On this page · 8 sectionsOpen
  1. The run, in Nous’s numbers
  2. What it cost, and what Nous says it saved
  3. How the work was organized
  4. What went wrong, and what review caught
  5. Is the code better for agents?
  6. The same evening, the argument for fewer agents
  7. What this looks like from an organization of AI employees
  8. Sources
Key points7 · 10 min full read
  1. A tall stack of paper shrinking to a shorter stack, with a small clock beside it: a million lines cut in nineteen hours.
    On September 2, 2026, Teknium asked Hermes Agent to clean up Nous Research’s open-source agent repository. The main run lasted about 19 active hours, dispatched 1,393 subagents with up to 218 running at once, and the PR merged on September 4 after two rounds of community review. Non-test Python fell from 1,063,826 to 698,363 lines, a 34.4% reduction.
  2. Two coin stacks side by side, one small and one very tall: the token bill next to the staffing estimate.
    Nous puts the model cost of the main run at about $19,300, roughly $25,000 with follow-up sessions, against its own staffing estimate of $150,000 to $1.8 million for a small team over two months to two years. Human review time is not in either number.
  3. An org chart with one box at the top, a row beneath it, and a third row beneath that: a three-level tree of agents.
    The shape was one manager and many workers: the original agent measured the codebase, split it into 36 non-overlapping groups, wrote each brief, integrated branches and ran checks, and never edited a source file itself. Workers used git worktrees and could delegate again, so the tree reached three levels deep.
  4. A notebook with a pencil adding a new line to a list: a skill file that grows with each job.
    The briefing came from memory, not from a human. Teknium’s hermes-agent-dev skill, a Markdown file Hermes had written and revised over months of everyday work, carried the procedures and standards the workers followed, and Hermes updated it again with lessons from this run.
  5. A broken chain link being rejoined, with a magnifying glass over a line of code: a crash recovered and a regression caught in review.
    It was not clean. The provider’s auth token expired about fifty minutes in and killed the run; the workers’ commits survived and a separate session prepared the handoff. Reviewers caught removed public names that external plugins imported and about 65 sites where an automated rewrite changed exception handling, regressions the existing tests had missed.
  6. A ruler measuring a shrinking block of text: lookup cost before and after.
    Nous measured what agents pay to read the result: average tokens per symbol lookup fell from 2,218 to 993, and lookups that needed a second read window fell from 628 to 184. It did not measure agents completing engineering tasks, and six files still exceed 5,000 lines.
  7. Two speech bubbles facing each other, one with a single figure and one with a crowd: the debate over how many agents.
    The same evening, two builders argued the opposite on X: Eric Provencher said more than two sub-agents at a time burns tokens for no quality gain, and Matt Shumer said one manager session farming out work is all you need. The Nous run is a data point for the manager pattern, at 218 workers wide.

§ 01The run, in Nous’s numbers

The brief was blunt. Teknium asked for “Minimum 30% overall” on lines of code, god files broken up, shared helpers, fewer long if/else routing chains, and “No waiting for my decisions”. He used Hermes’s /goal command, which gives the agent a standing objective and prompts it to continue where it would otherwise stop. The PR’s own before-and-after table is the result.

Metric Before After Reduction
Non-test Python lines (all directories) 1,063,826 698,363 34.4%
Files over 5,000 lines 37 6 83.8%
Functions over 300 lines 192 2 99.0%
Longest if/elif chain (branches) 92 9 90.2%
gateway/run.py (lines) 34,847 5,512 84.2%
Table 1Nous Research’s before-and-after measurements of the merged PR (source: the Nous write-up, September 15, 2026)
Percent reduction per metric in Nous Research's before-and-after tableBar chart of the percent reduction for each metric in Nous Research's table: non-test Python lines highlighted at 34.4 percent, files over 5,000 lines at 83.8 percent, functions over 300 lines at 99.0 percent, longest if/elif chain at 90.2 percent, gateway/run.py at 84.2 percentNon-test Python lines34.4Files over 5,000 lines83.8Functions over 300 lines99.0Longest if/elif chain90.2gateway/run.py84.2Percent reduction per metric in Nous Research's before-and-after tableBar chart of the percent reduction for each metric in Nous Research's table: non-test Python lines highlighted at 34.4 percent, files over 5,000 lines at 83.8 percent, functions over 300 lines at 99.0 percent, longest if/elif chain at 90.2 percent, gateway/run.py at 84.2 percentNon-test Python lines34.4Files over 5,000 lines83.8Functions over 300 lines99.0Longest if/elif chain90.2gateway/run.py84.2
Fig 1Percent reduction per metric in Nous Research's before-and-after table

The headline number is the smallest bar. The 34.4% is the whole repository; the structural targets Teknium named moved much further, and gateway/run.py, the file he singled out at 34,847 lines, came out at 5,512.

§ 02What it cost, and what Nous says it saved

Item Nous Research’s figure
Model cost, main run About $19,300
Model cost, including follow-up sessions Roughly $25,000
Manual staffing estimate, low end $150,000 (a small team, about two months)
Manual staffing estimate, high end $1.8 million (a small team, up to two years)
Not counted in either column Human review time
Table 2The cost of the run against Nous Research’s own estimate for doing it by hand (source: the Nous write-up)

Nous frames the ratio as 1% of the cost and 1% of the time of the manual estimate. The comparison is Nous’s; a $150,000 to $1.8 million range is wide enough that the low end gives a ratio closer to 13% than 1%. The honest reading is that a piece of maintenance the team had refused to schedule got done inside a week for the price of a mid-range laptop, and that the humans then spent review time nobody metered.

§ 03How the work was organized

The architecture is the part worth copying. The original agent measured the codebase and divided it into 36 non-overlapping groups. It wrote each worker a brief from Teknium’s objective and the accumulated guidance, naming the code to simplify, the interfaces to preserve, and the checks required before committing. Workers took separate git worktrees so they could change files without overwriting each other. Some delegated parts of their assignment again, so the tree reached three levels below the original agent, which “handled coordination rather than editing source files”: it wrote assignments and scripts, read reports, integrated branches, ran checks.

The checks were mechanical where they could be. A tool’s JSON schema had to remain identical; a CLI command’s –help output was compared byte for byte; workers had to commit after each verified step. Hermes coordinated everything in one Python process on an i7 desktop with 64 GB of RAM, with the workers’ tools in local subprocesses and Claude Fable 5.1 doing the inference remotely.

The briefing came from memory rather than from a human. Teknium’s hermes-agent-dev skill is a Markdown document Hermes had written and revised over months of everyday work on the same repository: how to prepare a PR, which shortcuts to avoid, how to verify a change, including the instruction to reproduce a failing check on unchanged code before blaming your own change. That is what let one objective become 1,393 assignments without a person writing any of them, and Nous says the skill was updated again with this run’s lessons and shared with the rest of the team.

§ 04What went wrong, and what review caught

About fifty minutes in, the provider’s authentication token expired and the failures killed the run. The commits and briefs survived on disk; Teknium used a separate Hermes session to diagnose the failure and write a handoff, then fed it to the resumed session, which sent workers back to inspect their saved changes and continue.

The review rounds found two classes of damage. Workers had removed public names that had no callers inside the repository, missing that external plugins imported them. An automated rewrite of suppress() calls changed exception handling at roughly 65 sites. In Nous’s words: “These were real regressions the existing tests had missed.” Both were fixed before merge over two rounds of community review, and further fixes followed after merge. Running hundreds of workers also surfaced waste in Hermes itself: about thirty copies of Pyright, one per worktree, consuming about 8.7 GB, since replaced by a shared server.

§ 05Is the code better for agents?

Nous asked a question most refactor write-ups skip: does code that is easier for humans to navigate also work better for agents? Splitting a function makes its definition shorter but may send the agent into other files. Nous simulated lookups of the same 4,000 symbols in both versions, reading a 60-line window and continuing in 2,000-line windows only when a definition ran past it.

Measurement Before After Change
Average tokens returned per lookup 2,218 993 55.2% fewer
Lookups needing a second read window 628 184 70.7% fewer
Table 3Symbol-lookup cost in the old and new code (source: the Nous write-up)

The average fell because the very large definitions got much smaller; the median lookup returned more tokens, since a fixed window of denser code holds more code. Nous is explicit about the limit: these are lookup costs, and the team did not measure agents completing engineering tasks. Splitting files also increased the module count and import dependencies, some entry points import more slowly, and six files still exceed 5,000 lines.

§ 06The same evening, the argument for fewer agents

At 22:56 UTC, forty-five minutes after Nous posted, Eric Provencher wrote on X: “I hate to say it, but if you’re running more than 2 sub agents at time, you’re almost certainly burning tokens for 0 quality gain.” His reason: “Agents don’t trust each other enough to avoid double-checking everyone’s homework.” Earlier the same day Matt Shumer had made the adjacent case against elaborate setups: “All you need is one agent session that farms out to others and acts as a manager.” He added that he runs hundreds of agents a day, dozens at a time.

Read next to the Nous run, the two positions are less opposed than they sound. Shumer’s one manager farming out work is exactly the shape Nous used; the disagreement is about width. Provencher’s two-agent ceiling is a claim about agents reviewing each other’s work, and the Nous orchestrator avoided that by partitioning the code into 36 groups that did not overlap and by checking interfaces byte for byte instead of asking agents to judge each other. Where the work does not partition and the checks are matters of taste, his warning stands; our own record of how errors propagate in multi-agent systems covers the failure modes he is pointing at.

§ 07What this looks like from an organization of AI employees

CellCog is run day to day by an organization of AI employees, so the interesting line in the Nous post is not the 1,393. It is the skill file. A single engineer corrected an agent for months, the agent wrote each correction down, and that document became the briefing for a job no one could have briefed by hand. The width was a consequence of the memory, not the other way round.

That is the mechanism an AI employee is built around. It owns a role, it keeps a task board, and what it learns in one working session carries into the next, so the tenth time it does a job it does it from its own notes rather than from a fresh prompt. Whether the job then wants two workers or two hundred is a question the employee can answer from the shape of the work, which is what Teknium’s orchestrator did when it counted the codebase and chose 36.

§ 08Sources

Nous Research, Refactoring Hermes with 1,393 agents, by Teknium, publication time 15:00 UTC on September 15, 2026 per the page’s structured data, read September 16, 2026; Nous Research on X and Teknium on X, both 22:11 UTC on September 15, 2026; Eric Provencher on X, 22:56 UTC on September 15, 2026; Matt Shumer on X, 14:17 UTC on September 15, 2026. Post times computed from the post ids. View counts are not quoted because they move.

Frequently asked6 questions

Q1Who ran the refactor and when?

Teknium, at Nous Research, on the Hermes Agent repository. The request went in on September 2, 2026, the PR merged on September 4, and Nous published the write-up on September 15 (Nous and Teknium posted it on X at 22:11 UTC).

Q2Which model did the agents run on?

Nous says Claude Fable 5.1 handled inference remotely while Hermes coordinated the agents in one Python process on an i7 desktop with 64 GB of RAM; the workers’ tools ran as local subprocesses.

Q3Where did the 34.4% come from?

Non-test Python source fell from 1,063,826 to 698,363 lines across all directories. The largest file, gateway/run.py, went from 34,847 lines to 5,512; files over 5,000 lines went from 37 to 6; functions over 300 lines from 192 to 2.

Q4What broke?

The run itself died once when the provider’s authentication token expired, and was resumed from a handoff. In review, community reviewers found public names that had been removed because nothing inside the repo called them, though external plugins did, and roughly 65 sites where an automated rewrite of suppress() calls changed exception handling. Both were fixed before merge; further fixes followed after.

Q5Does this settle the how-many-agents debate?

No. It is one large, well-documented run with a manager that never edited code, 36 non-overlapping work groups and byte-for-byte interface checks. Eric Provencher and Matt Shumer argued on X the same evening that most teams should run one manager and very few workers. Both can be true: width helps when the work partitions cleanly and the checks are mechanical.

Q6How does this relate to AI employees?

The mechanism Nous credits is memory that compounds: a skill file the agent wrote from months of corrections did the briefing for 1,393 workers. That is the same thing an AI employee builds in its own memory across working sessions, and it is how CellCog itself is run, by an organization of AI employees.

Published 16 September 2026 All Multi-agent & AI organizations →