lessloc
Keeps AI coding agents to the least code that does the job and still works, via hooks for Claude Code, Codex, Copilot, Gemini CLI, Cursor and others.
At a Glance
Free, open source (Apache-2.0) tool for AI coding agents; no account or API key required.
Engagement
Available On
Alternatives
Listed Oct 2026
About lessloc
lessloc is an open-source tool from rextail-ai that constrains AI coding agents to write less code while still completing the task. It works with agents such as Claude Code, Codex, GitHub Copilot, Gemini CLI, Cursor and OpenCode, and is installed by asking the agent to follow an install instruction. The project is released under the Apache-2.0 license, and its latest listed release is v0.10.0.
What It Is
lessloc is a code-quality layer for AI coding agents. It steers the agent to reuse what a project already contains instead of rewriting it, so there is less code to review. It also refuses placeholders, commented-out code and stray backup files. If an agent reports a task as done while its own tests still fail, lessloc sends it back to fix them first.
The project states that it requires no account, no API key and no network calls, has no dependencies, and that nothing leaves the user's machine.
Setup Path
Installation is done by telling the coding agent to install lessloc by following the published install.md instructions, after which the agent sets up the hooks. For Claude Code, the README also gives plugin marketplace commands. Removal works the same way, by pointing the agent at a remove.md page. The project also publishes llms.txt documentation for agents.
Claimed Results
The lessloc site and README claim up to 36% less code and 26% lower cost with the same results. They cite a benchmark of 117 real changes across 3 open-source projects judged by hidden tests, reporting 27% less code and 23% lower cost overall. These figures are the vendor's own benchmark claims.
Community Discussions
Be the first to start a conversation about lessloc
Share your experience with lessloc, ask questions, or help others learn from your insights.
Pricing
Open Source
Free, open source (Apache-2.0) tool for AI coding agents; no account or API key required.
- Apache-2.0 license
- No account and no API key
- No network calls of its own
- Works with Claude Code, Codex, OpenCode, GitHub Copilot, Gemini CLI, Cursor and more
Capabilities
Key Features
- Reuses existing project code instead of rewriting it
- Refuses placeholders, commented-out code and stray backup files
- Sends the agent back to fix failing tests before it reports done
- Installs via agent-followed instructions or Claude Code plugin commands
- Runs locally with no account, API key, network calls or dependencies
- Works with multiple coding agents
- Published benchmarks on real changes
