The question of how an AI agent should interact with a desktop GUI isn’t academic—it's now a practical engineering problem. The team behind TREX, a QA agent, ran a set of experiments on the OSWorld benchmark: 172 real desktop tasks, each with a single attempt and a 50-step cap. They compared three ways of presenting the UI to the model: just screenshots, screenshots plus accessibility trees, and screenshots with clickable element IDs. The results highlight a divide between top-tier and less capable models.
Agents like Claude Code and Codex use techniques that originated in accessibility tooling—feeding the model a text-based description of the UI alongside screenshots. The accessibility tree, used by screen readers since the 1980s, is now repurposed for AI. But does this extra structure help, or do the best models simply learn to read pixels?
Screenshots Alone: Only the Best Models Succeed
When limited to screenshots, the performance gap between models is stark. GPT-4.1 managed only 5.4% of OSWorld tasks, while GPT-6.1 Sol achieved 83.8%. OpenAI’s own report for the more challenging OSWorld 2.0 offline set puts GPT-6.1 Sol at 71.4%—all with screenshots and high reasoning effort. These numbers suggest that, at the top end, models can infer enough from pixels to perform most actions without extra help.
Accessibility Trees: A Lifeline for Weaker Models
Adding the accessibility tree—essentially a structured, machine-readable list of UI elements with labels and pixel positions—helped every model that struggled with screenshots. For instance, GPT-5.2’s score rose from 15.8% to 36.2%, and GPT-4.1’s from 5.4% to 20.6%. The accessibility tree lets the model see what’s on the screen without having to interpret raw pixels. However, the strongest models saw no meaningful gain: GPT-6.1 Sol’s score was 82.7% with the tree, almost unchanged from screenshots alone.
A practical note: on Linux, agents read the accessibility tree via AT-SPI. The test found that some apps—GIMP, for example—were invisible to the tree until an environment variable was set at login. If you’re working on similar tooling, check your environment for coverage gaps.




