Show HN: Parsimony – an open-source benchmark for how much code AI models add
TL;DR Highlight
Counting syntax units in SWE-bench patches ranks which AI models add the least code
Who Should Read
A backend developer worried that bloated AI-agent code is making the codebase harder to maintain
Core Mechanics
- Benchmarks ignore code bloat
- Existing benchmarks measure only solve rate and cost.
- Excess code that makes a codebase harder to work with isn't penalized.
- It counts syntax elements, not lines
- It counts coding units such as calls, names and literals.
- Net units = added − removed.
- It only analyzes already-published patches
- Each patch is applied and both versions of every changed file are parsed.
- Tests aren't rerun, tests/docs/generated files are excluded, and only Python is measured.
- Ranking is mean net units on solved tasks, lowest first
- Solved status comes from SWE-bench Verified.
- All models use mini-SWE-agent, but the agent still affects how much code gets written.
- Smaller isn't always better
- Units measure size, not readability or design.
- A model whose fixes mostly delete code can rank first with a negative net.
- Models that write more code tend to solve more
- Spearman is 0.33–0.60 on boards with 26+ models.
- The author's own GPT-5.6 Sol run added 0.88× the code of its published run.
Community Reactions
- Astra winning is a weak signal, one commenter said
- They called Astra's code nearly unreadable code golf.
- They'd rather have Claude's excessive comments and tests.
- Add cyclomatic complexity as a supporting metric, one commenter suggested
- They see AI-written code increasingly suffering from complexity.
- They proposed it as a readability proxy.
- One commenter doubted that less code means less review work
- The metric doesn't show whether size tracks review effort.
- One commenter wanted local models included
- They want to see how close open-weight models are to commercial ones.
How to Apply
- Add a minimal-change rule to your agent prompt
- Add a minimal-change instruction to your coding agent's system prompt or CLAUDE.md.
- Run the same 3 issues before and after and compare diff size.
- Log net diff size per PR
- Record added and removed lines for each agent-made PR, by model.
- Compare per-model averages on the same tasks when choosing a default model.
- Pair code size with other review criteria
- Don't pick models on code size alone; check test passes and readability too.
- Filter out short but unreadable code-golf output separately.
Try It
# Paste into Claude Code or ChatGPT — simplified version of the Parsimony idea (minimal-change review)
Review the diff below. Decide whether this change is the minimum needed to resolve the issue.
{{diff}}
Answer in this order.
1. Separate necessary changes from unnecessary ones.
2. Point out unnecessary additions (duplicate logic, excess defensive code, needless helpers) line by line.
3. Show a smaller fix that keeps the behavior. Don't compress into unreadable code.
Next to try: compare added/removed line counts before and after the fix.Terminology
Related Papers
Gemini 4 Neon is the new #1 on the Models Engineering Index
Gemini 4 Neon ranks first on the Models Engineering Index with 68.0, combining multiple benchmarks.
LLMs can read and write executables byte by byte from a hex dump
Given only a hex dump and no tools, an LLM analyzed, patched and wrote working executables.
Claude was trained on protein sequences at scale
Next-amino-acid tests on obscure proteins show only the latest Claude models predict them
Remembered as Brief: Stored Preferences SilentlyRemove Decision-Critical Information
A stored 'keep it short' preference silently drops warnings; listing must-know points first restores content.
All AI-generated code should be Open Source
A blog argues AI-generated code should be open source; most HN commenters disagreed.
What thousands of conversations look like inside a language model
Mapping Qwen3-1.7B states showed Chinese sitting apart from English, while German and Croatian overlapped it.
AI, activity, and outcomes in software engineering
AI sped up writing code, but shipping speed did not rise as much, says a talk
LLMs Play Zachtronics' TIS-100
16 LLMs played TIS-100 and set 133 new Pareto frontier points across 18 puzzles