# Use Rex with a Prized box

> Run a Rex server on a Prized box and add it to Rex for Mac, so your terminals and coding agents run on a cloud Linux machine and keep going while your laptop sleeps.

URL: https://prized.dev/docs/rex
Updated: 2026-11-20

[Rex](https://www.superlogical.com) is Superlogical's terminal multiplexer. Its sessions live in a server, so with that server on a Prized box, everything you run in Rex keeps going when you close the app or your laptop sleeps.

Rex connects over `ssh`, and Prized puts your box in your SSH config, so there is no port to open and no key to copy. Rex is in an invite-only beta: [get Rex for Mac](https://www.superlogical.com/rex/docs/installation).

## 1. Get a box [#1-get-a-box]

[Sign up](https://prized.dev/sign-in) and run the command the tour shows. It installs the Prized CLI and adds your box to your SSH config ([Quickstart](https://prized.dev/docs/quickstart)). Use your box's name in place of `mango` below, and check that ssh reaches it:

```bash
ssh mango echo ok
# ok
```

## 2. Install Rex on the box [#2-install-rex-on-the-box]

In a Rex terminal on your Mac:

```bash
rex server install --channel preview ssh://mango
```

It asks before each change, needs no `sudo`, and sets Rex to start with the box. Run it again to upgrade.

<details>
  <summary>
    Install by hand instead
  </summary>

  Run Rex's installer on the box. It does the same setup there:

  ```bash
  ssh mango 'curl -fsSL https://pkgs.superlogical.com/rex/install.sh | sh -s -- --user --channel preview'
  ```
</details>

## 3. Add the box in Rex [#3-add-the-box-in-rex]

The app keeps its own list of hosts. Open the command palette (Cmd-Shift-P), choose &#x2A;*Add Remote Host…**, and enter `ssh://mango`.

Sessions you open on the box now run there. **Switch Host** in the palette moves between the box and your Mac.

## 4. Set up your agents [#4-set-up-your-agents]

A box comes with Claude Code and Codex. Sign them in from a terminal on your Mac:

```bash
prized agents handoff claude codex --gh
```

Then let them drive Rex. In a Rex terminal on the box:

```bash title="you@mango"
rex skill setup
```

Agents you start in Rex can now open tabs, split panes and read your other terminals ([Rex's agent docs](https://www.superlogical.com/rex/docs/automate/agent-skill)). In Codex, approve Rex's hook with `/hooks` the first time.

## When the box sleeps [#when-the-box-sleeps]

Your sessions live on the box, so they keep running when you close Rex or your laptop. A paused box is out of reach until it wakes:

```bash
prized box resume mango --wait
```

A Nano through Small box resumes your sessions where they were, unless it stayed paused for more than 3 days. A Medium or larger restarts, so the programs running in them stop ([Pause and resume](https://prized.dev/docs/boxes#pause-and-resume)).

On the free credit, a box pauses after 2 hours idle ([Auto-pause](https://prized.dev/docs/boxes#auto-pause)). To keep it up while agents work (through 12 idle hours on the free credit, with no limit on a plan or after a top-up):

```bash
prized box auto-pause mango off
```

## Troubleshooting [#troubleshooting]

| Symptom | What to do |
| --- | --- |
| `rex: command not found` | Run the command in a terminal inside Rex. |
| `rex server install` only prints help | Update Rex, or install by hand (step 2). |
| Rex can't reach `mango` | Run `ssh mango echo ok`. If the box is paused, resume it; otherwise run `prized doctor` ([Troubleshooting](https://prized.dev/docs/troubleshooting)). |

## Related [#related]

* [Keep Claude Code running with your laptop closed](https://prized.dev/docs/keep-claude-code-running)
* [Run multiple Claude Code and Codex agents in parallel](https://prized.dev/docs/parallel-agents)
