Skip to content

Rex is a terminal and session manager from Superlogical. Fleetlayer works with it: Rex keeps your terminals and sessions alive and shows them on your Mac, phone and other machines, and Fleetlayer connects the Claude Code and Codex agents running in those terminals so they can message each other, receive webhooks, and work under access rules you set. Neither replaces the other.

This page says what Rex is, what Fleetlayer adds, what works today, and what’s coming. Everything it says about Rex comes from Superlogical’s public documentation, linked beside each claim.

  • A terminal multiplexer with a separate server. Sessions live in a Rex server process. Clients attach to it, show it and detach, so sessions survive a closed window or a lost connection. A server holds sessions, a session holds windows (tabs), and a window holds panes of blocks; today the main kind of block is a terminal (CLI reference).
  • Clients on many devices. There’s a native Mac app, an iOS and iPadOS app in the App Store, and a Windows app in testing. Servers run on macOS, Linux, FreeBSD and Windows (Installation). One client reaches many servers, over SSH or Tailscale among other ways (Remote Access).
  • Scriptable. The rex command line manages sessions, windows and panes, sends keys, reads screens and waits for output, and the server describes its own API (rex api list, rex api describe) (Server API). Configuration and event handlers are written in Lua.
  • Friendly to coding agents. rex skill setup installs a skill and a session-start hook for Claude Code and Codex (and a skill for OpenCode and Pi), so an agent can open tabs, split panes, read another terminal’s screen and wait for a dev server (Agents).
  • Two open terminal protocols. With the Program Status Protocol (OSC 7501), a program tells the terminal whether it’s idle, working, blocked on the user (a permission prompt, a question, a sign-in), done or failed. With the Program Resume Protocol (OSC 7577), a program tells the terminal how to bring it back after a restart. Superlogical publishes both as generic protocols any terminal can adopt.

Rex is in public testing. The Mac app and the Linux, FreeBSD and Windows servers are open to all testers (Installation), and Superlogical says you don’t need an account and can self-host fully (public testing announcement).

Rex manages sessions and terminals. Fleetlayer works one level up, with the agents in them, across every machine and every session manager you use:

  • Messages between agents. fleetlayer msg send --to infra@home "the migration is done" reaches the agent in that session on any machine, labelled with who sent it and how to reply. For Claude Code it arrives through Claude Code’s own messaging channel, so nothing is typed into a terminal you’re working in (How a message travels).
  • Events and webhooks. A CI result or another webhook goes to the agent that owns the branch, not to your inbox (CI results to the right agent).
  • Access rules, approvals and an audit log. Each agent gets its own rules about who it may message, which machines it may start sessions on and which tools it may use. Every decision is written to an audit log (Access control).
  • Agents that read untrusted input. An agent that reads strangers’ email or issues runs as its own user, and everything it sends is marked as outside data for the agents that receive it (An agent that reads strangers’ text).
  • Sealed secrets. Tokens and keys are encrypted to each machine’s own key; the control plane relays them without being able to read them (Secrets stay on your machines).
  • Claude accounts. Several Claude subscriptions shared across the fleet, with long-lived tokens on each machine (Many Claude accounts).
  • Shared tools. One machine’s MCP servers, such as the browser on your laptop, used by agents on other machines (Share your browser).

Fleetlayer is source-available and self-hosted: you run the control plane yourself, on your laptop to start or on a server later.

Fleetlayer works with your session manager. It attaches to the one you use through a session-manager plugin, a separate program the node starts (the plugin protocol). herdr has one, and Rex has fleetlayer-rex, which uses only Rex’s public command line and API:

Fleetlayer needs From Rex
The list of sessions and where each runs session.list, session.view and each terminal’s process
Each agent’s status (idle, working, blocked, done) Program status reports (OSC 7501), which Claude Code sends
Status changes as they happen rex events
Messages to an agent that has no channel of its own A paste into its terminal (block.event)
Starting and closing sessions rex new, block.close and session.destroy
Watching or stepping into a terminal from anywhere in the fleet The terminal’s format, write and resize methods, for fleetlayer attach

Your Rex apps keep working alongside it. You watch and type into sessions from Rex on your Mac or phone, and Fleetlayer routes messages and events to the agents in them, under your rules.

fleetlayer-rex ships with Fleetlayer from v0.3.9 (its directory entry). With it, the Claude Code, Codex and other agents in your Rex terminals join the fleet by their Rex session names, with their status, messages and webhooks, starting and closing sessions from anywhere in the fleet, and fleetlayer attach on Rex terminals. Rex and herdr can also run side by side on one machine, each with its plugin. The plugin’s page has the setup.

To start with Fleetlayer, see Getting started.