Skip to content
pi-c Artifact [6349dba253]
Login

Artifact [6349dba253]

Artifact 6349dba25352ff7a89536ef3aa8377a605e94c18644108cc630075430081e970:


Remote control

A conversation another pic is running can be watched and steered from a second process: another terminal, a script, an editor, or a phone over ssh. pic attach shows it and pic send messages it. Neither takes the conversation over: the pic running it keeps running it, and nothing listens on a port.

Watching: pic attach

pic attach follows the latest conversation of the workspace (--session ID for another; -c says latest explicitly). It prints what has happened since the start of the conversation's latest request, then each message, tool call and result as it is saved, and keeps going until stopped.

Text the model is still streaming is not shown: a reply appears when it is complete.

Steering: pic send

pic send steer TEXT sends a steer to the conversation (--session ID, else the latest): delivered after the running tool calls finish, as a steer typed into that pic would be. pic send follow_up TEXT runs after the request ends, and pic send abort cancels it, even if the pic running it dies before it has stopped. A whole Pi RPC command works too: pic send '{"type":"steer","message":"look at the tests"}'.

pic send prints the message's state and its key, and returns as soon as the message is saved; --wait waits for it to be delivered and prints the response the running pic gave. The pic running a request in the conversation delivers it within moments, whichever way it was started: the terminal, pic ask, --mode json or --mode rpc.

Both at once: pic attach -i

pic attach -i follows the conversation and acts on each line you type:

It says when each message is sent and delivered. With its input closed it waits for what it sent to be delivered and for a request it started to end, then exits.

Starting a request here is you acting from another terminal, the same as typing pic ask; it is not one conversation waking another, which pic does not do.

From a phone

pic attach works over ssh, with nothing more to install:

  1. On the Mac, turn on Remote Login (System Settings, General, Sharing).
  2. Put the Mac and the phone on one Tailscale network (or any network that can reach the Mac).
  3. From an ssh app on the phone, in the project's directory:

ssh mac -t 'cd ~/project && pic attach -i -c --format text'

(A login over ssh may not have pic on its path: name it, as ~/.local/bin/pic.)

Watch the run, type a line to steer it, and close the connection when done; the run carries on.

What it cannot do yet