AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Nov 29, 2026, 22:00 JST

agent-browser: refs fail on ambiguous duplicates

Send on LINE
agent-browser: refs fail on ambiguous duplicates

3 Key Points

  1. What happened

    The agent-browser documentation now states that a ref survives same-document updates but, after node replacement, falls back only if the ref was unique in its snapshot; duplicates fail with 'Stale ref ... cannot be recovered'.

  2. Why it matters

    For agents clicking repeated controls like delete buttons in a cart, the tool now stops and re-snapshots instead of guessing, which favors safety over action.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

Context & Analysis

A lifecycle rule for refs (element handles like @e3) is core. The detailed rules live in the snapshot-refs reference, while the core guide that the CLI prints at runtime is what agents read first. A one-line addition in a Nov 20 commit gave refs used after navigation a named failure, 'no longer loaded', and the troubleshooting section now says 'nothing ran' at line 258. Because the installed SKILL.md is a short stub that only tells the agent to run agent-browser skills get core, updating the CLI is how new rules reach agents. The same reference section lists related fixes: stale IDs are never reused within a session, a failed scoped snapshot leaves the last successful snapshot's refs usable if the document is unchanged, and iframe contents are expanded to four levels of nesting rather than one. On waiting, the guide is blunt that agents fail more from bad waits than bad selectors, yet a troubleshooting example still shows agent-browser wait 1000 (lines 231-233), a leftover flagged as a contradiction agents may encounter if they read past the core guide.

FAQ
What error appears when a ref is ambiguous after an element is replaced?
The tool returns a 'Stale ref ... cannot be recovered' error (core guide line 260) and does not act, so the agent should run snapshot again.
What should I use instead of fixed waits like wait 2000?
The guide says to wait on an element, text, URL glob, JavaScript condition, or load event, and not to use wait --load networkidle as a generic single-page-app wait because server-sent events, WebSockets, and polling keep the network busy.
How many install events does agent-browser record as of Nov 29, 2026?
Skillselion's agent-browser listing page records 1,752,663 install events, which is not a user count.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleClaude Fable 5.2 gives up fast when tasks look rigged, Goodhart Labs finds