# Codex remote

> Add your box as an SSH host in the ChatGPT desktop app and Codex runs its tasks on the box, with every edit syncing back to your Mac as it lands. One command sets the connection up.

URL: https://prized.dev/docs/codex

The ChatGPT desktop app can point Codex at an SSH host, and every task in that project then reads, writes, and runs commands there. `prized setup` covers everything the app needs: Codex signed in on the box, and the box listed in `~/.ssh/config`. If you skipped chatgpt during setup, run it once:

```bash
prized setup --agent chatgpt
```

## Add the box in the app [#add-the-box-in-the-app]

In the ChatGPT desktop app, open **Settings > Connections** (under Coding). `ssh box-3fa9` from a terminal confirms the connection first.

1. **Click Add** under "SSH connections from this Mac".

   <img alt="The Connections page in the ChatGPT desktop app settings, with an Add button under &#x22;SSH connections from this Mac&#x22;" src="__img0" />

2. **Tick the box and click Add.** The dialog lists the `Host` aliases from `~/.ssh/config`, so the box shows up under its hostname.

   <img alt="The Add SSH Connection dialog listing the box by its hostname, with a checkbox and an Add button" src="__img1" />

3. **Check it shows Connected.** The saved connection appears with its toggle on; the app has started Codex on the box.

   <img alt="The saved connection with a green Connected status next to the box's hostname" src="__img2" />

Then pick a project folder on the box (a synced project lives at `~/code/<name>`); the edits stream into your Mac's copy as they land. See [Agents](https://prized.dev/docs/agents).

## From your phone [#from-your-phone]

The ChatGPT mobile app connects to the box directly, no Mac in the loop. Its Add SSH host form asks for a host, port, username, and password; the box page gives you all four.

1. Open the box in the [dashboard](https://prized.dev/dashboard), find **Phone access** under Access, and generate the password; it is shown once.
2. In the ChatGPT app, open **Settings > Connections > Add SSH host** and paste the four values.

The password is a long random credential for this one box, checked by Prized's SSH gateway, which wakes the box and opens a terminal-only session over the private tunnel. The box itself stays closed to the internet.

* **One password per box.** Generating a new one replaces the old; Revoke kills it. Deleting the box, removing the member who created it, or turning phone access off for the workspace revokes it too.
* **Connecting wakes a paused box.** The first session after a wake takes a little longer.
* **Terminal sessions only.** Port forwarding is refused on a phone session; use `prized ports` on your Mac for that.
* **Idle connections close** after about fifteen minutes with no task running, and a handful can be open per box at once. The app reconnects on its own.
* **Codex must be signed in on the box**, which `prized setup --agent chatgpt` already did.

OpenAI gates mobile SSH hosts by rollout and app version, so check Settings > Connections if you do not see the form. Tasks on an SSH host cannot hand off to Codex's own cloud environments.

## Two caveats (desktop connections) [#two-caveats-desktop-connections]

* **Wake the box first.** The desktop app connects with plain `ssh`, which does not wake a suspended box. Resume it from the dashboard or run `prized ssh` once, then connect. The phone path wakes the box itself.
* **The app stops when your Mac sleeps.** For an agent that keeps working with the laptop closed, start Codex on the box with `prized agents run codex`; see [Agents](https://prized.dev/docs/agents).
