SShortSingh.
Back to feed

Nous Research's Hermes AI Cut Its Own Codebase by 34% Using 1,393 Subagents

0
·7 views

On September 2, 2026, Nous Research tasked its Hermes Agent with refactoring the entire Hermes codebase, a process that ran for 19 hours and deployed 1,393 subagents with up to 218 running simultaneously. The operation reduced non-test Python code from roughly 1.06 million lines to 698,363 lines, a 34.4% decrease, and the resulting pull request was merged on September 4, 2026. Functions exceeding 300 lines dropped from 192 to just 2, while the single file gateway/run.py shrank from 34,847 lines to 5,512. The estimated cost of the main run was approximately $19,300, compared to a human-team estimate of $150,000 to $1.8 million for equivalent manual work. The team openly noted limitations in their own write-up, including that no new tests were written and the existing test suite remained essentially unchanged throughout the refactor.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Open-Source Django App Visualizes Cross-Database Field-Level Data Lineage

A developer has released the third and final part of a tutorial series on building a cross-database, field-level data lineage tool. The series concludes with the implementation of a web application called 'web_data_lineage_show', built using Python's Django framework. The app visualizes lineage data that was parsed and stored in the earlier two installments of the series. According to the author, testing confirmed that the field-level lineage parsing is fully accurate. The complete source code for the web project has been made publicly available on GitHub.

0
ProgrammingDEV Community ·

Why OpenAI JSON Parsing Errors Occur in Node.js and How to Handle Them

Developers using OpenAI's API in Node.js sometimes encounter intermittent JSON parsing errors such as 'could not parse JSON body' or 'EOF while parsing an object,' even when no code changes have been made. These failures stem from three distinct causes: proxy or network corruption mangling request bodies, streaming truncation where JSON is parsed before the stream completes, and model-side malformation of tool call arguments. Because the errors are transient, they cannot be reliably reproduced or debugged through standard stack traces. Different error types require different responses — transient 400 errors need retry with backoff, truncated streams may need higher token limits, and malformed tool arguments require inline sanitization rather than a retry. A lightweight open-source Node.js package called llm-shield has been published to automate this error-handling logic, wrapping existing LLM calls with configurable retry and sanitization behavior across providers including OpenAI, Anthropic, and Gemini.

0
ProgrammingDEV Community ·

How Eager Loading and Indexing Fix the N+1 Query Problem in Web Apps

The N+1 query problem occurs when an application fires one database query to fetch a list of records and then an additional query for each record to retrieve related data, causing severe performance slowdowns under load. A developer discovered this issue after a feature launch pushed page load times to six seconds, tracing it back to 101 separate database queries for just 100 blog posts. The fix involves eager loading — using tools like Django's select_related for foreign-key relationships and prefetch_related for reverse or many-to-many relations — to consolidate multiple queries into one or two. Adding database indexes on frequently filtered columns, such as published_at, can further reduce query execution from seconds to milliseconds by avoiding full table scans. Together, eager loading, proper indexing, and careful query construction form a layered approach to keeping database-driven applications fast and scalable.

0
ProgrammingDEV Community ·

Developer builds RAG system from scratch in Python without frameworks

A developer has published a detailed walkthrough on building a Retrieval-Augmented Generation (RAG) system in Python without relying on high-level frameworks like LangChain. RAG allows large language models to answer questions about private or current documents by retrieving relevant text snippets before generating a response. The tutorial covers the full pipeline, including chunking documents into semantically meaningful pieces, converting text into vector embeddings using a sentence transformer model, and performing similarity-based retrieval. The guide also addresses hybrid search combining vector and keyword methods, re-ranking results, and attaching source citations to answers. The author emphasizes that chunking strategy is the most critical decision in a RAG pipeline, recommending 100–250 word chunks with 10–20% overlap and preserved metadata.