Problem
LLMs use screenshot-annotated to get numbered element annotations, then use click-annotation or fill-annotation with those indices. But annotations expire silently when the page changes, and the LLM doesn't know:
- How long annotations are valid
- What invalidates them (any navigation? DOM mutation? scroll?)
- Whether there's a way to check if annotations are still valid
The ANNOTATION_EXPIRED error code exists but only appears after the LLM has already tried to use a stale index.
Proposal
-
Include annotation TTL/validity info in the screenshot-annotated response:
{ "annotations": [...], "validUntil": "next_navigation", "sessionId": "abc123" }
-
Add an annotations-valid endpoint to check without taking a new screenshot
-
Document annotation lifecycle in --llm-help metadata for screenshot-annotated, click-annotation, and fill-annotation
-
Consider auto-invalidation warning: if the page URL or DOM hash changed since the last annotation, include a warning in the next command's response
Problem
LLMs use
screenshot-annotatedto get numbered element annotations, then useclick-annotationorfill-annotationwith those indices. But annotations expire silently when the page changes, and the LLM doesn't know:The
ANNOTATION_EXPIREDerror code exists but only appears after the LLM has already tried to use a stale index.Proposal
Include annotation TTL/validity info in the
screenshot-annotatedresponse:{ "annotations": [...], "validUntil": "next_navigation", "sessionId": "abc123" }Add an
annotations-validendpoint to check without taking a new screenshotDocument annotation lifecycle in
--llm-helpmetadata forscreenshot-annotated,click-annotation, andfill-annotationConsider auto-invalidation warning: if the page URL or DOM hash changed since the last annotation, include a warning in the next command's response