Computer use CLI for AI agents
Rust accessibilityaccessibility-apiai-agentsautomationclicomputer-usecomputer-use-agentcomputer-use-agentsdesktop-automationmacosmcprust
title: An AT-SPI write that returns success has not changed anything date: 2026-10-19 category: runtime-errors module: crates/linux/src/actions/write/write_call.rs, crates/linux/src/actions/write/mutation.rs, crates/linux/src/actions/write/text_write.rs, crates/linux/src/actions/write/numeric_write.rs, crates/linux/src/actions/write/secure_write.rs, crates/linux/src/tree/capabilities/action_read.rs problem_type: runtime_error component: atspi-write-path symptoms: - "set-value or type reports success and the field still holds its old text." - "A write to a destroyed widget, a read-only field or a Gecko input answers true with no error." - "A write that timed out lands later, when the stopped application resumes." - "A password value appears in an error message or in a read-back." tags: [linux, at-spi, d-bus, write-path, read-back, delivery, secure-fields, toolkits]
Problem
EditableText.SetTextContents, InsertText, Value writes and Action.DoAction return a boolean or nothing. On Linux that return says the call reached an object that answered. It does not say the object acted. Measured on live GTK3, GTK4, Qt 6, Firefox and Chromium (probes/linux/FINDINGS.md L30-2 to L30-16), every toolkit has a case where a write answers success and nothing changes, and a case where a write answers failure and the effect lands anyway.
What the toolkits actually do
- Success with no effect. A destroyed GTK3 widget answers
DoAction,SetTextContents,InsertTextandProperties.Setwithout error, whileGetStatereturns two zero words and the name is empty (L30-2). Gecko answerstruetoSetTextContentsandInsertTexton every input and changes nothing, althoughEditableTextis present on nearly every Gecko node (L30-14). A read-only GTK3 field and a Qt read-only field accept the write silently; Qt does not enforceREAD_ONLYon this path (L30-6, L30-11). Gecko ignores an out-of-rangeValuewrite with no clamp and no error (L30-16). - Failure with the effect delivered. A stopped application answers every write with
NoReplyafter the caller's timeout, and the bus delivers the queued call atSIGCONT, so each write lands (L30-3).NoReplywith "recipient disconnected" means the application died during the call and the outcome is unknown (L30-4). - Failure that is only a missing interface. Chromium inputs have no
EditableText, so both text writes failUnknownMethod(L30-15). A destroyed GTK4 object fails the same name with "Object does not exist" (L30-2), and Qt usesUnknownObjectfor a destroyed object andUnknownInterfacefor either a destroyed path or a missing interface (L30-10). The name alone cannot tell the cases apart (seean-atspi-error-name-is-not-proof-an-object-is-gone.md). - The secret is in the read-back. Secure fields are found by the raw role number 40, not the name: GTK reports the name
text boxfor role 40 (L30-17, L30-19). A GTK4 entry with visibility off,InputPurpose.PASSWORDor anAdw.PasswordEntryRowis role 61 and carries no secure signal at all, so itsGetTextreturns the plain secret.
Solution
Judge every write by what a read of the node shows afterwards, never by the reply.
- Refuse before the call when the node is known unwritable:
READ_ONLYset orEDITABLEclear (text_write::writable). The toolkit would accept the write and ignore it, so nothing after the call can be trusted to catch it on Qt. - Read the value before the write, send it, then read it again (
text_write::judge). Equal to the request isMatchedand the result carriesverified. Equal to the value before iswrite_ignored:ACTION_FAILEDwithdetails.cause = "write_ignored", disposition not delivered. Any other value, or no readable value, leaves the resultdelivered_unverified.numeric_write.rsapplies the same rule.select/mod.rshas no before-value comparison; it verifies by polling the selection state and otherwise staysdelivered_unverified. A numeric read-back is compared through core'svalue_matches. It counts as proof only when the value is whole, the control is not a spin button, or itsMinimumIncrementis known, because the toolkit snaps (numeric_write.rs:43-46, L30-12). - Classify a failed call in
mutation::classify_write. An error name that could mean "gone" or "not implemented" (ObjectUnknown,InterfaceMissingon an advertised interface) is settled by oneGetRoleread of the node (action_read::corroborate): alive means the method is absent, dead meansSTALE_REF, unread means unconfirmed.NoReplyand a spent deadline aredelivery_uncertain, never a retryable not-delivered. - Treat a field as secure when its role number is 40, when its state flags it, or when its tokens say
secure(secure_write::is_secure). A secure write is never read back, so it carries noverified, andscrubreplaces the written text with[withheld]in the error's message, suggestion and platform detail and dropsdetailsthat echo it (secure_write.rs:18-38). A GTK4 role-61 field cannot be recognised, so its read-back must not be copied into an envelope.
Prevention
- Do not report
okfor an AT-SPI write from the reply alone. A reply proves delivery to a live object at most, and not even that on GTK3. - Never re-send a write after
NoReplywithout reading the node first: the first call may land at resume and the second one doubles it. - Do not decide editability from interface presence (Gecko) or from the absence of
read-only(GTK3); use theEDITABLEandREAD_ONLYbits together. - A read-back that is skipped for secrecy gives up
verified. Report that honestly asdelivered_unverified; do not read the secret to regain the verdict. - Probe each toolkit before encoding a write rule. Gecko, Chromium, Qt, GTK3 and GTK4 each disagreed with the others on at least one case above.