# How Remote Codex works

Canonical: https://galaxnet.dev/nova/manual/codex/how-it-works/
Language: en-US

Pair NovaScale with a Codex app-server on your tailnet host to follow threads, search history, upload images or files, and respond to approvals natively.






Applies to: iOS 15+ · iPadOS 15+ · Mac · 1 Codex host Free · Unlimited Pro · Tailnet host running Codex CLI app-server










## The host runs Codex; NovaScale is the native client

Remote Codex connects directly over your private tailnet to a token-authenticated `codex app-server` running on your Mac or Linux machine.

- **Your host owns everything:** Project files, local credentials, MCP servers, tools, and rollout history stay on your host—never uploaded to NovaScale servers or iCloud.
- **Native mobile experience:** Instead of squinting at a CLI in a tiny terminal, NovaScale speaks the app-server's JSON-RPC protocol directly to render structured transcripts, live tool progress, inline diffs, full-screen image previews, approval controls, and context/usage meters.

![NovaScale Codex tab listing configured tailnet Codex hosts with live reachability status](https://galaxnet.dev/nova/manual/codex-hosts.jpg)

![NovaScale Remote Codex thread showing a user prompt, structured Codex response, model picker, and composer toolbar](https://galaxnet.dev/nova/manual/codex-thread.jpg)

*Open the Codex tab to pick a paired host, jump into a project workspace, or resume any recent thread.*

## Set up a Codex host

You have two ways to pair a host:

1. **SSH-assisted setup inside NovaScale (fastest):** Open the **Codex** tab, tap **+**, and pick an existing SSH-configured tailnet host. NovaScale connects over SSH, installs and starts the authenticated `codex app-server` service using the open-source [nova-codex-bootstrap](https://github.com/GalaxNet-Ltd/nova-codex-bootstrap) script, and imports the host URL and token automatically.
2. **Manual / QR bootstrap on the host:** Run `nova-codex-bootstrap` directly on your Mac or Linux box, then scan the generated QR code or paste the NovaScale URI under **Codex → +**.

> **Note:** Non-loopback WebSocket listeners require authentication (`--ws-auth capability-token` or `--ws-auth signed-bearer-token`). The bootstrap script configures WebSocket auth and binds only to your tailnet address automatically.

## Everyday workflows in Remote Codex

- **Start or resume threads:** Pick a workspace on your host, select a model and reasoning effort from the choices advertised by that host's Codex server, and send a prompt.
- **Host-wide history search & live pins:** Search conversation history across all projects on a host. On compatible Codex versions, pinned threads update live as pins change.
- **Inspect status & limits:** Open the thread **Status** sheet from the composer toolbar to view session ID, context-window usage, 5-hour and weekly rate limits, active model, project path, and git branch.
- **Attach photos and files:** Attach images directly from Photos or send up to 10 documents/photos (up to 10 MiB each) into one of your 10 most recent threads via [iOS Share Sheet](../../files/share-to-novascale/). Non-image documents are uploaded into `.novascale-codex-uploads` on the host and referenced by path.
- **Show/Hide tab & reading typography:** Don't use Codex on a device? Toggle **Show Codex Tab** off under **More → Codex → Settings** to reclaim tab-bar space. You can also adjust transcript **Text Size** and **Line Spacing** there.

## Shared state vs. live runtime boundaries

Understanding what Codex persists on disk versus what lives in a running process avoids surprises when switching between your desk and phone:

| State | Shared across NovaScale, Codex CLI & Desktop? | Notes |
| --- | --- | --- |
| Thread identity, title, completed turns, model & reasoning effort | **Yes** (persisted by Codex on host) | Resume the thread in any client to continue. |
| Active running turn, pending approval, session permission mode | **No** (owned by the runtime that started it) | Respond to an approval in the client/runtime that started that turn. |
| NovaScale Codex host entries | **Optional via iCloud Sync (Pro)** | Enable **Codex Hosts** under **More → Settings → iCloud**. Transcripts and code are never synced to iCloud. |

### Handling "active writer" conflicts (Codex 0.147+)

Codex applies single-writer protection to each thread's rollout file. If Codex CLI or the Codex desktop app still has a thread open on your computer, NovaScale can read its history but cannot send a new turn until the other writer releases it. When this appears, NovaScale gives you four safe options:

1. Close or exit the session owning the thread on your computer, then tap **Try Again**.
2. Wait for the inactive writer lock to expire (around 30 minutes in Codex 0.147), then retry.
3. Tap **New Session** to start fresh in the same workspace.
4. Tap **Fork Thread** to keep the full conversation history in an independent branch.

## Notifications and maintenance

- **Stay alerted while away:** Configure Local or APNs Remote Push under **More → Codex → Notifications**. See [Notifications](../../notifications/in-app-and-local/).
- **Missing new models after upgrading Codex CLI?** Open the host's maintenance diagnostics inside NovaScale and restart or update the Codex host service so the app-server reloads the latest model list.

For architecture background and protocol details, see [Remote Codex in NovaScale](../../../articles/remote-codex-in-novascale/) and the [Codex FAQ](../../../faq/).


