There are two ways to reach a conversation from another place: a paired phone through a relay
(see From a phone, through the relay), which is what /rc does,
and ssh (below).
/rc in one step
/remote-control (or /rc) works as Claude Code's does, which shows the session's address when
remote control starts and keeps its QR code behind a key
(https://code.claude.com/docs/en/remote-control). With a phone paired, it turns remote control on
and shows two lines and a line of keys:
● Remote control is on · link copied to the clipboard
https://remote.example/#s=4636aa61&c=e4_cx9EtYN9IDSHtKNcByw
c copy · q QR code · p pair · d devices · s turn off · /rc ssh · esc close
The link opens this conversation on a paired phone, or on any device a phone has added. It is
already on the clipboard, so paste it wherever you want it; Esc, Enter or any other key goes back
to the conversation, and remote control keeps running. While it is connected the footer shows a green /rc at its right end.
ccopies the link again,sturns remote control off or on.qshows the link's QR code for a phone's camera (/rc qropens it directly). A window too short for the code says so and shows the link.dlists the paired phones, where a number thenyunpairs one andRthenyresets remote control, and says whetherpic remotestarts when you log in (see Starting at login);/rc devicesopens it directly.ppairs another phone (/rc pair), and/rc offturns remote control off without the panel.
On this computer the link is copied with the system's clipboard command (pbcopy on macOS;
wl-copy, xclip or xsel on Linux), which works in every terminal, Terminal.app included. Over
ssh that command would fill the wrong computer's clipboard, so pic asks your terminal to copy
instead (OSC 52) and says "sent to the terminal's clipboard": most terminals take it, Terminal.app
does not. The link is also drawn as one unbroken line, however narrow the window, so the
terminal's own selection takes it whole: triple-click it (with /mouse on, the terminal's
selection needs its usual modifier key).
The link names the conversation by its id alone, with no path in it. The phone opens it when the conversation is among those it lists (the 50 most recent); otherwise it opens the list.
With no phone paired, /rc goes straight to pairing one (see Pairing).
In a shell, pic rc prints the same link and QR code for the latest conversation (--session ID
for another), and pic rc --link the link alone.
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. The terminal interface does both for you: open the conversation with /resume (it is
marked ● running in another pic) or pic -c, and type to steer it (the terminal).
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.
- The default output is Pi's JSON events, one per line, as
pic --mode jsonprints them, each with theseqof the entry it came from.--from SEQstarts after that entry (0: from the beginning), so a client that reconnects with the lastseqit saw misses nothing and sees nothing twice. --format textprints short lines instead: what you sent, the reply, each tool call and the first line of its result, and how each request ended.--no-followprints what is saved and exits.- When its standard input is a pipe or a socket, as under
ssh host pic attach, it exits once that input closes, so a watcher whose other end has gone does not run on. --from endshows only what comes from now on; when a request is running it starts with that request'sagent_startand its tool calls under way, so a client knows to steer it.
The JSON output shows a reply's text as the model streams it (message_update), read from the pic
running it; the text format shows a reply when it is complete. If the pic running a request dies
before the request ends, pic attach says so after two seconds (agent_end with status
interrupted), and shows the request again if another pic takes it up (pic run --session ID, or
Enter in the terminal).
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 prompt TEXT follows Pi's rules for a prompt sent while the agent is busy: with
"streamingBehavior":"steer" (or "followUp") in the JSON form it is a steer (or a follow-up), and
without it, it is refused while a request runs. Sent while nothing runs, it waits like a follow-up
and runs after the next request that runs there; pic starts nothing to run it.
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.
- A message is delivered once. Sending the same
--keyand message again (after a lost connection, say) changes nothing; the same key with a different message is refused. - A message to a conversation with nothing running waits until a request runs there. It expires
if it waits too long: 10 minutes for a steer or abort, a day for a follow-up (
--expires SECONDSsets it, up to a week). An abort sent when nothing runs is refused at once. - At most 100 messages (or 64 MB) can wait in a conversation.
Both at once: pic attach -i
pic attach -i follows the conversation and acts on each line you type:
- While a request is running (started here or anywhere else), the line is a steer for it.
- When nothing is running, the line (or Pi's
promptcommand as JSON) starts a request, aspic ask --session ID TEXTwould: its reply and tool calls are shown as they are saved, and thenpic attachgoes back to following.--modeland--thinkinggiven beforeattachapply to it. The request runs in a process of its own, so a dropped connection does not stop it. When the key is sealed in the credential store, the passphrase is asked once, on this terminal, and each request gets the key from it. /abortcancels the running request, whichever process runs it.- If a request it started cannot run (an unknown model, another request already running), it says why, and lines sent to that request meanwhile are reported not delivered; the next line starts a request again. Lines that reach a request as it finishes start the next one.
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 over ssh
pic attach works over ssh, with nothing more to install. In the terminal interface, /rc ssh
(or /remote-control ssh) shows how for the conversation you are in; pic rc --ssh prints the
same in a shell:
- the Mac's
ssh://address, to open in an ssh app such as Blink or Termius, and the command to run once logged in (cdto the project,pic attach -i -c --format text); - the whole command for any ssh client, which
ccopies to the clipboard; - checks: whether Remote Login is on, and whether Tailscale is up. When it is, the address is the Mac's Tailscale address (100.x.y.z), so the phone reaches it from anywhere even when it does not use Tailscale's DNS, and the command uses the Mac's Tailscale name; if the name does not resolve on the phone, use the address, or turn on Use Tailscale DNS in the Tailscale app. Without Tailscale, the address is the Mac's name on the local network, reachable only from there.
To set it up:
- On the Mac, turn on Remote Login (System Settings, General, Sharing).
- Put the Mac and the phone on one Tailscale network (or any network that can reach the Mac).
- Open the address (or run the command) from the phone.
The command names pic by its full path when a login over ssh might not find it on its path.
Watch the run, type a line to steer it, and close the connection when done; the run carries on.
From a phone, through the relay
A phone can also reach pic without ssh or a shared network. The phone opens a web page; pic and
the page talk through a relay, which only passes sealed messages along. pic dials out to the relay
and never listens on a port. The relay, at https://remote.zeitforge.app (remote.relay changes
it), makes mailboxes by invitation: if pic says so, run pic settings remote.invite INVITE with
the invitation you were given.
Pairing
Run /rc in the terminal interface (with no phone paired it starts here; p pairs another), or
pic remote pair in a shell. Either shows a QR code and an address, good once and for ten
minutes. Scan it with the phone's camera and tap Pair this phone. When the phone answers, pic shows
its name and six digits:
Pair "Dan's phone"? It should show 333 054.
The phone shows six digits too. Press y only if they match; any other key says no. /rc asks
for the credential store's passphrase first if it has one and is locked, and Esc cancels. If the
relay wants an invitation and remote.invite is not set, pairing stops and says so. Once paired,
the phone opens this computer.
On an iPhone or iPad this works in Safari. Notifications only reach the page added to the Home Screen, whose storage is separate from Safari's: add it there, open it, and pair it from the phone as a new device (below), typing the code.
Adding a device from a paired phone
Nobody needs to be at the computer to add a device. On a paired phone, Add a device (in the page's
menu) shows a QR code, its link and a code of ten letters and digits, good once and for five
minutes, while pic remote runs. On the new device, scan the code, open the link, or type the code
where the page asks for a pairing link, and tap Pair this phone. The paired phone then shows the new
device's name and six digits; tap Approve only if the new device shows the same six digits. One
wrong answer ends the offer.
Any paired phone can do this. If a phone is lost, unpair every device (below) and pair again the
ones you still have. pic settings remote.phonePairing off keeps pairing to the computer.
A relay keeps up to 8 phones for one computer. pic remote devices lists the paired phones with
their ids, names, when they were paired and last seen, and says whether pic remote is running
(--json for scripts). In /rc, d shows their names and when each was last seen, numbered.
Turning it on
A paired phone reaches pic only while pic remote runs. /rc turns it on: with a phone paired, it
starts pic remote in the background, where it keeps running after you leave pic, and pairing the
first phone does the same. /rc shows whether it is connected or reconnecting, s turns it off or
on again, and the footer shows /rc at its right end, green while it is connected and dim while pic remote is down or offline (checked every 10 seconds; a click on it opens /rc when the mouse is on, and it is left out of a window under 40 columns). It needs
the credential store unlocked, so /rc asks for the passphrase if the store has one and is locked;
the key is passed to pic remote privately, never on its command line. Its messages go to
~/.pic/remote.log. If it crashes while pic is open, pic starts it again.
In a shell, pic remote runs in the foreground until Ctrl-C. With the store's key in the Keychain
or ~/.pic/master.key it starts with no prompt; a store with a passphrase asks for it on the
terminal every time it starts, and with no terminal it exits with a message. pic remote status
says whether one runs and how it is connected, and pic remote stop stops it, wherever it was
started. One pic remote runs per user: a second says one is running. With no phone paired it says
so and waits for one. Either way, it says goodbye to each phone when stopped.
When you install a newer pic, a running pic remote notices and starts the new one in its place
as soon as nothing is under way (no command waiting, nothing still to send). Your phone connects
again by itself. pic remote status and /rc say when the one running is older than the pic
installed, which is the case for one started before this check existed; pic remote restart, or
r in /rc, restarts it.
A newer pic sometimes has to update a workspace's journal, which it can do only with no other pic
in it. pic remote lets go of the workspace when that happens, once nothing it is doing needs it,
and serves it again when the update is done; the terminal pic's follower of an open conversation
steps aside the same way. Anything else that holds the journal is named in the error, with its
pid; pic doctor stops it and updates the journal (pic doctor).
The phone lists every workspace you have used pic in, by its folder's name, or with its parent
folder's too when two share a name. A folder that is gone is left out and forgotten. A workspace
last used with an older pic says so, with Fix it: that runs pic doctor there on the computer,
which updates it, and the workspace's conversations show again.
Starting at login
pic remote install has the system start pic remote whenever you log in, so a phone reaches the
computer again after a restart with no one at the keyboard: a LaunchAgent on macOS, a systemd user
unit on Linux, and elsewhere a line in your crontab that starts it when the computer starts. It
also starts it now where the system can, and starts it again if it crashes, but not after pic
remote stop. Its messages go to ~/.pic/remote.log. pic remote uninstall undoes it and stops
the one the system started. pic remote status and /rc devices say whether it is set up.
It needs the credential store's key in the Keychain or ~/.pic/master.key, since no one is there
to type a passphrase: pic auth rekey keychain (or file) moves it there. Installed before the
first phone is paired, it waits for one. Over ssh with no one logged in at the screen, macOS starts
it at the next login.
Keeping the connection
pic remote keeps its connection to the relay on its own. A connection that has carried nothing
for 45 seconds (the relay sends something every 15) is taken for dead and made again, after 1
second, then 2, doubling to at most 60, each wait varied a little. When the Mac wakes from sleep,
or the network comes back, it reconnects at once and sends what was waiting. It takes up where it
left off: nothing the phone was sent is lost or shown twice, and a command the phone repeats is
carried out once.
Both at once
The Mac and the phone drive the same conversation. A request the phone starts shows in pic, with
the phone's messages marked from NAME:, and a message you type while it runs steers it; Esc on an
empty editor stops it. A steer or follow-up from the phone while a request of yours runs shows the
same way.
What a phone can do
- See the conversations of every workspace pic knows (the 50 most recent) and follow one: the same
events
pic attachshows. Each shows its title, workspace, last activity and the first line of its last message, marked Running, or Needs attention when its last request failed; the list is newest first, narrowed by workspace, and searched by what you type. - Start a new conversation in any workspace pic knows, or go back to any earlier one.
- Send a prompt. When the conversation is idle this starts a request, in a process of its own, so
it keeps running if
pic remotestops. Steer a running request, queue a follow-up, and stop it with abort: these are delivered once, by whoever runs the conversation. - Send photos with a message: the attach button offers the photo library and the camera, and on a computer's browser you can paste or drop them. The page shrinks each one to the size models work at before it is sent, up to eight a message. Images in the conversation, from the phone or pasted at the terminal, show as thumbnails; tap one to see it whole.
- Ask for the conversation's state and messages.
- Watch the reply as it is written, a few times a second; once it is complete the saved reply takes its place.
- Scroll back: a conversation opens at its latest request, and scrolling to the top (or "Earlier messages") loads five more requests at a time, back to the first.
- Choose the model and the thinking level the next request runs on, from the buttons above the box
you type in. The choice lasts until a request starts with it, which then records it, so the
conversation goes on with it as at the terminal; restarting
pic remotebefore then forgets it. The models offered are the ones with a key on the computer. - See how full the context is, the tokens used and the cost so far, beside those buttons; they update when a request ends.
- Rename the conversation, and compact it now (the menu at the top right). Compacting waits for no
request: while one runs it is refused, where Pi's
/compactwould stop the request first. - Delete a conversation: swipe it left in the list, or choose Delete in its … menu or the conversation's own menu. Undo on the notice brings it back; a running one is refused (deleting).
- Copy a reply.
While a phone has a conversation open on its screen, pic's footer for that conversation says so:
NAME watching.
A paired phone can do what you can at the terminal. It can see every conversation of every workspace, and a prompt from it runs the model's tools as you, without any approval step a prompt typed here would not have: it can run shell commands. Pair only a phone you would hand the keyboard to, and unpair it if it is lost. Hooks run as they do locally and see where a prompt came from. A phone can add a device and unpair devices (see above and below); it cannot sign in or out of a provider or change settings.
bash, forking and the other commands are not carried yet; they come later. A pic remote from
before images were carried does not say it takes them, and the page then offers no attach button.
Notifications
When notifications are on in the phone's page, the phone gets one when a request ends: its lock
screen shows the conversation's title (or the workspace's folder) and the first
line of the reply, or how the request ended ("Stopped", "Failed: ..."). Nothing else is in it: no
prompt beyond the line that titles the conversation, no tool output or path. pic remote sends it straight to the phone's push service, encrypted so that only the
phone can read it; the relay has no part in it.
- On the phone, choose every request, or only those a phone started or steered.
pic settings remote.notify remotemakes the second the most any phone gets from this computer, andoffsends none. - Nothing is sent while the page is open and showing on the phone, and at most one notification for a conversation every 30 seconds.
- Only requests that end while
pic remoteruns are announced; one that ended while it was stopped is not announced later. pic remote devicessays which phones get notifications. When the push service says a phone's subscription is gone,pic remotestops sending to it until the phone subscribes again.
On an iPhone or iPad, notifications need iOS 16.4 or later and the page added to the Home Screen, paired from there.
There is no notification when a request is waiting for an answer from you: questions answered from the phone are not built yet, and that notification comes with them.
Unpairing
pic remote unpair ID takes the first four or more hex characters of the id from pic remote
devices, and pic remote unpair --all unpairs every phone. Neither needs a passphrase, and a
running pic remote drops those phones within a second. In /rc devices, press 1 to 8 for the
phone, then y. pic remote reset (in /rc devices, R then y) unpairs every phone (a running
pic remote
tells each connected one, as unpair does), stops pic remote and deletes pic's remote keys and the
mailbox at the relay.
On a paired phone, Devices (in the page's menu) lists the paired devices, unpairs any one of them, or unpairs every device, that phone included: what to do when a phone is lost and another is at hand.
What the relay can and cannot see
Messages are encrypted between pic and the phone; the relay holds only ciphertext. It does see that a mailbox exists, how many phones it has, when each is connected, from which address, and the size and timing of each message, which shows when a reply is being sent and about how long it is. It does not see which conversation or workspace you use, any command, text or event, or the phone's name. The weak point is the page itself: whoever serves the web page could serve one that leaks what you type into it, which is why the page's host matters more than the relay.
Stopping and crashes
Stopping pic remote, or killing it at any moment, loses nothing that was acknowledged to the
phone: a command is saved before it is answered. Start it again and it picks up where it was; that
is the whole repair. A request the phone started keeps running.
What it cannot do yet
- Start a request with
pic send: a follow-up to an idle conversation waits until a request runs there (pic attach -istarts one). - Reach a conversation in another workspace over ssh (a paired phone can).
- Show text as it streams over ssh or in
pic attach(a paired phone shows it).