Answer an agent's question from the phone

An agent reaches a choice that is yours, opens a decision gate and stops. You tap an option on the phone, and the agent carries on with it.

Goal. You are away from the computer while an agent works. When it reaches something only you should decide, it asks; your phone shows the question with the options as buttons, and your tap is the agent's next message.

You need

  • st 0.3.83 or later, with st hooks install done.
  • The machine signed in (st login) and sharing with a tunnel: the notification goes out through your account.
  • The phone app signed in to the same account, with notifications on.
  • The agent in a pane of a session st shares. Coordinators and workers can both ask.

1. Tell the agent when to ask

In the prompt, the task file or your CLAUDE.md:

Before you change how images are stored, ask me with a decision gate
(st gate ask) and stop until I answer.

Workers started with st worker start already know: their guide says to open a gate when only a person can decide.

2. The agent asks

st gate ask "How should images be handled?" --title "Images" \
  --option "A: keep them as attachments" --option "B: OCR to text" --text

st answers "gate … is open" and the agent stops its turn.

  • Up to nine --options. --title is a few words for the notification and the apps ("Decision" without it).
  • --text lets you answer in words instead of, or besides, an option. With --text and no options, the answer is words only.
  • One open gate per pane: a new question replaces the one before.

3. Answer it

Anywhere; the first answer counts.

  • Phone. The notification has the options as buttons. Tap one.
  • Desktop app and web terminal. The agent's window carries a ? and shows the question.
  • A shell in the shared session:
st gate list                                 # open gates: id, pane, question
st gate answer <id> 2                        # option 2 (options count from 1)
st gate answer <id> 2 "but keep the originals"
st gate answer <id> "resize them to 1600px"  # words only, with --text

4. The agent carries on

st types the answer into the agent's pane as its next message:

Decision gate … answered: B: OCR to text — but keep the originals. Carry on with that.

The agent picks up from there. st gate show <id> shows the answer and whether it was typed in; if the agent's input box was not showing at the time, say it to the agent yourself.

Questions from workers

A worker on a gate counts as asking: the coordinator's st worker wait and st task wait return 3, "a worker is asking", and st gate list shows the question. Once you answer, the worker goes on; the coordinator's next wait ends when it is done.

Open gates survive a restart of st. st gate cancel <id> takes one back.

More: Decision gates.