You ask a coding agent for a settings screen and it comes back working. The save button is a button element with a dozen utility classes: the right colour, nearly the right radius, a hover state. The codebase already had a Button component, with its variants, its focus ring and its loading state. Now it has two, and the new one will drift away from the old one quietly, one edit at a time.
Nothing about that change looks wrong in review. The screen works and the styles look right. What is wrong is that something already existed and was not used, and none of the usual checks, a type checker, a linter, the tests, asks that question.
Why it happens
My reading is that an agent writes from what it can see. It opens the files the ticket points at, and perhaps a neighbour or two. Whether a component exists somewhere else in the repository is a question it has to think to ask, and then answer by searching. Writing new markup is the shorter path to a screen that works, and a screen that works is what the ticket asked for.
Token drift has the same cause but a different shape. A raw hex value next to a colour token is a value a machine can compare. A hand-built button is a pattern, and it only counts as a problem if you know the component it copies.
What Saer does
Saer is a tool I built that reconstructs the design system a codebase actually has, its tokens, components and hooks, from the code itself. It gives that system to coding agents through a local MCP server. Before the agent writes, it can ask what to build a screen from, and Saer recommends the existing components. After it writes, Saer checks only the lines the agent wrote, not the whole file it touched.
What Saer reports is labelled with one of eight states: known, observed, computed, inferred, conflicting, unknown, unresolved or proposed. Unknown means the evidence in the code cannot answer the question. Saer says so and never fills the gap with a guess, because a confident wrong answer does more harm to an agent than no answer.
The benchmark
I wanted to know whether this changes what an agent actually does, so I measured it. The run finished on 22 October 2026.
- One agent, Codex, on one model and one setting throughout.
- Real UI tickets across three production codebases. One is my own app; the other two are popular open-source products.
- Each ticket ran twice without Saer and twice with it, so both sides had the same number of runs, every one starting fresh.
- In the runs with Saer, the server was connected and the prompt gained one sentence asking the agent to use it to find existing components, hooks and tokens, and to check its changes before finishing.
- Each diff was judged blind by AI judges who saw the ticket, the diff and the untouched source, never which side the diff came from.
What it found
Hand-built UI where the codebase already had a component: 22 runs without Saer, 5 with it. Where the two runs of a pair disagreed, almost every pair favoured the side with Saer, and an exact paired test puts that split well beyond what luck would explain.
Hand-built empty states were the clearest single case: common without Saer, and gone with it.
Completion did not measurably change. Fully complete runs and runs with any defect were within a couple of runs of each other on the two sides. Neither difference is one the test can tell apart from noise, so the honest reading is no difference detected, which is not the same as no difference.
It also cost something. The runs with Saer used noticeably more input tokens, almost all of them cached, with output about the same and several calls to Saer per run.
And Saer was wrong in two runs in ways that mattered. In one, it told the agent a wrapper component accepted a prop it did not, and the agent's code had a type error as a result. In another, Saer's check came back clean on a file with a syntax error, and the agent quoted the clean result as its proof. Both are fixed now, with tests. The lesson stays: a clean design-system check says nothing about whether the code is correct.
The limits
- One agent and one model. Nothing here says how another agent would behave.
- The judges were AI agents, and no person reviewed a sample. Hand-built is the noisiest call to make: a fresh judge, given a sample of the diffs again, did not agree with every original verdict.
- The runs with Saer also had the extra sentence telling the agent to use it, and there was no run with that sentence alone. Some of the effect may come from being told to look for existing components at all.
- Three codebases and a few dozen tickets. That is enough to show a direction, not to promise a size.
What it suggests for teams
The agents in this benchmark could write the UI. What they missed, much more often without Saer, was what already existed. That points at a few things a team can do with any agent, whatever tool it uses.
- Give the agent the inventory before it writes. An instruction to reuse components only helps if the agent can find them.
- Measure reuse, not only completion. Here completion looked the same on both sides. The difference only showed when someone asked whether the component already existed.
- Check what the agent wrote, not the whole file it landed in. A whole-file check buries one new problem under every old one.
- Do not read a clean design-system check as a correct change.
- Count the cost. More context means more tokens, even when most of them are cached.
What I take from it
- Rebuilding a component looked like a gap in what the agent knew, not in what it could do.
- Report the method and the limits with the number, every time.
- Say no difference detected when that is what the test shows.
- Publish where the tool was wrong, as well as where it helped.
Saer is in private beta, and you can request early access at saer.app. If your team uses coding agents on a React codebase with a component library, I would like to hear what yours rebuild.