phone.tap, POST /v1/phones/:serial/tool and the MCP tools. The check runs in one place, at the Desktop’s tool dispatch, and the runtime decides. For the cloud routes, see Phones.
Which actions hold
A rule list runs first. It matches the label of the tapped element, and the app, against a fixed English lexicon. The model that drives a task can add a hold by flagging a step as sensitive. It cannot remove one the rules made, so text on the screen cannot talk the agent out of a hold. A hold has one of these effects:
These actions make a hold:
- A tap, or
phone.web.click, whose label matches the lexicon. phone.find_and_tap, judged by the element it finds, or else by the label it searches for.phone.typeinto a secure field, or into a field named password, passcode, card number or CVV.- The enter key in a message composer. It counts as
send. open_appinto a bank, wallet or broker app. One hold covers that app for the rest of the run.- A direct tap with no element. The Desktop reads the screen once and hit-tests the point. If it has no screen read, the foreground app decides.
phone.sms.send and phone.call.dial use the same hold, as send and call. The hold is tied to the recipient and, for a text, the message: an approved hold does not cover a different number or a different text, and a retry must repeat the same to string.
Web tasks on an app phone (/api/aci) go through the same check. A hold that ends such a run shows as an error in its stream. phone.sms.read holds as credential, because texts carry one-time codes. On Desktop, the owner approves SMS read once for each bot and phone, and later reads by that bot on that phone run without a new hold. A caller that has no bot, and every API-key caller, is asked each time.
Desktop checks every acting call before it runs. If the runtime cannot be reached, Desktop fails closed: the call returns guard_unavailable and does not act.
Hold lifecycle
- Re-check after approve. Before the action runs, the loop reads the screen again. If the element hash differs from the one the hold was made for, the hold becomes
changedand a new hold is made. If the owner approved on the driven phone itself, the loop first returns to the app. - Use once. An approved hold covers one action. It is consumed when the guard answers
allowfor it. A second use of the same hold id makes a new hold. - Use within 10 minutes. A retry more than 10 minutes after approval is not accepted. The hold becomes
expiredand the guard makes a new hold. - Deny ends the run. The run finishes as
denied. The agent does not continue, because it could reach the same effect another way.
How each caller sees a hold
A retry with the id of a hold that was denied answers
denied (see the check route below). A direct call does not stay open while it waits, because the Desktop’s tool call times out at 80 seconds.
Runtime routes
These are runtime routes on the project owner’s Desktop runtime. The cloud API relays the tool and task routes.Check an action
serial, tool, args, el, app, ctx and holdId. ctx is the caller context: owner, bot_id, thread_id, session_id and source. source is one of chat, sms, imessage_ext, intent, voice, api, routine or skill. el, app, bot_id, thread_id, session_id and holdId are optional.
It answers one of:
holdId that is approved, not yet used, used within 10 minutes of approval and for the same element hash answers allow and is consumed. A holdId of a hold that the owner denied, for the same action, answers:
holdId that repeats an action which already has an open hold answers with that hold, so the owner sees one item. The route answers an error when the caller has no owner to ask. The owner is always the signed-in caller, never a value in ctx.
The runtime’s own loops pass the check an internal one-time value, _pass, in the tool arguments. The runtime issues it after an approval has been used, and Desktop sends it back once so the same action is not asked about twice. Callers never send it. A request that carries one is not classified: the check answers allow with pass: true, or bad_pass for a wrong, used or expired value, and makes no hold. On bad_pass Desktop drops the value, reads the screen and runs the normal check.
Read a hold
crop route serves it as image/png or image/jpeg with Cache-Control: private, no-store. A hold made without a screenshot has no image and the route answers 404. Both routes need the owner’s signed-in session. The image loads through the relay.
Start a task
thread_id, session_id and source (the same values as in ctx; source defaults to api). They ride in the task context and come back on the run report as thread_id, session_id and source.
Two checks run before the task touches the phone. Either one refuses the task with 403:
paused: the owner turned on the pause switch for their bots.owner_only: the thread’s latest input is not from the owner (a contact, a stranger or another bot; a web page or tool result the bot read mid-turn is not counted, and a thread with no labelled input counts as the owner’s). The owner’s own chat turn in the app (POST /agent-sessions/:id/messagesfrom a signed-in session, not an API key) is labelledowner, so replying in the app after an outside message lets the bot start a phone task again. A refusal is not a hold: nothing waits in the inbox, no card is posted and the phone is not touched. A task with no thread is not subject to this rule.
phone_minutes usage meter, with overage billed on the plan), but nothing refuses a task on the runtime’s POST /phones/:serial/task when minutes run out, so a client never gets 402 or 429 from it. The only phone limit that refuses a start is the concurrent-run cap on the Platform API’s /v1/phones routes (429 phone_run_limit, see Phones).
Code that starts a task in process calls phone_task::run_task_ctx(db, data_dir, ctx, run_id, serial, goal, max_steps, model). It applies the same checks and answers a refused task with a report of status: "refused" and the same reason.
The phone task card
A task started on a thread posts a card on that thread and updates it as the run moves:status is one of running, waiting_approval, done, denied, approval_timeout, phone_locked or failed. A waiting_approval card also carries inboxId, the inbox item that holds the approval. The card is a phone_task event on the thread’s bot ledger; each change is a new event for the same runId, and the newest event is the card’s state. A task with no thread posts no card.
Live step fields on the card (new in this release)
The card now follows the run step by step. Old clients ignore the new fields.- A
runningcard is posted once per step, each with itsstepLabel. - A
waiting_approvalcard carries the “Waiting for your OK to …” label. - The closing card carries the full
trail, so a finished stream stays whole after the per-step events fall out of the thread ledger’s 200-event window. - The idempotency key stays
phone-task:{run}:{status}:{step}:{inbox}.
The step label rule
The runtime builds everystepLabel in Rust; clients never derive one.
- Typing, text and call tools show a fixed phrase: “Typing”, “Writing a message”, “Starting a call”.
- A sensitive or held step shows “Waiting for your OK to” followed by the effect.
- Any other step shows the model’s
reason, one line of 80 characters at most, or the action label when the reason is empty.
reason can echo it.
Live runs rows
GET /api/v1/phones/history returns runs[]. While a run is live its row carries three new fields: step, step_label and trail. A run with no thread (a gizzi run, or the iMessage path) has no card, so these rows are how a client follows it. A hold merges into the live row instead of replacing it, so the row keeps its trail.
Status to text mapping
The iMessage app follows a run through
phoneRun in the status snapshot. Its card caption is the goal and its link is https://ai.allternit.com/?allternit_phone_run= followed by the run id. The app link is allternit://phone-run/ followed by the run id. Each iMessage update is a real message to everyone in the conversation, so the app sends on every status change, on a step change at most once per 8 seconds, and at most 12 times per run.
The run’s latest screen
Cache-Control: private, no-store. A status card uses it as its thumbnail. It needs the owner’s signed-in session, like the hold image. It answers 404 when the run has no kept frame, when it is not the caller’s run, or when the id is unknown; it never answers 500 for these. Frames are redacted with the same screen check as the run history before they are kept.
The hold record
A hold is an approval with authorityallternit and action phone.<tool>, for example phone.tap. Its correlation id is phone:<runId>:<step>. A direct call has run id direct. A hold with no thread uses phone:<serial> as its thread id and bot id. Creating it writes an approval.requested event, the same as any other approval. Its contentHash covers the serial, app, tool, element, effect and typed text.
detail.phone holds:
typedChars appears only for phone.type. It is a count. The typed text is never stored.
A text or call hold also carries to, and a text hold carries text, because the message is what the owner approves. botless is true when the task had no bot; the hold is then filed under the owner’s main bot so that the approval event and its notification exist, and the inbox item reads “A phone task”.
The inbox item
The hold appears in the owner’s “Needs you” list as an inbox item with kindapproval and subkind: "phone_action".
- It is Review only. It has no inline Approve in a notification or on a row. The owner opens it and sees the review image (the screenshot) first.
- It is
private: true. The review image and the hold detail are not put in push text, in a Live Activity or in the status snapshot’s question. - It carries
contentHashlike every approvable item, andapproveInline: false. An iPhone notification for it shows Review, which opens the item, not Approve. - The runtime enforces this.
POST /api/v1/inbox/approval:<id>/approvewithsurfaceset tonotification,live_activity,widget,control,intent,siriorshortcutanswers409 {"error":"review_required","code":"REVIEW_REQUIRED","id"}and approves nothing. Deny ("decision":"deny") is accepted from every surface. - Approve and Deny are available on the open item, in Allternit Desktop, ai.allternit.com, the PWA, the iOS app and Gizzi Code.
Run report
A phone run’s live status can bewaiting_approval. A run that waits keeps its concurrency slot.
Final statuses add three values to the existing ones:
New fields on the run:
duration_ms does not include held time, so phone minutes are not billed for the wait.
Webhooks
They follow the same delivery rules as the other phone events in Phones. They carry no screenshots and no crop.
Unattended replay
A routine that replays a saved skill can reach a hold with nobody there. After the wait, the phone run ends asapproval_timeout and the hold becomes expired. The routine’s own run record stays failed with the reason approval_timeout. An attention item appears, “Routine stopped at a step that needs you”, with a Retry action. While that item is open, scheduled runs of the routine are skipped; only Retry replays it. A replay has no model to choose again, so when the screen changed after Approve the replay stops as diverged. There is no standing permission for any effect.
Who can approve
- A signed-in person who owns the project. Approval happens in the app.
- API keys cannot approve. There is no approve route for keys.
- No approve by text. A reply of “yes” to a text message does not approve a hold, because a text sender can be spoofed.
What a one-task grant covers
A one-task grant lets an agent act without a hold for the rest of one task. It does not coverpay, delete, credential or money_app. Those hold even when a grant is live. Only send and call accept a live grant, and only on a thread. security_setting is not covered.
Not in this version
- Labels in languages other than English. For other languages, only the model’s sensitive flag and the money-app rule catch a sensitive button.
- Full coverage. An action that no rule recognises, and that the model does not flag, runs without a hold. Do not treat a hold as a promise that every sensitive action is caught.
- An owner-only rule for channel threads. A phone action that a bot starts from a channel thread is checked like any other and makes a hold when it is sensitive. Refusing phone tools on a thread whose latest sender is not the owner comes in a later version.
- An agent loop that runs on the phone itself. Holds apply to the Desktop-driven loop.