When an LLM drives a browser, the classic failure isn't "the model is dumb". It's that the page
moved under its feet . The agent reads the page, decides to click e3 , and by the time the click
lands, a framework re-render has replaced that DOM node with an identical-looking new one. The id is
gone, the click fails, and the model burns tokens re-reading the page and re-deciding.
ecobrowser handles this in code, not in the prompt. The principle is: do work in code so the model
doesn't spend tokens and reasoning on it. Here's how the self-healing path works, and the one rule that
makes it safe.
1. Give elements durable ids
Perception runs a script inside every frame and open shadow root, collects interactive elements, and
stamps each with a durable data-ai-id . Ids are never reused, even across pages, so " e3 " means the
same thing five steps later. The agent acts by id , never by guessed CSS selector or pixel
coordinate.
2.…