Where browser agents waste steps: the pagination problem we found in our own tool
Browser agents waste steps when they cannot tell an action worked. On our paginated orders task, Browser Layer first took 388k tokens and 17 steps, against 286k and 10 for agent-browser. The transcripts showed two defects in our tool, not mistakes by the agent. After two fixes the same task took 219k tokens and 10 steps.
What went wrong
In the first benchmark all three tools solved all eight tasks, and Browser Layer used the fewest tokens overall. But it lost one task: orders, a table of records spread over several pages with a Next button. We read the transcripts instead of the totals.
- After
click Next, every row of the table had changed, but the answer was the page map, and a new page of records leaves the map unchanged. The agent could not see that the click worked, so it went looking withnetandeval. getstopped at 20 of 40 records, so the agent thought the list was shorter than it was.
Why agent-browser did better there
agent-browser clicks Next by name in one command. Browser Layer needed a reference from a fresh map on every page, and the agent spent steps getting one.
The three fixes
- An action whose change is new records now answers with those records.
getreturns what fits one page and says how much is left.- An action can name its control:
click "Next".
The result
Browser Layer only, same agent, model and task, before and after.
steps 'tab https://shop.example/orders; click "Next"; get --all --out orders.txt'
- orders: 388k tokens and 17 steps became 219k and 10 steps. One other run took 190k and 9 steps, where the model miscounted 3 rows as 4. agent-browser took 286k and 10 steps, playwright-cli 246k and 9.
- shop: 128k and 6 steps became 108k and 5.
- flights: 330k and 15 steps became 292k and 14, against 921k and 27 for agent-browser.
Lessons for any browser tool
- Read the transcript, not the total. The cost was two bugs, visible only step by step.
- An action should answer with the evidence that it worked. If the page changed in a way the answer cannot show, the agent will go looking.
- A list is complete only when you can show it ended: the site’s total matches, the last page has no Next, or scrolling brings nothing new. Say how many of how many until then.
- For a whole table, one call beats a loop. In a later head-to-head,
get --allread a 120-row table in one call.
Limits
One run per tool per task, so single-task differences within about 20% are noise, and we wrote the fixture sites. The pattern held on the next benchmark runs, but treat any one number as a measurement, not a rule.
Questions
Why do browser agents waste steps on pagination?
Often because the tool’s answer after a click does not show that the page of results changed, so the agent goes looking. Answering with the new records, or naming the control to click, removes those steps.
How do I read a whole paginated table with an AI agent?
Use one call that reads all pages into a file, such as get --all --out file, then search the file, instead of clicking Next in a loop.
Did the fix cost accuracy?
No. All tools passed every task before and after. One rerun miscounted 3 rows as 4, which was the model, not the tool.