---
id: 18389
lang: en
title: "An AI agent turned a 200-line feature into 8,391 lines: boredom no longer stops overengineering"
published_at: "2026-11-27 02:34:31"
source_name: "Habr AI"
source_url: "https://habr.com/ru/companies/bhv_publishing/articles/1112750/?utm_campaign=1112750&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/18389"
categories: ["llm", "autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# An AI agent turned a 200-line feature into 8,391 lines: boredom no longer stops overengineering

> **Краткая суть (BLUF):** Engineer Alexander Stavonin planned to fit the choice of a test device for CI into 200 lines, but the AI agent added 8,391 lines, 3,431 of them tests. Each decision was justified on its own, but together they formed a bulky system with a daemon and locks. Boredom used to stop overengineering, and the agent has none. So each option in the design doc should record its cost in files, mechanisms, and tests.  • The design went through 7 review iterations and collected 84 comments • Of 58 entries in the regression registry, 50 originated inside the review loop • The two-line variant with a task slot number never made it into the doc

We usually worry that an AI agent will write too little or write it with bugs. Engineer Alexander Stavonin, author of the book "High-Performance Go," described the opposite problem: the agent does everything correctly, but too much. A CI feature was supposed to take about 200 lines, but the result was a diff with 8,391 added and 692 deleted lines, 3,431 of which were tests. The author immediately notes that this is a single case, analyzed after the fact. But the mechanics will be familiar to anyone who hands design work to agents.

## What needed to be done and what came out

The task sounded simple. A CI job needs one or two physical devices connected to a test bench. The code should list what is connected, select the device that is currently online, and return it when the connection drops.

The agent built an entire system: a forked daemon that holds a lock for the job's lifetime, checks the PID against the process start time, can shut processes down in stages from SIGTERM to SIGKILL, cleans up its files, and detaches stdio. Plus tests for all of the above. Stavonin verified that nothing found in review was fabricated, and that every defensive condition covers a real situation. The problem is not individual decisions; the failure is visible only at the level of the whole system.

## Where boredom went

In the past, when choosing between a 150-line option with a weak spot and a 1,000-line option with a background process, an engineer unconsciously weighed three weeks of their own life: wrestling with file descriptors and waking at two in the morning because of an orphaned process. No design doc template has a field for "how much will the implementation cost." It was never needed: whoever chooses an option also pays for it. Overengineering existed before, but it had a ceiling, the limit of human tolerance for routine. Now there is no routine, and the ceiling is zero.

The analogy with a smart junior, according to the author, no longer works. Over two years at a bench, a junior builds intuition: a colleague with a year of experience will immediately say that device recovery fails not only because of the board, but also because of a corrupted packet, a full disk, or a crashed adb server. Meanwhile, a working device gets wrongly quarantined. The agent forgets everything after a session, so Stavonin has to turn every rule into a file on disk. Without experience, any correct but minor remark carries the same weight as an important one.

The design doc had seven options, and six were rejected. A simple lockfile scheme was dismissed because of the problem of a stale lock owner, and a 550-line option that solves the same problem won. The eighth option never made it into the doc: the runner already launches as many concurrent jobs as there are devices, and each job has a stable slot number. It is enough to take the sorted list of online devices and select the element by that number, which is two lines of code. The drawback is known: if a device is disconnected and the parallelism is not changed, two tasks will get the same device. But nobody asked "is this guarantee worth 970 lines and a daemon," because no number was ever written down.

## A review that never tires

The design went through seven review iterations and collected 84 comments. In the fourth round, another 9 complex and 14 moderately complex cases turned up, all of them new. Live reviewers don't work that way: by the fourth round someone says "enough." The agentic loop remembers only the iteration counter, while the review history files sit in an ignored directory. Each pass evaluates the already-grown code from scratch, and the growth looks like progress.

Mutation testing revealed seven defensive checks that the tests did not notice: the tests asserted things that could not break. The loop has only two outcomes, "approved" and "changes needed," so the only signal is "coverage is insufficient," meaning more tests are needed. As a result, 50 of the 58 entries in the regression registry appeared as comments inside the loop itself. This means most of the permanent test suite guards against defects that did not exist outside the branch.

## What the author proposes

The fix is small: each option in the design doc gets two mandatory lines, the cost in files, new mechanisms, and tests, and the requirement the option does not meet (or "none"). The cheap option wins by default, and the expensive one is acceptable only if it names a requirement the cheap one does not cover. In Stavonin's doc, this took 31 words: a single table for all seven options.

Honest limitations: the agent writes both the requirements and the options in one pass, so a requirement can be tailored to fit the expensive solution. The author suggests checking where a requirement comes from: through a ticket, a dated incident, or an external source such as a protocol or a platform limit. A requirement derived by analysis but never actually observed must not override anything. This provides no guarantees, but it makes the trade-off visible, and gives a human a chance to notice it.

The practical takeaway: if agents take part in design, do not count on boredom to stop them. Put the cost back into the document, and before the review, ask yourself who will have to deal with this code on a Tuesday evening.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/companies/bhv_publishing/articles/1112750/?utm_campaign=1112750&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18389
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
