Skip to content
pi-c Artifact [18d67829a1]
Login

Artifact [18d67829a1]

Artifact 18d67829a1dff67771be33ed7a333c4896bba5e3c1d62d1022294b3e465204c0:


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. 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 sends each line you type: a steer while a request is running, a follow-up when none is. /abort aborts the running request. It says when each message is sent and when it is delivered. With its input closed it waits for what it sent to be delivered, then exits.

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