
Why it mattersAn agent that writes less code also costs less to run. The savings came from a real test, not a toy one.
A coding agent on a long task tends to add code the task never asked for: new abstractions, duplicate helpers, extra comments. The lessloc project is one short rule pack. It stops this before the agent writes the extra lines.
The rextail-ai team at GitHub published lessloc under Apache-2.0 on 19 October 2026. The GitHub API reports 101 stars. The main branch was last pushed on 23 October 2026. It plugs into five coding tools: Claude Code, GitHub Copilot, Cursor, Gemini CLI and Codex. The author tested the pack on 117 real changes in open-source projects. The agents wrote 27 percent less code at 23 percent lower cost. The final result was the same.
How the pack works
lessloc is a set of files, not a wrapper around an agent. Each tool has its own folder in the repository. The pack lives in the project the agent is working on. Each folder holds two things. One is the hook that runs before the agent writes a file. The other is the configuration that tells the hook what to look for.
The hook reads what the agent is about to write. It compares it to the rest of the project. It flags five patterns. First: a new helper when one already exists. Second: a placeholder comment that adds no fact. Third: a stub function the agent plans to fill in later. Fourth: duplicate work the project already has. Fifth: an abstraction wrapping one caller only. The agent is then asked to pick a smaller change that still passes the task.
What the numbers measure
The 27 percent and 23 percent figures come from one run across 117 changes in open-source projects. The author also quotes a higher cap: up to 36 percent less code and 26 percent lower cost on single tasks. The method is in the README. The pack ran on real pull requests, not a benchmark set the author chose themselves.
The dollar figure comes from the token meters of each tool. A pass that writes fewer tokens also reads fewer tokens on the next step. The file the agent is editing stays smaller. That is the whole mechanism. There is no model change and no new agent.
The pattern worth copying
Many teams run a coding agent on a repository another agent already wrote. A second pass tends to add more code than it needs. The lessloc rules can be copied into any agent setup a team already runs, and tried on one task. The repository is Apache-2.0. A company can fork it and change the rules to match the house style.
The author says the pack is strongest on refactors and on bug fixes. There, the smaller change is the right change. On a first pass that is building something new, the hook can block useful code. The README recommends turning the duplicate-work rule off for that case.
Source
rextail-ai/lessloc on GitHub, with stars and commit dates confirmed against the GitHub API.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.
