Blog

The five states your agent never builds

Words plagio team

Share X, LinkedIn

Empty, loading, error, too much, and the double click. A page with only its happy state is half a page, and the missing half is where users live.

Generated interfaces are built for the demo: three rows of data, a name that fits, a network that answers. Then someone real arrives with no data, a slow connection and a name 40 characters long, and the page you shipped is not the page they see.

Five states, in the order they bite.

1. Empty

The first thing every new user sees, and the one state an agent never writes. An empty table with headers and nothing under them is a bug as far as the user is concerned.

What it needs: one line saying what goes here, and the action that puts something here. Not an illustration of a box. If the list can be empty because a filter excluded everything, that is a different empty state and it needs a way back.

2. Loading

Skeletons that match the shape of what arrives, or nothing at all. A spinner in the middle of the page is the lazy answer, and it moves the layout twice: once when it appears, once when the content lands.

The state people forget inside this one: loading more. The first page arrives, then the second request runs with no sign it is running, and the user clicks again.

3. Error

Two kinds, and agents write neither. The request failed, which needs a retry and some idea of whether it was you or us. And the input was wrong, which needs to say which field and what would be right, next to the field, not as a toast that disappears while you are still reading it.

"Something went wrong" is the house style of generated UI. It is the one string that tells the user nothing at all.

4. Too much

The demo had three items. Production has 2,000, a title of 300 characters, a 40-character word with no spaces, and a number with eight digits where you allowed three. Everything in a generated layout is sized for the happy case.

What it needs: truncation you decided on, wrapping that does not break the card, a maximum for the list, and a number format that does not become a scrollbar.

5. The double click

The one that costs money. A submit button that is not disabled while the request is in flight, so an impatient user pays twice, posts twice or sends two invitations. Agents reliably write the handler and not the guard.

Disable on submit, re-enable on response, and make the disabled state visibly disabled rather than just unclickable.

How to ask for them

Make the states part of the request, not a later pass: "build the list view with its empty, loading, error and long-content states". Asked afterwards, an agent tends to add them as separate components that do not match the one it already built.

And when you review, review in that order. The full checklist is here, and these five are the half of it that users actually meet.

Questions people ask

Which UI state do AI agents forget most?

Empty. It is what every new user sees first, and a generated page is built around data already existing.

What is wrong with "Something went wrong"?

It tells the user nothing: not what failed, not whether retrying helps, not whether it was their input. Say which field or offer a retry.

Why does my form submit twice?

The button was not disabled while the request was in flight. Agents write the submit handler and leave out the guard.

Should I ask for states up front or after?

Up front, in the same request as the component. Added later they arrive as separate pieces that do not match what was already built.

Sources, checked 5 November 2026

Names and products belong to their owners. Prices and features change: if something here is out of date, write to support@plagio.dev and we'll fix it.

Give your agent a real reference.

Start the free week

Keep reading