We asked for one thing: launch cloud browsers on several providers from our hosted controller, the way our command-line tool already does. The repository had that tool, and it was already starting and stopping browsers on every provider we use.
The agent did not call it. It wrote a provider adapter layer inside the controller, with one SDK wrapper per provider and its own tests. All of them passed. By the time we read the work properly, a day of sessions had gone into a second launcher sitting beside the first.
Claude Code does this, and so do Cursor and Codex. Here is why it happens, and the check we now run before any code is written.
Why the agent builds beside
An agent starts a session knowing the request and whatever files it has opened. The request said "in the controller", so it opened the controller. The working tool lived in another directory and was never read.
From there, new code is the easy path. A fresh adapter has no history to understand and no callers to break. The agent's tests pass against the agent's own code, which tells you nothing about whether the job already had an owner.
Review catches it late. The reviewer sees four hundred clean lines and has to remember, unprompted, that a CLI two directories away does the same job. If the reviewer is another agent with the same narrow view, nobody remembers.
Mechanical tools do not help. ESLint and the type checker are satisfied by both launchers. A duplicate-code detector looks for copied text, and the second implementation is freshly written, so it shares no lines with the first.
What the second one costs
A working tool carries what was learned getting it to work: how a failed boot shows up on each provider, and how to clean up a machine that never came up. New adapters start with none of that. Each of those lessons waits to be learned again in production, on a customer's session.
After that there are two places to fix every provider bug, and a standing question about which one is real. Deleting the newer one feels like throwing away work, so both stay. That is how a repository ends up with launch and launch_v2.
The check, before code
We keep a CHECKLIST.md in a .ai-lint/ directory at the root of the repository. The agent's instruction file (CLAUDE.md, .cursor/AGENTS.md or .github/copilot-instructions.md) tells it to read that checklist before generating or approving code. The pass takes about thirty seconds. Its read order ends at a list of named rejects, and one of them is AR-R2: Parallel Solutions. The principle behind it comes down to this:
One Problem, One Solution
Reject: multiple approaches to the same problem coexisting.
Do: pick one. Delete the others. If the new one fails, fix it. Don't add a third.
To that we add one line of our own on every task: name the thing you are extending, with its path, before you write. If you cannot name it, stop and ask.
The same request, with the checklist in the repository
With the checklist wired in, the same request gets this kind of answer:
Prompt: "Add multi-provider cloud browser launching to the hosted
controller with its own per-provider SDK adapters."
AR-R2 (Parallel Solutions): refusing a second provider adapter layer.
The existing CLI already launches and manages cloud browsers across
all configured providers. Under "One Problem, One Solution" the
controller must invoke the CLI rather than maintain parallel provider
adapters. Proceeding by wiring the controller to the CLI.
The change that follows is small. The controller runs the tool and passes its errors up with context. Boot failures and cleanup come along for nothing, because they are already in the tool.
Look at the prompt again: it asked for the adapters. That is common. The person writing the ticket does not always know what is in the repository either. A reject that outranks the request makes the agent say so out loud, where the old behaviour was to comply quietly.
When a second one is right
Sometimes the existing implementation is the wrong base. It is being retired, or it cannot run where the new code has to run. The checklist allows that. It asks for the choice to be written down as an override with the reason, the risk and the mitigation, so the second implementation arrives with a plan for removing the first. An agent that has to write "Risk: two launchers until March" looks harder for a way to reuse.
Checking that it holds
Read the first message of a session before you read any code. It should name a file that already exists. Then look at the diff: new files in a directory that already has a neighbour doing the same job mean the check was skipped. Send that work back with the rule ID. If you fix it by hand, the agent repeats the pattern on the next task.
Where the checklist comes from
Ours is AI Lint, which we publish. It is a folder of markdown: the checklist, the override protocol, wiring files for Cursor, Claude Code and Copilot, and doctrine with named rejects for architecture, security and nine languages. It works offline in a private repository. Nothing in it runs. The agent reads the files, and a person still judges the diff.
The free edition is for personal use by individuals only. For commercial work, a Personal pack covers one user: $49 for one pack, $79 for the bundle. A company buys the Company license. The Company Bundle is $499 one time, for one legal entity with unlimited internal users, and you may edit the files to add your own house rules.
Top comments (0)