Deep Dive · Computer Use

agent-desktop: Two Jobs on a Mac With No Command Behind Them

Installing a Safari extension and granting screen recording are the kind of jobs where a coding agent hits a wall: the only path is a settings window, and the last step is a password sheet. This is a seven-minute demonstration of what the accessibility tree can do — and, more usefully, of exactly where it stops.

agent-desktop on Mac and Linux — video thumbnail
Video: Starry Hope 7:09 17 November 2026
agent-desktop accessibility tree macOS TCC computer use

🧰 The tool 0:03

PropertyValue (as of this video)
Repositoryvercel-labs/agent-desktop — "Computer use CLI for AI agents"
Licence and languageApache-2.0, Rust
Stars / createdAbout 25,000, created February 2026
ShapeA CLI plus a C library; a CLI-only MCP bridge serves every command as an MCP tool
PlatformsmacOS via the AX API, Windows via UI Automation, Linux via AT-SPI
Commands61 names, 57 operational — four keyboard and mouse-down commands refuse to run
This site covered agent-desktop before, when the story was the CLI's headless refs and the four commands that refuse to press a key down without a way to release it. That deep dive is still the right place for the architecture; this video is the opposite angle — two real jobs, and what happened when the agent met macOS's permission dialogs.
No model inside. The read-act-verify loop lives in your agent; agent-desktop only reads the accessibility tree as JSON and acts on a ref when told. That matters for how you read this video: the intelligence being demonstrated is Claude Code's, and the tool's contribution is a reliable transcript of the screen and a way to press exactly one thing.

🌳 Why a tree, not pixels 0:17

Screenshot-and-clickAccessibility tree
Find a button by looking at pixelsFind a control by its name in a structure apps already publish for screen readers
Move the pointer and clickAct on a ref without moving the pointer or taking focus
Breaks when the theme, scale or layout changesStable as long as the semantics are stable
Works on anything drawn on screenOnly works where the app exposes accessibility
The last row is the whole trade, and this video demonstrates both sides of it. The tree is precise and quiet — the agent reads a list of apps, finds a switch by name, flips it, and your pointer never moves. It is also blind wherever the app forgot to publish something: in the Linux half of the demo, the agent finds three kill buttons with no names at all and fixes the app so it can name them.

🧩 Job one: a Safari extension 1:08

A well-chosen test case, because there is genuinely no command-line path to it.

FactConsequence
An in-development extension can load from a folder as a temporary extensionBut only through Safari's settings window, Developer tab
That tab needs "allow unsigned extensions" turned onSafari turns it off again every time it quits
Safari's WebDriver has no way to install an extensionA browser-automation harness cannot do this job at all
Enabling it raises a macOS password sheetA human step in the middle of an otherwise automatable flow
This is the exact class of task where desktop automation stops being a novelty: not "use a GUI because it is fun", but "the vendor has deliberately made this a GUI-only operation, and the operating system has deliberately put a password in front of it". An agent that can read the settings window gets you to the door; the password stays yours.

🎬 How the run went 1:58

StepWhat the agent did
1Read the extension's code first and named a likely bug — but did not change anything yet
2Opened Safari to see the actual problem
3Through agent-desktop, opened Safari settings on the Developer tab and pressed "add temporary extension"
4macOS answered with a password sheet — and the agent stopped, as the prompt instructed
5Reported that nothing had changed yet
The prompt did a lot of work here: "stop and tell us if macOS asks for a password." That is a better safety mechanism than any capability restriction, because it turns an unexpected dialog into a checkpoint instead of an obstacle to be worked around. Any prompt that hands an agent a GUI should name the conditions under which it must stop.

🔐 The password sheet 2:28

"When we tested agent-desktop on this sheet, it couldn't type into the password field. That step belongs to a person."
What it could doWhat it could not do
Read the sheet — sheets and alerts are among the supported surfacesType into the secure password field
Recognise that the flow was blocked and report itPress a button to dismiss it and pretend it succeeded
That asymmetry is the most interesting technical detail in the video: see-but-not-fill is not a bug in the tool, it is the operating system distinguishing reading a dialog from entering a secret. A vision-based agent with a mouse would have no such boundary — it would happily click the field and type whatever it guessed. Accessibility-based automation inherits macOS's own notion of a trusted human step, which is a strong argument for this approach beyond mere stability.

🐛 The bug, and the reload 3:17

ObservationDiagnosis
The pop-up said two tabs open in a window with threeThe count used the last tab's index, which starts at zero, instead of the number of tabs
One line changedThe same rounding error every off-by-one bug has ever been
Reload pressed in the extensions tabNo password asked the second time; pop-up then read three tabs
This is the loop the whole article is about, and it is boringly ordinary: read the UI, trust the tree, form a hypothesis, change one line, reload, read the UI again. No screenshot, no pixel comparison, no coordinate. The interesting part is not that an agent fixed an off-by-one bug — it is that the verification happened through the same interface as the diagnosis.

🖥 Job two: screen recording 3:51

The second job is better than the first, because the reason it needs a human is structural rather than incidental.

ToolWhat it can doWhat it cannot
tccutilReset a grantGrant one
Configuration profileDeny screen captureGrant it
System Settings, Privacy & SecurityTurn the switch on — with a passwordBe scripted end to end
That asymmetry is deliberate and worth internalising: the OS lets administrators take power away by policy but never hands it out by policy, so every new screen-capturing app starts with its switch off until a person flips it. This is precisely the boundary where a desktop agent is useful — it can find the switch, read the app list, and flip the right one — and where it must not be trusted to complete the job alone.

✅ Verifying a grant 5:04

StepDetail
Agent opens the Screen Recording paneVia a settings link from the shell — so the shell does part of the job
Reads the list of apps, finds ScreenSnap, turns the switch onRef-based interaction, no pointer movement
macOS puts up "Privacy & Security is trying to modify your system settings"The agent stopped, and reported it had typed nothing and pressed neither button
Human types the passwordThe switch stays on with no second press
Verification: launch ScreenSnap, save a capture, open the image, find the Terminal and System Settings windows in itThe grant demonstrably works
The verification step is what makes this a demonstration rather than a claim. "The switch is on" could mean the click landed; "the app can now capture the screen and here is a screenshot containing the two windows I expected" is evidence. That is the same principle the best agent workflows keep rediscovering: verify through a different channel than the one you acted on.

🐧 Linux and AT-SPI 5:21

The last third is the most technically interesting, because the app is deliberately badly behaved.

FindingWhat the agent did
Three kill buttons in Porter with no accessible namesNamed them in the source
A count label hidden from the accessibility treeUnhid it
The app had to be rebuilt for the changes to take effectRebuilt it, then pressed "kill port 8102" by name
The row disappeared but the label still said threeFound the counting bug and fixed that too
Focus stayed in Neovim throughoutThe point of headless ref actions
An agent that fixes the accessibility tree so it can operate the app is doing something new. It is not routing around a bad interface — it is repairing the interface, which happens to make the app better for screen-reader users too. Whether that is a good precedent is a real question: an agent silently rewriting UI semantics to suit itself is exactly the kind of change that should appear in a diff a human reviews, which it did here.

🚧 The boundary is the design 6:22

What the agent handledWhat stopped it
Opening settings panes, finding controls by name, flipping switchesTyping a macOS password — the tool cannot, and the prompt forbade trying
Recovering when a control had no activation actionNothing else — it adapted with focus and space
Reading the state of the UI to verify a changeThe verification still needed a second channel (a real screenshot)
Fixing an app whose accessibility was brokenRequired a human-reviewable code change and a rebuild
"An agent that presses buttons can do nearly anything you can, so it's safer to run it in a virtual machine."
The advice at the end is the correct conclusion and it compresses the whole topic: the capability is roughly "anything a person can do with a mouse", so the containment has to be at the machine level, not at the prompt level. A prompt that says "don't do anything dangerous" is a wish; a VM is a boundary.

🛡 Safety 6:35

RiskMitigation that actually works
An agent with a mouse can reach anything you can reachRun it in a VM, as the video recommends
Permission dialogs become routine if the agent learns to dismiss themInstruct it to stop at password sheets — and note the tool cannot fill secure fields anyway
Silent success claimsVerify through a different channel: launch the app, inspect the artefact
Agent-edited UI semanticsKeep those changes in version control and review them
Screen recording grantsA capture-granted agent can see everything on that desktop, including other apps
The one thing to add to the video's advice: the macOS permission the tool needs is accessibility access for the host app — Terminal, iTerm2, VS Code, or whatever launches it — plus screen recording only for screenshots, and automation only where a command reports it missing. That is a broader grant than people expect, which is another argument for the VM: on a disposable machine, granting accessibility to a terminal costs nothing.

✅ Claims checked

ClaimVerdictEvidence
agent-desktop is free, open source, from Vercel LabsCorrectvercel-labs/agent-desktop, Apache-2.0, Rust
It uses the accessibility tree, not screenshotsCorrect"See and operate desktop apps… through the OS accessibility tree", no pixel matching
Actions don't move the pointer or take focusCorrect, and it is the defaultHeadless by default; a global --headed flag enables physical input
Linux support reads apps through AT-SPICorrectLinux adapter uses AT-SPI; Windows uses UI Automation
It works headless with pointer clicks turned offCorrectConsistent with the documented default and the workaround the agent needed
Safari's WebDriver cannot install an extensionHis statement, consistent with Safari's automation limitsNot contradicted by anything in the repository
Safari turns "allow unsigned extensions" off when it quitsHis observationA claimed Safari behaviour, not verified from Apple documentation here
The agent could not type into the password fieldDemonstrated, and consistent with secure fieldsSheets are readable surfaces; secure text entry is not something an agent should fill
tccutil can only reset a grantCorrectIt resets TCC entries; it does not create them
A configuration profile can deny screen capture but never grant itCorrect in practiceProfiles can restrict TCC; user consent for screen recording cannot be pre-granted this way
The second sheet needed a password and the agent stoppedDemonstratedAnd reported that it had typed nothing and pressed neither button
The grant workedVerified by artefactLaunching the app produced a screenshot containing the expected windows
An agent that presses buttons can do nearly anything a person canFairSubject to the app exposing controls and the OS not requiring a secret
The tool includes a modelFalseNo model inside; it ships a CLI, a C library and an MCP bridge

Basis note. Built from the full 7:09 recording and checked against the vercel-labs/agent-desktop repository and its macOS platform documentation. The repository confirms the headless default, the surface list that includes sheets and alerts, and the permission model (accessibility for the host app, screen recording only for captures). The Safari-specific behaviours are reported by the author and labelled as such rather than presented as verified Apple documentation.

🔑 Key takeaways

  • Pick jobs with no command behind them — settings windows, permission grants, temporary extensions — because that is where desktop automation is not a gimmick.
  • The accessibility tree beats pixels on stability and on restraint: named controls, no pointer movement, no focus stealing.
  • It can read a password sheet but not fill it, which is the OS drawing the line between reading a dialog and entering a secret.
  • Tell the agent when to stop. "If macOS asks for a password, stop and report" converts a dialog into a checkpoint.
  • Headless by default is a real design choice: you keep typing in your editor while the agent presses buttons elsewhere.
  • When a control has no activation action, be creative: focus plus space is the fallback that opened the pop-up.
  • Verify through a different channel: "the switch is on" is a claim; a capture containing the expected windows is evidence.
  • Know what cannot be granted by policy: tccutil resets, profiles deny, only a person can grant screen recording.
  • Broken accessibility is a blocker an agent can fix — unnamed buttons and a hidden label, repaired in source and rebuilt.
  • Those repairs belong in review. An agent rewriting UI semantics to suit itself should show up in a diff.
  • The capability is roughly "anything a person can do with a mouse", so the question is containment, not permission prompts.
  • Run it in a VM. Accessibility access for a terminal is a broad grant; on a disposable machine it costs nothing.

🔗 Resources

  • The video — Starry Hope, 7:09
  • vercel-labs/agent-desktop — CLI, C library and MCP bridge
  • macOS platform notes — permissions, surfaces, what needs headed mode
  • The earlier deep dive on this site covering agent-desktop's headless refs and the four commands that refuse to hold a key down
Basis note. The video is a demo by a third party, so the interesting claims were checked against the project's own documentation; where they differ (nothing material here), the repository wins. The safety framing at the end is the author's, and this article adds the permission-grant detail from the docs.

⏱ Timestamp index

0:00Trying agent-desktop
0:03Free, open source, from Vercel Labs
0:17The accessibility tree
0:22Finding a button by name
0:30Jobs with no command behind them
0:44Two jobs, and where they stop
1:08Why a Safari extension needs the settings window
1:25No WebDriver route, and unsigned extensions reset on quit
1:44The task given to Claude Code
1:58Reading the code before touching anything
2:05Opening Safari settings and adding the extension
2:15The password sheet appears
2:28It cannot type into the password field
2:44Selecting the extensions folder
2:55Opening the pop-up takes several tries
3:07Focus plus space
3:17Two tabs open in a window with three
3:33Reloading the extension
3:42Three tabs, correctly
3:51Screen recording has no command either
3:55tccutil resets, profiles deny, nobody grants
4:19Turning on ScreenSnap's switch
4:31Opening the pane from a settings link
4:46The second password sheet
4:57The switch stays on
5:04Verifying with a real capture
5:21Linux through AT-SPI
5:36Porter on a virtual monitor
5:44Unnamed buttons, hidden label
5:52Naming them and rebuilding
6:02The row disappears, the count does not
6:09Focus stayed in Neovim
6:22Wrapping up: two jobs, two password sheets
6:35Run it in a virtual machine
6:41The permission to grant to your terminal
☰ View all