KOEN
All notes
AGENTS & INTERFACES

The second row was no longer the same document

Adding one item to the front changed the second value from B to A. Reading agent-desktop’s reference model prompted a small distinction between the same position and the same target.

A coral document with a paperclip moves lower between two paper app windows, while a magnifying glass follows the same document in its new position

It was definitely B a moment ago

I took the second value from a list containing Draft A and Draft B. It was Draft B. I added New draft at the front and read the same position again. This time it was A.

“Second” had stayed the same. The document had changed.

This is not a report of clicking the wrong document in an app. I ran a small JavaScript array example. No files were opened or deleted; I changed the order and read the same position.

Remember B separately and find it by the id I assigned in the example, and B still appears. It is now third. That id belongs to my invented data; it does not mean every app offers a permanent marker like it.

Asking an agent to operate a screen makes “the one we saw earlier” a little more interesting. If an item appears above it or the list is sorted again, will the target still occupy the same place?

I made the array while reading agent-desktop’s official documentation. The tool reads an operating system’s accessibility tree and returns references to actionable elements, keeping those references tied to the snapshot that produced them.

Its example uses a reference with a snapshot component. A bare @e8 is rejected. The documentation says to obtain a new snapshot when a changed interface leaves a reference stale or the target ambiguous.

My array positions are not a reconstruction of the tool’s internals. I have not installed or run it. The small list was a way to think about why a reference carries the context of an observation.

Knowing what a reference points at seems to need the screen it came from too.

There is still another look to take

Imagine drawing that list as an interface. In the agent’s first view, B occupies the second row. My request is to open B.

An arriving item makes “the second row” and “B” different instructions. Remembering my words perfectly does not make the interface stand still.

I think I would welcome a response saying the old reference no longer applies. It creates a chance to read the current screen and find where the intended target went.

Reading again should not require choosing a new goal. I still want B. Updating the order should not quietly change the object of the request.

Finding B would not finish every check either. Multiple documents could share a name, or their contents could have changed. A two-item invented list hides those complications.

I would want to see what appeared after opening it. An accepted reference and confirmation that the intended document opened need to connect.

The tool’s documentation also shows observing the interface again after an action. I read that as a slightly longer unit of work than a click command returning.

This essay does not establish a desktop automation success rate. I executed only the changing-array example. The interface around it is imagined from reading the documentation.

Back in the new list, the first item is New draft, the second is A, and the third is B. The request to open B has not changed.

Before reaching for it, I read the name once more. The document that was second is now third.

Sources

All notes