How to stop a browser agent reading the same page twice
A browser agent wastes tokens when every action returns the whole page again. The fix is to answer an action with what changed, say so when nothing did, show the address and title only when they change, and put anything long in a file with a short preview.
Answer with what changed
After a click or a type, Browser Layer replies with what changed on the page, not the page. A repeated call that gets the same answer says so instead of printing it again.
Say less around the answer
The tab line (address and title) appears only when it changed. Command hints are gone, and so are the link lists in a page’s footer. read --full folds regions already shown in the tab.
Put long results in a file
An answer over 20,000 characters is saved whole to <home>/results/. The reply gives its first 4,000 characters and how to read the rest with rg -n, sed -n, tail -c or jq. With --out <file> on open, read, find or get, the whole result goes to a file and the reply shows its first 1,500 characters.
What it adds up to
In a benchmark with one agent and model, Browser Layer used 5.80M tokens against 8.80M for agent-browser, and fewer steps (127 against 196).
Questions
Why do browser agents use so many tokens?
Because they re-read content they have already seen, and because long pages and bulky results are carried forward in the context.
What happens to very long results?
They are saved to a file. The agent gets the first part and a command to read the rest.