
2026-11-27
by Uri Walevski
Want this agent engine live in your WhatsApp — 1-on-1 or in group chats?
Try MentatFrom human engineering experience, code maintainability matters a lot. Every team that has lived with a codebase for more than a few months has felt the compounding cost of tangled abstractions, global state, and fragile test setups.
With coding agents, that assumption is suddenly up for debate. This came up again in a discussion on X where Tom Sydney Kerckhove pushed back on the claim that unmaintainable code is not a problem when only agents are maintaining it.
The reason this argument keeps resurfacing is simple: LLMs can brute-force bad code. An agent can scan thousands of lines, trace side effects across poorly structured modules, and patch its way past a bug that would slow a human down for hours. That problem-solving capacity hides the drag. Even when a codebase suffers from recurring bugs caused by patterns like mocking via monkey-patching, an agent often powers through the failure instead of refusing to touch the file.
Because the cost is obscured rather than obvious, intuition alone will not settle the debate. Until we actually prove and measure how much maintainability matters for LLMs, the doubt remains.
Most coding benchmarks today measure one-shot or greenfield implementation: take a prompt, pass a test suite, stop. Even repository-level bug-fixing benchmarks evaluate isolated patches on existing open-source repos without connecting how a codebase was built to how expensive it is to change later.
To measure maintainability directly, we need a two-stage benchmark that holds the same model and harness constant across every run and tracks what happens after v1 ships:

Give the agent a clear product and technical specification and ask it to implement v1 from scratch. Verify correctness against a suite of hidden tests that the agent never sees during implementation. Record three metrics:
The output of Stage 1 is a working v1 codebase.
From that exact v1 codebase, fork two independent evaluation tracks in parallel so neither track contaminates the other:
By keeping the model and harness fixed across Stage 1, 2a, and 2b, the variable under test is no longer "which agent is smarter." The variable under test is the maintainability of the resulting code and the stack underneath it.
Once you have a repeatable Build -> (Augment || Fix) pipeline, you can run the exact same v1 spec, v2 feature, and bug-planting protocol across different technical choices:
A framework or library that looks fast during Stage 1 scaffolding may carry a steep tax in Stage 2a and Stage 2b. Conversely, a stack with slightly higher upfront ceremony might pay for itself the first time an agent has to add a feature or chase down a regression. Measuring all three stages separates initial generation speed from long-term maintainability.
Holding the model and harness constant isolates the stack. A natural next step is to relax that constraint and run a cross-model matrix: build v1 with Model A, then run Stage 2a (Augment) and Stage 2b (Fix) with Model B.
That matrix answers practical questions teams already face. Does a frontier model write code that a smaller, cheaper model can safely extend and debug? Or do some models produce clever, tightly coupled implementations that only the same frontier model can untangle later?
We think about this problem constantly while building prompt2bot, a platform for hiring AI agents for various purposes. When agents write skills, integrations, and automations that keep running and evolving over months, day-one generation is only the beginning. The enduring cost is every follow-up change, new requirement, and bug fix after that.
We already have plenty of benchmarks for whether an agent can write code. It is time we had one for whether the code it writes can actually be maintained.
← All posts