Connect Rex

Connect Heeler over SSH to a Rex server that already runs on a Mac, Linux or Windows Host, and open its terminals on your iPhone or iPad while Rex keeps running them. A Host's Rex server is one of its Servers in Heeler, beside Herdr TUI, Herdr Core, and Tmux.

Note

Heeler supports Rex API revisions 12 to 24 on macOS, Linux, and Windows. Preview.25 was exercised on macOS and Linux, and preview.23 on native Windows. Open running terminals and Agents from the Console. See What Heeler does not do yet and Known limits.

Before you start

  • Heeler 0.1.21 or newer for Rex on macOS and Linux (API revision 12), 0.1.24 or newer for native Windows Rex, New Terminal, and API revisions 12 to 19, or 0.1.25 or newer for API revisions 12 to 24.
  • Rex running on the Host under the account you will sign in as over SSH. Heeler connects only to a Rex server that is already running and never starts one.
  • Remote Login turned on for the Mac and its SSH fingerprint noted: Prepare the Host. On Linux, run OpenSSH. On Windows, run Win32-OpenSSH, with rex.exe on the account's PATH, as WinGet puts it; Heeler reaches the server through Rex's own stdio bridge, and Chat there works for Claude Code, Grok Build, Pi, and Oh My Pi.
  • On a Mac or Linux, an SSH server that allows forwarding to a Unix socket, as OpenSSH does by default. If its sshd_config sets AllowStreamLocalForwarding no or AllowTcpForwarding no, Heeler cannot reach Rex.
  • A way for your iPhone or iPad to reach the Host: directly on the same network, over an overlay network, or through a Jump Host. A Host can have multiple routes.

Add a Host

Heeler looks for a running server. A terminal or an Agent starts when you request it in Terminals or Agents. On a Mac or Linux it never runs the rex command; on Windows, where SSH cannot reach Rex's named pipe directly, each connection runs rex __internal dial-stdio --autostart=false, the bridge Rex's own command uses over SSH, which starts no server.

1. Connect

  1. In Hosts, tap +, or Add Manually when empty. On macOS and Linux you can scan a Pairing Code instead, which skips this step and goes straight to choosing the Servers; on native Windows, add the Host manually.
  2. Enter the Address and the SSH User of the account that runs Rex. More Options has the port, a Jump Host and an overlay network.
  3. Pick Device Key, RSA Key, or Password. For Device Key, copy the public-key line into the Host's ~/.ssh/authorized_keys.
  4. Tap Connect, check the Host's key fingerprint, and tap Trust and Continue.
ConnectTrust
New Host sheet on the Connect step with Address, User, More Options, and the Connect buttonNew Host sheet on the Trust step showing Trust this Host?, the key fingerprint, Copy the Command That Prints It, and Trust and Continue

2. Choose the Servers

Heeler looks once through your login shell without starting anything and lists what the machine runs. A Host has one Rex Server, listed as Rex:

Heeler foundWhat to do
Rex reading RunningLeave Rex checked and tap Add Host with 1 Server.
Rex reading Not runningRex is installed but not running, so Rex starts unchecked. Check Rex to have it connect once you start Rex. Or add the Host without it, start Rex, open the Host, tap Scan Again, and turn on Rex.
Rex alongside Herdr TUI, Herdr Core, or TmuxCheck each one you want in Heeler. They are all Servers of this one Host.
No RexRex is not installed. Add the Host anyway, install and start Rex, open the Host, tap Scan Again, and turn on Rex.

Each Server has a switch on the Host's page. Tap Rex while it is on to open its own page, with its checks. The connection is the Host's, under Routes. Add by Name… does not offer Rex: the Host's one Rex Server has no name to type, and Heeler lists it wherever Rex is installed.

If the Host's page reads Rex with Socket found, but this account cannot use it, Rex runs under another account. Add the machine again as another Host with that account's User.

It worked if the Host's row shows a green Rex tag, the Host's page lists Rex as Running, and the Server's page shows SSH connection, Rex installed, Rex server running, and protocol compatible passing.

When it does not connect

Host readsWhat to do
Rex is not runningStart Rex on the Host, then tap Run Checks Again.
The SSH server refuses socket forwardingAllow forwarding to a Unix socket in the Host's SSH server (see Before you start), then tap Run Checks Again.
Rex is not answeringHeeler could not tell which of the two above it is. Check both, then tap Run Checks Again.
Rex did not let this account inRex runs under another account. Add the machine again as another Host with that account's User.
This version of Rex is not supportedHeeler works with Rex API revisions 12 to 24. Update Rex if the message says it offers an older revision; if it offers a newer one, wait for a Heeler update.
Rex was not found on this HostInstall and start Rex, then tap Run Checks Again.

The Console

Heeler reads your Rex layout from the server.

  • Workspaces, Tabs, and Panes: Each Rex session is a Workspace, each window is a Tab, and each terminal is a Pane, in Rex's order. A session's terminals that are in none of its windows share a Tab named Detached. A session with no terminal is not listed.
  • Agents and Terminals: A terminal whose program is Claude Code, Codex, or another coding Agent Heeler knows appears in Agents, with the status the Agent reports to Rex. Shells and other programs appear in Terminals, and a terminal moves back to Terminals when its Agent exits. A session whose terminals are all Agents appears in Terminals as a card holding only New Terminal. Titles, programs, and directories follow Rex as they change.
StatusWhat it means
WorkingRunning a turn.
IdleWaiting at its prompt.
BlockedWaiting for your answer.
ErrorReported an error and sorts with Blocked.
DoneFinished a turn while closed here. Opening the Agent clears Done on this device only.
UnknownThe Agent has not reported a status to Rex, or the last report came from another program, such as one that has since exited.

An Agent started as a Rex terminal's own command rather than from its shell, or started with exec, stays in Terminals. Heeler sees a terminal's program change when the terminal next prints, so an Agent can take a moment to arrive in Agents or to leave it.

Working in a terminal

Tap a terminal in Terminals to open it. An Agent in Agents opens like an Agent on any other Host, with Chat and its terminal; when the Agent exits while it is open, it reads Agent Gone, and the terminal is back in Terminals. Other Rex clients keep showing it while you work:

  • Opening: The terminal appears once Rex has redrawn its screen and history, so a long history can take a few seconds on a slow connection. A program that keeps writing, such as a spinner, can show a few lines twice or out of place until it pauses; Heeler then paints it again.
  • Typing and pasting: Type in Text or Keys mode, tap Paste, or send a Snippet. You can type whichever device set the terminal's size. What you type reaches the terminal in order, and Heeler never sends it twice: when the connection drops before Rex answers, the terminal shows Connection dropped with Reattach, and nothing typed after that point was sent. Keys typed while Heeler reconnects are not sent either; the terminal reconnects and paints again. A paste too large to send in one piece is blocked rather than split; paste less at a time.
  • Ending: When a terminal closes in Rex or its program exits, its view ends.
  • Rex restarting: When Rex restarts and brings back its sessions, its terminals, your pins and Chat stay. An open terminal reconnects and shows a fresh screen, since what ran in it started again or ended.
  • Slow connection: When Heeler returns to the foreground or the network changes, it asks Rex whether the connection still answers. If Rex keeps sending other data, such as a terminal's redraw, but takes more than 15 seconds to answer, an open Agent's title reads Connection slow… and you can't type or send until it answers, without reconnecting. A connection that goes quiet for about 5 seconds (3 after a network change) reconnects instead.

When a terminal stops, it says why:

Terminal readsWhat to do
Connection droppedSomething you typed may not have arrived. Tap Reattach and check the screen before typing again.
This terminal's history is too long to showClear the terminal's scrollback in Rex, then tap Reattach.
Rex stopped sending this terminal's outputRex stopped the terminal's output while the Host stayed connected. Tap Reattach. When the connection to the Host drops, the terminal reconnects and paints again by itself instead.
This Terminal belongs to a Rex server that is goneAnother Rex server answers, one that did not bring back this terminal's session. Open the terminal again from Terminals.

Fitted to your screen

A Rex terminal has one size, set by one device at a time. When you open a Rex terminal from Terminals, or show an Agent's terminal, Heeler fits it to your screen before it appears. Chat never resizes the terminal. Rex resizes the terminal itself, not only your view of it, so every device showing it, the Rex app on your Mac included, gets your screen's size while you have it open here. Heeler gives the size back when you leave the terminal, when Heeler goes to the background, or when the terminal ends, and the device that had it gets it back. Coming back fits it again.

Sized for another device

When another device, such as the Rex app, takes the size while you have the terminal open, Heeler leaves it with that device instead of taking it back. The same happens when fitting does not go through. Heeler then shows the terminal at that device's size without scaling it: lines wider than your screen wrap onto the next row, so a program drawn to the full width, such as a table or an editor, can look jumbled. After a second Sized for another device appears over the terminal, at the bottom while the output ends in its upper half and at the top otherwise, so it stays clear of the prompt:

  • Fit to Screen takes the size back for your screen.
  • The × button dismisses the notice and keeps the other device's size while you stay. The notice returns when yet another device sets the size.
  • If tapping Fit to Screen does not go through, the notice says why, and Try Again asks once more.

Leaving the terminal and coming back fits it to your screen again.

On iPad, one window at a time shows a Rex Host's Agent terminals. Another window that opens one reads Live in Another Window; tap Take Over Here to move it there.

New Terminal

Heeler starts a shell in Rex, in a new window, the way Rex's own New Terminal does:

  • In a Workspace: Tap New Terminal at the end of a Workspace's card in Terminals, or + in Terminals and pick the Workspace. Rex opens the shell in a new window of that session, in the Workspace's directory. The window opens in the background: the Rex app on your Mac keeps showing the window it had.
  • In a new Workspace: In the + sheet, choose New Workspace, and browse to a directory or leave it empty for your home directory. Rex makes a new session with the shell in it, named as you type it, or after the directory when you leave the name empty. The optional Tab name labels its window.
  • Opening it: The new terminal opens here as soon as Rex lists it, fitted to your screen as any other, and gives its size back when you leave it.
  • If Rex does not answer: Heeler never asks Rex twice. When the error says Rex did not answer, the terminal may still have been made: look in Terminals before trying again.

New Agent and project tools

Open Agents → + → New Agent. Choose your Host, then Server → Rex, an installed Agent, and a Workspace. The form shows Rex once you turn it on under Hosts → your Host → Servers, including while it connects. With Rex as the only Server, its name appears beside Server. If Rex cannot confirm command launch, the Agent section explains how to continue. Pick a saved launch preset or supply arguments in the form. Choose New Workspace to enter a specific directory. On Windows, the Agent starts through Windows PowerShell. On macOS and Linux, Start in a new worktree branches from the selected Workspace's checkout, or from the repository of the directory you chose for New Workspace, and opens the new checkout in its own Rex session. Leave Branch empty to generate a worktree/ branch, or pick a starting ref in Base (optional). The checkout remains on the Host if launching the Agent fails.

In Terminals, tap the pencil beside a Workspace to Rename Workspace. Its Rex session takes the new label. Rename Agent in the Agent menu changes its Rex block label. Clearing it restores the default. Rename Tab in a Pane's menu changes its Rex window label. On macOS and Linux, Rename in the Agent menu sets the conversation title instead, for Claude Code, Codex, Pi, Oh My Pi, Grok Build, OpenCode and Antigravity CLI. In the Agent detail, open Files, and on macOS and Linux Changes, or use Skills in the keyboard there. On macOS and Linux, an Agent's row in Agents also shows the lines added and removed in its checkout, the Agent detail's status line shows its branch and those totals, and By Workspace shows the branch on a repository's card. Hosts → your Host → Rex lists the Chat programs and actions available on that system.

  • Close: On a Rex server that offers API revision 20 or newer, close an Agent, a Terminal, or a Tab from its menu. Heeler first checks that the same program still runs there; when another one has taken the terminal, it asks you to check it before closing.
  • Move to Workspace: On a Rex server that offers API revision 22 or newer, choose Move to Workspace from a Pane's menu to move its Tab, with what runs in it, into another Workspace or a New Workspace. Only a Tab that holds this one Pane moves: separate a split in Rex first. Terminals in the Detached Tab stay where they are.
  • Copy Pane ID: Choose Copy Pane ID from a row's menu, a Terminal's More menu, or the Agent detail's menu to copy the terminal's Rex block id (block:<uuid>), which rex send -b, rex capture -b and rex focus take. When you run them from a Rex terminal in another session, also name the block's session with -s <session>.

Chat

Chat works for Claude Code, Codex, Pi, Oh My Pi, Grok Build, OpenCode, Antigravity CLI, Amp, Droid and Devin CLI in Rex on macOS and Linux, and for Claude Code, Grok Build, Pi and Oh My Pi on Windows. Claude Code and Codex need nothing installed on the Host; Pi and Oh My Pi need Heeler's extension, and OpenCode uses Heeler's OpenCode plugin, which Chat offers to add. Heeler reads the conversation over the Host's SSH connection and types into the terminal through Rex, without resizing it. You can read the conversation, Send a message, Stop a turn, and tap buttons on Blocked prompts:

Chat keeps a draft and staged attachments with the conversation where you prepared them. If you switch on the desktop, open the original conversation to recover them. A permission button applies to one identified request. If a request has changed, or Heeler cannot confirm the result, open Terminal to see what the program is asking before answering again.

ProgramSession notes
Claude CodeBinds from the running Claude Code itself, on Windows too. After /clear or /resume, Chat checks again before it sends your next message.
Devin CLIOn macOS and Linux, open a local Devin session with a foreground ACP writer. The Host needs Python 3.
DroidOn macOS and Linux, install the Droid hook and resume Droid in this terminal. Chat checks its current session before sending.
CodexBinds once it holds its conversation file, after the first message. Start it with --no-daemon (why); without it, Chat shows Codex Started Without --no-daemon instead of the conversation.
Grok BuildThe local registry must identify a single conversation held by this foreground and process start. If several entries still match after a desktop /new, use Choose a Conversation on macOS and Linux, or the terminal.
PiBinds through Heeler's extension, as soon as Pi starts. After /new, Chat checks again before it sends your next message.
Oh My PiBinds through Heeler's extension, as soon as Oh My Pi starts. Without the extension, Chat follows the conversation after its first message. After /new, Chat checks again before it sends your next message.
OpenCodeOn macOS and Linux, binds through Heeler's OpenCode plugin (offered from Chat), which tracks the foreground process's session in OpenCode's config folder. Without the plugin, use Choose a Conversation.
Antigravity CLIOn macOS and Linux, an agy started with no arguments opens Chat before its first message: answer its folder trust prompt there and send the first message from Chat. Otherwise Chat opens after the foreground holds the conversation’s exclusive write lock and its official transcript is readable. Read history, send messages or attachments, answer approvals, and Stop a turn along with the background commands it started. Use the Agent’s Terminal for commands. After a desktop session change, Chat waits for the new conversation to be identified.
AmpOn macOS and Linux, open Chat in a running Amp terminal. Confirm Install on This Host or Update on This Host if offered. In that terminal, press Ctrl+O, search for reload, and choose plugins › reload. Chat follows and sends in the active thread when you switch in Amp. Use Show Agent Terminal to attach files, run commands, or answer a request.
Other AgentsNo Chat on Rex Hosts yet. They open on their terminal. On Windows, so do Codex, Antigravity CLI, Amp, OpenCode, Droid and Devin CLI.
  • Can't Tell the Conversation: When Chat cannot prove which conversation the Agent shows, it says so with Check Again. For programs that offer Choose a Conversation, tap it, preview one, and tap Use This Conversation. Heeler keeps that choice on this device, for this terminal, until the Agent exits or Rex restarts. Chat sends your messages and card answers to it once it checks that the same Agent and conversation still hold the terminal. If a message you send from Chat doesn't appear in the chosen conversation, Heeler drops the choice and asks again. Stop still needs a conversation Heeler identified on its own, so stop a chosen conversation's turn in the terminal. For Pi and Oh My Pi, add Heeler's extension instead.
  • Read in the background: On macOS and Linux, Heeler reads each Agent's conversation in the background after it connects, so Chat opens with the history already read and the Agent keeps a saved Chat. It reads a conversation only when it can tell which one the Agent is in, or you chose one, and reads OpenCode, Amp and Devin CLI only while their Chat is open.
  • Send: Send pastes your message and presses Enter once it checks that the same Agent still holds the terminal, is not Blocked, and accepts a paste. The Composer under the terminal sends the same way. If Rex does not answer, Heeler never sends the message again; check the terminal first.
  • Stop and Blocked prompts follow the Agent's status. While the Agent reads Working and your message is empty, Stop checks the bound conversation and its current recorded turn. It then uses the stop key for that harness. A card with buttons appears while it reads Blocked. For a prompt Heeler doesn't recognize, the card shows the prompt with a button for each numbered option and keys to press, and a Blocked screen with no prompt gets the keys alone (Waiting for Input). An Agent that reports no status to Rex reads Unknown: it gets no Stop and no card, so stop or answer it in its terminal. A Claude Code that has finished its turn while a command it put in the background still runs reads Done or Idle, so you can send its next message; Stop never ends that command, so end it in the terminal.
  • Commands: Open Skills from the keyboard on macOS or Linux. The slash menu also offers /compact when the Agent is idle.
  • Images and files: In Chat or on the Agent's terminal, tap +, then Add Image, Paste Image or Add File. Heeler uploads the file over the Host's SSH connection, not through Rex, into a new folder in the temporary folder of the account you sign in with (on Windows, AppData\Local\Temp in its user folder), and adds its path to your message; Send types the path with your message, once. An image is sent as a JPEG or PNG of at most 16 MiB, and a file can be up to 64 MiB. Heeler never deletes uploaded files from the Host. If another Rex server takes over, one that did not bring back the Agent's session, an upload started afterwards stops with This Terminal belongs to a Rex server that is gone; one already under way finishes and its file stays on the Host, but Send then refuses the message with the same words. Open the Agent again from the list.

Pi and Oh My Pi

Pi and Oh My Pi tell Chat which conversation they are in through Heeler's extension, one file named heeler-session.js in the Agent's own extension folder, such as ~/.pi/agent/extensions. On macOS and Linux, the Host Helper puts it in every Pi and Oh My Pi extension folder. Without the Helper, or on Windows, Chat asks you instead:

  1. Open the Agent and show Chat. It reads Can't Tell the Conversation, with Add Heeler's Extension….
  2. Tap Add Heeler's Extension…. Heeler shows the one folder it will write to, found from the running Agent.
  3. Tap Add to This Folder. Heeler writes the file over the Host's SSH connection, replacing an older copy of it, and nothing else.
  4. Quit the Agent and start it again in the same terminal. It loads the extension as it starts.

It worked if Chat shows the Agent's conversation by itself a few seconds after the Agent starts.

  • Still Can't Tell the Conversation: When the message says the Agent hasn't loaded the extension, the Agent was started before you added it, or with --no-extensions. Start it again with its extensions on.
  • What the extension does: Pi and Oh My Pi load it for every session on the Host. In a Rex terminal it keeps one small file per running Agent in a heeler-session folder beside the extension folder, naming the conversation, and removes it when the Agent quits. Outside Rex, Tmux, and Herdr Core it does nothing.
  • Removing it: Delete heeler-session.js from the extension folder, and the heeler-session folder beside it.

Host Helper

Everyday terminal and Chat use do not need the Host Helper. Install it on macOS or Linux (Node.js 20 or newer, and systemd on Linux) to add:

  • Agent Notifications (Blocked, Error, and Done) and Live Activity, also while Heeler is closed;
  • Usage (Token Usage, Usage Limits, and Home Screen and Lock Screen widgets);
  • Pi and Oh My Pi Chat: Heeler's extension in their extension folders, so Chat follows each Agent's conversation as soon as it starts.

Open the Host in Hosts, tap its Rex Server, tap Host Helper, review Files This Writes, tap Install, and turn on the Host under Settings > Notifications, following the same steps and status table as Connect Herdr Core. Rex needs Host Helper 0.5.14 or newer: when the Host already holds an older Helper for another Server, update it first. The Helper connects to the running Rex server and never starts one; while none runs, it waits. Native Windows has no Host Helper.

Foreground alerts

In Settings → Notifications → Rex In-App Banners, turn on a recognized macOS or Linux Rex Server on this device. Heeler keeps that choice if the Host temporarily disconnects. Blocked and Error are included. Turn on Include Done for completed turns. Tap a banner to open its Agent. Switching the Server off here stops these alerts without editing its configuration. These banners show only while Heeler is open and need no Host Helper.

What Heeler does not do yet

  • Layout. Use Rex on the Host to split or rearrange panes, to move a detached terminal or one Pane of a split, and to close or move anything on a Rex server older than API revision 20 (or 22 for Move to Workspace). Heeler follows the resulting inventory.
  • Removing a worktree that is still open. Remove Worktree refuses while any terminal in Rex is still open in that checkout, the Agent's own included. Close them first, or use Git on the Host. Closing a window leaves its checkout intact.
  • Windows. Changes, Skills, worktrees, the Host Helper with its background notifications, Live Activities and Usage, Chat for Codex, Antigravity CLI, Amp, OpenCode, Droid and Devin CLI, and reading Chat in the background are for macOS and Linux Rex Hosts.

Known limits

  • Rex API revisions 12 to 24: Heeler offers revision 24 and accepts any from 12, and Rex picks the newest both speak. A Rex that speaks none of them is refused. Close needs revision 20 or newer, and Move to Workspace revision 22 or newer. Heeler was built against Rex 0.1.0-preview.14 (revision 12) and checked against 0.1.0-preview.23 (revision 19). Rex 0.1.0-preview.25 speaks up to revision 24.
  • Linux. The preview.25 lab used Debian 12 arm64. The platform evidence identifies the operations and harnesses exercised there.
  • Colors, cursor shape and history: A Rex terminal wears its own colors, as Rex shows it, and your Heeler theme only where Rex keeps its built-in ones. Rex does not say a terminal's cursor shape, so the cursor keeps Heeler's shape until the program sets it again. While a full-screen program is open, the history behind it appears only after the program closes.
  • Another device's size does not fit: While a terminal stays at a size another device set wider than your screen (see Sized for another device), its lines wrap at your screen's width, so a full-width program can look jumbled. While its screen holds a line wider than yours, the cursor, new output and what you type can also land on the wrong row, over earlier text, until Fit to Screen paints it again. Heeler does not scale it down or cut it off.
  • Earlier preview.14 observations: Rex was tried in the iOS Simulator against Rex 0.1.0-preview.14 on macOS, with test clients standing in for other devices. Apart from one Chat message sent from an iPhone (below), they have not been tried on a physical iPhone or iPad. They have not been tried with the Rex app showing the same terminal either.
  • Earlier Simulator Chat runs: In the iOS Simulator, Chat was tried with a real Claude Code, Codex, Pi, and Oh My Pi running in Rex on macOS: reading the conversation, Send, and Stop for all four, and the buttons on Blocked prompts for Claude Code and Codex. On an iPhone, one message sent from Chat reached a real Codex 0.169.0 running in Rex, which answered it. That was an earlier build, which refused every later Send once Codex's answer drew links. Chat now reads such links, but Chat has not been tried again on an iPhone or iPad. See the Chat observations by harness for later POSIX runs.
  • Attachment evidence. Earlier Simulator runs exercised image staging with Claude Code, Codex, Grok Build, Antigravity CLI, Pi and Oh My Pi in Rex terminals. Claude Code and Codex also received a text file. The acceptance matrix distinguishes a staged file, a submitted message and a physical-device check.
  • Chat on Windows checked piece by piece: Against Rex 0.1.0-preview.23 on Windows 11, three real Claude Code 2.1.332 Agents in Rex terminals were each found by the process read Chat runs there, held to their own conversation, and their conversation files read over SFTP. Making a staging folder, writing, renaming and removing a file over SFTP in the account's AppData\Local\Temp worked there too. Chat and uploads on Windows have not been tried end to end in the app.

The November 27, 2026 lab ran Rex 0.1.0-preview.25 on macOS and Debian with a Heeler build that negotiated revision 19. The earlier macOS observations used preview.14 at revision 12. Platform and harness evidence