Skip to content

Commit 4be2895

Browse files
committed
docs: correct the reasonless-session family to the details.reason level (#3674)
The r4 sentence claimed the family answers with no details at all and voided the dispatched guarantee; the disclosure layer stamps click/fill/screenshot-style reads dispatched: no and type/swipe-style mutations dispatched: unknown, so the claim was false for every member it named and wrong in both reading directions. The row now states the fact at the details.reason level, keeps the usual dispatched reading, and treats only absence (logs/network/audio) as no guarantee. Co-Authored-Worked-On-By: Claude
1 parent 54a38c6 commit 4be2895

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎website/docs/docs/commands.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ Read-only commands such as `get`, `snapshot`, and `wait` report `no`, and so do
502502
These refusals carry `dispatched: no` and a typed `error.details.reason`, so branch on the reason, not the message:
503503
504504
- `session_or_device_selector_required`: the request had neither an active session nor a device selector. Open a session or pass `--platform`. Commands that require a session or a device selector before they read the request's target (`boot`, `clipboard`, `push`, `apps`, and siblings) answer this even when the request named a session the daemon does not hold.
505-
- `named_session_not_found`: the request named a session this daemon does not hold, with no device selector to fall back on (or no selector it can answer without the session — `appstate` on an Apple target refuses this even with an explicit device). The daemon lost its sessions (replaced or restarted), or the name is wrong; `agent-device session list` shows what it holds. Commands that require a session before they read anything else (interactions, `find` clicks, RN tooling, `screenshot`-style generic commands) answer the same missing-session cause as `SESSION_NOT_FOUND` with no `details` at all — so the same branch on the cause applies, but the `dispatched: no` guarantee above does not: read the missing `dispatched` as no guarantee, as usual.
505+
- `named_session_not_found`: the request named a session this daemon does not hold, with no device selector to fall back on (or no selector it can answer without the session — `appstate` on an Apple target refuses this even with an explicit device). The daemon lost its sessions (replaced or restarted), or the name is wrong; `agent-device session list` shows what it holds. Commands that require a session before they read anything else (interactions, `find` clicks, RN tooling, `screenshot`-style generic commands) answer the same missing-session cause as a message-level `SESSION_NOT_FOUND` carrying no `details.reason` — some carry a `dispatched` stamp from the disclosure layer, some carry no `details` at all; read the cause from the message, and read a present `dispatched` with its usual meaning.
506506
- `session_app_required`: a per-app setting was requested but the session binds no app and none was named. Run `open <app>`, or name the app on the request for a setting that takes one (`settings clear-app-state com.example.app`).
507507
- `app_not_installed`: the named app resolves to no installed app on the target. Run `apps --all` for the exact bundle id or package, or install the app, then retry.
508508
- `webdriver_route_unsupported`: on a WebDriver-backed device cloud, the driver does not implement the route; the limit is the cloud's driver, not the device. A command with a second route (`orientation` has two) tries it before failing. After an ambiguous failure on that transport, only read-only requests are resent.

0 commit comments

Comments
 (0)