@makerbi/remodex 1.3.8 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md DELETED
@@ -1,483 +0,0 @@
1
- <p align="center">
2
- <img src="CodexMobile/CodexMobile/Assets.xcassets/remodex-og1.imageset/remodex-og2%20%281%29.png" alt="Remodex" />
3
- </p>
4
-
5
- # Remodex
6
-
7
- [![npm version](https://img.shields.io/npm/v/remodex)](https://www.npmjs.com/package/remodex)
8
- [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](LICENSE)
9
- [Follow on X](https://x.com/emanueledpt)
10
-
11
- Control [Codex](https://openai.com/index/codex/) from your iPhone. Remodex is a local-first open-source bridge + iOS app that keeps the Codex runtime on your Mac and lets your phone connect through a paired secure session.
12
-
13
- ## Key App Features
14
-
15
- - End-to-end encrypted pairing and chats between your iPhone and Mac
16
- - Fast mode for lower-latency turns
17
- - Plan mode for structured planning before execution
18
- - Subagents from iPhone with the `/subagents` command
19
- - Steer active runs without starting over
20
- - Queue follow-up prompts while a turn is still running
21
- - In-app notifications when turns finish or need attention
22
- - Git actions from your phone, including commit, push, pull, and branch switching
23
- - Reasoning controls to tune how much thinking Codex uses
24
- - Access controls with On-Request or Full access
25
- - Photo attachments from camera or library
26
- - One-time QR bootstrap with trusted Mac reconnects
27
- - macOS-only background bridge service via `launchd`
28
- - Live streaming on your phone while Codex runs on your Mac
29
- - Shared thread history with Codex on your Mac
30
-
31
- The repo stays local-first and self-host friendly: the iOS app source does not embed a public hosted endpoint, and the transport layer remains inspectable for anyone who wants to run their own setup.
32
-
33
- Today, the background daemon / trusted auto-reconnect flow is implemented for macOS. Self-hosted relay setups still work on other OSes, but they currently use the foreground bridge flow instead of the macOS `launchd` service path.
34
-
35
- If you want the public-repo distribution model explained clearly, read [SELF_HOSTING_MODEL.md](SELF_HOSTING_MODEL.md).
36
-
37
- > **I am very early in this project. Expect bugs.**
38
- >
39
- > I am not actively accepting contributions yet. If you still want to help, read [CONTRIBUTING.md](CONTRIBUTING.md) first.
40
-
41
- ## Get the App
42
-
43
- The app is live on the [App Store](https://apps.apple.com/us/app/remodex-remote-ai-coding/id6760243963).
44
-
45
- Build the iOS app from source in Xcode, install your own signed build on-device, then use the in-app onboarding flow to pair by scanning the QR from `remodex up`.
46
-
47
- If you scan the pairing QR with a generic camera or QR reader before installing the app, your device may treat the QR payload as plain text and open a web search instead of pairing.
48
-
49
- ## Architecture
50
-
51
- ```
52
- ┌──────────────┐ Paired session ┌───────────────┐ stdin/stdout ┌─────────────┐
53
- │ Remodex iOS │ ◄────────────────────► │ remodex (Mac) │ ◄──────────────────────► │ codex │
54
- │ app │ WebSocket bridge │ bridge │ JSON-RPC │ app-server │
55
- └──────────────┘ └───────────────┘ └─────────────┘
56
- │ │
57
- │ AppleScript route bounce │ JSONL rollout
58
- ▼ ▼
59
- ┌─────────────┐ ┌─────────────┐
60
- │ Codex.app │ ◄─── reads from ──────── │ ~/.codex/ │
61
- │ (desktop) │ disk on navigate │ sessions │
62
- └─────────────┘ └─────────────┘
63
- ```
64
-
65
- 1. Run `remodex up` on your Mac
66
- 2. On macOS, Remodex installs/starts a lightweight background bridge service and prints a QR for first-time pairing or recovery
67
- 3. Scan the QR once with the Remodex iOS app to trust that Mac
68
- 4. After the first handshake, the iPhone can resolve the Mac's live session through the configured relay and reconnect automatically
69
- 5. Your phone sends instructions to Codex through the bridge and receives responses in real-time
70
- 6. The bridge handles git operations and local session persistence on your Mac
71
- 7. `Codex.app` can read the same thread history from disk, but it is not a true live mirror unless you enable the optional refresh workaround
72
-
73
- ## Repository Structure
74
-
75
- This repo contains the local bridge, the iOS app target, and their tests:
76
-
77
- ```
78
- ├── phodex-bridge/ # Node.js bridge package used by `remodex`
79
- │ ├── bin/ # CLI entrypoints
80
- │ └── src/ # Bridge runtime, git/workspace handlers, refresh helpers
81
- ├── CodexMobile/ # Xcode project root
82
- │ ├── CodexMobile/ # App source target
83
- │ │ ├── Services/ # Connection, sync, incoming-event, git, and persistence logic
84
- │ │ ├── Views/ # SwiftUI screens and timeline/sidebar components
85
- │ │ ├── Models/ # RPC, thread, message, and UI models
86
- │ │ └── Assets.xcassets/ # App icons and UI assets
87
- │ ├── CodexMobileTests/ # Unit tests
88
- │ ├── CodexMobileUITests/ # UI tests
89
- │ └── BuildSupport/ # Info.plist, xcconfig defaults, and local override templates
90
- ```
91
-
92
- ## Prerequisites
93
-
94
- - **Node.js** v18+
95
- - **[Codex CLI](https://github.com/openai/codex)** installed and in your PATH
96
- - **[Codex desktop app](https://openai.com/index/codex/)** (optional — for viewing threads on your Mac)
97
- - **A signed Remodex iOS build** installed on your iPhone or iPad before scanning the pairing QR
98
- - **macOS** (for desktop refresh features — the core bridge works on any OS)
99
- - **Xcode 16+** (only if building the iOS app from source)
100
-
101
- ## Install the Bridge
102
-
103
- <sub>Install from npm with `@latest` so you get the newest bridge fixes.</sub>
104
-
105
- If you plan to use the macOS menu bar companion, `remodex` must be installed globally and available in your login-shell `PATH`.
106
-
107
- ```sh
108
- npm install -g remodex@latest
109
- ```
110
-
111
- To update an existing global install later:
112
-
113
- ```sh
114
- npm install -g remodex@latest
115
- ```
116
-
117
- If you only want to try Remodex, you can install it from npm and run it without cloning this repository.
118
-
119
- ## Quick Start
120
-
121
- Install the bridge, then run:
122
-
123
- ```sh
124
- remodex up
125
- ```
126
-
127
- On first connect, open the Remodex app, follow the onboarding flow, then scan the QR code from inside the app.
128
-
129
- After that first scan:
130
-
131
- - the iPhone saves the Mac as a trusted device
132
- - the Mac bridge keeps its identity locally
133
- - the app tries trusted reconnect automatically on later launches
134
- - the QR remains available as a recovery path if trust changes or the relay cannot resolve the live session
135
-
136
- For now, the daemon-backed trusted reconnect path is macOS-only. If you self-host on Linux or Windows, pairing still works, but the bridge runs in the foreground unless you set up your own OS-specific service wrapper.
137
-
138
- ## Run Locally
139
-
140
- ```sh
141
- git clone https://github.com/Emanuele-web04/remodex.git
142
- cd remodex
143
- ./run-local-remodex.sh
144
- ```
145
-
146
- That launcher starts a local relay, points the bridge at `ws://<your-host>:9000/relay`, and prints the pairing QR for the iPhone app.
147
-
148
- For iPhone self-hosting, the recommended path is Tailscale or another stable private network. Plain LAN pairing over `ws://<lan-ip>` on the same Wi-Fi is still available for local testing, but it can be unreliable on some iOS devices even when the relay and Wi-Fi are healthy.
149
-
150
- Options:
151
-
152
- - `./run-local-remodex.sh --hostname <lan-hostname-or-ip>`
153
- - `./run-local-remodex.sh --bind-host 127.0.0.1 --port 9100`
154
-
155
- If your iPhone is pairing over LAN, use a hostname or IP the phone can actually reach.
156
-
157
- ## Custom Relay Endpoint
158
-
159
- For a full public self-hosting walkthrough, see [`Docs/self-hosting.md`](Docs/self-hosting.md).
160
-
161
- If you want the npm bridge to point at your own setup instead of the package default, override `REMODEX_RELAY` explicitly:
162
-
163
- ```sh
164
- REMODEX_RELAY="ws://localhost:9000/relay" remodex up
165
- ```
166
-
167
- For self-hosted iPhone usage, prefer a relay URL reachable over Tailscale or another stable private network. Treat plain local `ws://192.168.x.x` pairing as best-effort rather than the recommended production path on iOS.
168
-
169
- A common private setup looks like this:
170
-
171
- 1. Run the relay on your Mac, a mini server, or a VPS you control
172
- 2. Put that machine on Tailscale
173
- 3. Set `REMODEX_RELAY` to the Tailscale-reachable `ws://` or `wss://` relay URL
174
- 4. Pair once with QR
175
- 5. Let the iPhone reconnect to the same trusted Mac over that relay later
176
-
177
- If that relay is fronting a Mac bridge, the macOS daemon can keep the bridge alive for hands-free reconnects. If you self-host against a non-macOS bridge, the same relay path still works, but automatic background service management is not built in yet.
178
-
179
- Reverse-proxy subpaths work too, so a hosted relay behind Traefik can live under the same domain as other APIs:
180
-
181
- ```sh
182
- REMODEX_RELAY="wss://api.example.com/remodex/relay" remodex up
183
- ```
184
-
185
- In that setup, the public endpoints can look like this:
186
-
187
- - `wss://api.example.com/remodex/relay`
188
- - `https://api.example.com/remodex/v1/push/session/register-device`
189
- - `https://api.example.com/remodex/v1/push/session/notify-completion`
190
-
191
- Have the proxy strip `/remodex` before forwarding so the relay still receives `/relay/...` and `/v1/push/...`.
192
-
193
- If you point `REMODEX_RELAY` at your own self-hosted relay, managed push stays off unless you also set `REMODEX_PUSH_SERVICE_URL` on the bridge and explicitly enable push on the relay.
194
-
195
- ## Publish to npm
196
-
197
- Published npm packages can embed default private relay settings at pack time via the `prepack` script.
198
-
199
- The current package version is `1.3.4`.
200
-
201
- To publish the bridge with `api.phodex.app` as the default relay:
202
-
203
- ```sh
204
- cd phodex-bridge
205
- npm login
206
- REMODEX_PACKAGE_DEFAULT_RELAY_URL="wss://api.phodex.app/relay" \
207
- npm publish
208
- ```
209
-
210
- After publish, users can still override the packaged default at runtime with `REMODEX_RELAY`.
211
-
212
- You can also run the bridge from source:
213
-
214
- ```sh
215
- cd phodex-bridge
216
- npm install
217
- REMODEX_RELAY="ws://localhost:9000/relay" npm start
218
- ```
219
-
220
- ## Commands
221
-
222
- ### `remodex up`
223
-
224
- Starts Remodex.
225
-
226
- On macOS, `remodex up` is the friendly entrypoint for the background bridge service:
227
-
228
- - Writes the daemon config used by the `launchd` service
229
- - Starts or restarts the background bridge service
230
- - Waits for a pairing payload and prints a QR for first-time trust or recovery
231
- - Keeps the bridge alive even if you close the terminal later
232
-
233
- On non-macOS platforms, `remodex up` runs the bridge in the foreground.
234
-
235
- In both cases the bridge:
236
-
237
- - Spawns `codex app-server` (or connects to an existing endpoint)
238
- - Connects the Mac bridge to the configured relay
239
- - Forwards JSON-RPC messages bidirectionally
240
- - Handles git commands from the phone
241
- - Persists the active thread for later resumption
242
-
243
- ### `remodex start`
244
-
245
- macOS only. Starts the background bridge service without waiting for or printing a QR in the current terminal.
246
- If the service is already loaded, this path refreshes it in place.
247
-
248
- ### `remodex restart`
249
-
250
- macOS only. Explicitly restarts the background bridge service without waiting for or printing a QR in the current terminal.
251
-
252
- ### `remodex stop`
253
-
254
- macOS only. Stops the background bridge service and clears its transient runtime status.
255
-
256
- ### `remodex status`
257
-
258
- macOS only. Prints the current `launchd` / bridge status, including whether the service is loaded and whether a recent pairing payload exists.
259
-
260
- ### `remodex run-service`
261
-
262
- macOS only. Internal service entrypoint used by `launchd`. You normally do not run this manually.
263
-
264
- ### `remodex --version`
265
-
266
- Prints the installed Remodex CLI version.
267
-
268
- ```sh
269
- remodex --version
270
- # => 1.3.4
271
- ```
272
-
273
- ### `remodex reset-pairing`
274
-
275
- Clears the saved bridge pairing state so the next trusted connection requires a fresh QR bootstrap again.
276
- You normally do not need this for corrupted local state anymore: recent Remodex builds auto-repair unreadable pairing files/mirrors on startup.
277
-
278
- ```sh
279
- remodex reset-pairing
280
- # => [remodex] Cleared the saved pairing state. Run `remodex up` to pair again.
281
- ```
282
-
283
- ### `remodex resume`
284
-
285
- Reopens the last active thread in Codex.app on your Mac.
286
-
287
- ```sh
288
- remodex resume
289
- # => [remodex] Opened last active thread: abc-123 (phone)
290
- ```
291
-
292
- ### `remodex watch [threadId]`
293
-
294
- Tails the event log for a thread in real-time.
295
-
296
- ```sh
297
- remodex watch
298
- # => [14:32:01] Phone: "Fix the login bug in auth.ts"
299
- # => [14:32:05] Codex: "I'll look at auth.ts and fix the login..."
300
- # => [14:32:18] Task started
301
- # => [14:33:42] Task complete
302
- ```
303
-
304
- ## Environment Variables
305
-
306
- `REMODEX_RELAY` is optional, but the default depends on how you got Remodex:
307
-
308
- - public GitHub/source checkouts stay open-source and self-host friendly, so they do not ship with a hosted relay baked in
309
- - official published packages may include a default relay at publish time
310
- - if you are running from source, assume you should use `./run-local-remodex.sh` or set `REMODEX_RELAY` yourself
311
-
312
- | Variable | Default | Description |
313
- |----------|---------|-------------|
314
- | `REMODEX_RELAY` | empty in source checkouts; optional in published packages | Session base URL used for QR bootstrap, trusted-session resolve, and phone/Mac session routing |
315
- | `REMODEX_PUSH_SERVICE_URL` | disabled by default | Optional HTTP base URL for managed push registration/completion |
316
- | `REMODEX_CODEX_ENDPOINT` | — | Connect to an existing Codex WebSocket instead of spawning a local `codex app-server` |
317
- | `REMODEX_REFRESH_ENABLED` | `false` | Auto-refresh Codex.app when phone activity is detected (`true` enables it explicitly) |
318
- | `REMODEX_REFRESH_DEBOUNCE_MS` | `1200` | Debounce window (ms) for coalescing refresh events |
319
- | `REMODEX_REFRESH_COMMAND` | — | Custom shell command to run instead of the built-in AppleScript refresh |
320
- | `REMODEX_CODEX_BUNDLE_ID` | `com.openai.codex` | macOS bundle ID of the Codex app |
321
- | `CODEX_HOME` | `~/.codex` | Codex data directory (used here for `sessions/` rollout files) |
322
-
323
- ```sh
324
- # Enable desktop refresh explicitly
325
- REMODEX_REFRESH_ENABLED=true remodex up
326
-
327
- # Connect to an existing Codex instance
328
- REMODEX_CODEX_ENDPOINT=ws://localhost:8080 remodex up
329
-
330
- # Use a custom self-hosted relay endpoint (`ws://` is unencrypted)
331
- REMODEX_RELAY="ws://localhost:9000/relay" remodex up
332
-
333
- # Enable managed push only if your self-hosted relay also exposes a configured APNs push service
334
- REMODEX_RELAY="wss://relay.example/relay" \
335
- REMODEX_PUSH_SERVICE_URL="https://relay.example" \
336
- remodex up
337
- ```
338
-
339
- On the relay/VPS side, keep push disabled until you actually want it. The HTTP push endpoints are off by default and only turn on when you set `REMODEX_ENABLE_PUSH_SERVICE=true`.
340
-
341
- ## Pairing and Safety
342
-
343
- - Remodex is local-first: Codex, git operations, and workspace actions run on your Mac, while the iPhone acts as a paired remote control.
344
- - On iPhone, the most reliable self-host setup is a Tailscale-reachable relay. Plain LAN pairing over `ws://` on the same Wi-Fi can fail on some iOS devices because local-network routing from the app is not always reliable.
345
- - The pairing QR carries the connection URL, the session ID, and the bridge identity key used to bootstrap end-to-end encryption. After a successful first scan, the iPhone stores a trusted Mac record in Keychain and the bridge persists its trusted phone identity locally on the Mac.
346
- - On macOS, the bridge can keep running as a lightweight `launchd` service, so the phone can resolve the Mac's current live relay session and reconnect without scanning a new QR every time.
347
- - The QR is still the recovery path when trust changes, the bridge identity rotates, or the relay cannot resolve the current live session.
348
- - The bridge state lives canonically in `~/.remodex/device-state.json` with local-only permissions. On macOS the bridge also mirrors that state to Keychain as best-effort backup/migration data, and recent builds auto-repair unreadable local state on startup instead of requiring manual cleanup.
349
- - The CLI no longer prints the connection URL in plain text below the QR.
350
- - Set `REMODEX_RELAY` only when you want to self-host or test locally against your own setup.
351
- - Leave `REMODEX_TRUST_PROXY` unset for direct/self-hosted installs. Turn it on only when a trusted reverse proxy such as Traefik, Nginx, or Caddy is forwarding the relay traffic.
352
- - The transport implementation is public in [`relay/`](relay/), but your real deployed hostname and credentials should stay private.
353
- - On the iPhone, the default agent permission mode is `On-Request`. Switching the app to `Full access` auto-approves runtime approval prompts from the agent.
354
-
355
- ## Security and Privacy
356
-
357
- Remodex now uses an authenticated end-to-end encrypted channel between the paired iPhone and the bridge running on your Mac. The transport layer still carries the WebSocket traffic, but it does not get the plaintext contents of prompts, tool calls, Codex responses, git output, or workspace RPC payloads once the secure session is established.
358
-
359
- The secure channel is built in these steps:
360
-
361
- 1. The bridge generates and persists a long-term device identity keypair on the Mac.
362
- 2. The pairing QR shares the connection URL, session ID, bridge device ID, bridge identity public key, and a short expiry window.
363
- 3. During pairing, the iPhone and bridge exchange fresh X25519 ephemeral keys and nonces.
364
- 4. The bridge signs the handshake transcript with its Ed25519 identity key, and the iPhone verifies that signature against the public key from the QR code or the previously trusted Mac record.
365
- 5. The iPhone signs a client-auth transcript with its own Ed25519 identity key, and the bridge verifies that before accepting the session.
366
- 6. Both sides derive directional AES-256-GCM keys with HKDF-SHA256 and then wrap application messages in encrypted envelopes with monotonic counters for replay protection.
367
-
368
- Privacy notes:
369
-
370
- - The transport layer can still see connection metadata and the plaintext secure control messages used to set up the encrypted session, including session IDs, device IDs, public keys, nonces, and handshake result codes.
371
- - The transport layer does not see decrypted application payloads after the secure handshake succeeds.
372
- - A fresh QR scan can replace the previously trusted iPhone automatically. Use `remodex reset-pairing` only when you intentionally want to wipe the remembered pairing state yourself.
373
- - On-device message history is also encrypted at rest on iPhone using a Keychain-backed AES key.
374
-
375
- ## Git Integration
376
-
377
- The bridge intercepts `git/*` JSON-RPC calls from the phone and executes them locally:
378
-
379
- | Command | Description |
380
- |---------|-------------|
381
- | `git/status` | Branch, tracking info, dirty state, file list, and diff |
382
- | `git/commit` | Commit staged changes with an optional message |
383
- | `git/push` | Push to remote |
384
- | `git/pull` | Pull from remote (auto-aborts on conflict) |
385
- | `git/branches` | List all branches with current/default markers |
386
- | `git/checkout` | Switch branches |
387
- | `git/createBranch` | Create and switch to a new branch |
388
- | `git/log` | Recent commit history |
389
- | `git/stash` | Stash working changes |
390
- | `git/stashPop` | Pop the latest stash |
391
- | `git/resetToRemote` | Hard reset to remote (requires confirmation) |
392
- | `git/remoteUrl` | Get the remote URL and owner/repo |
393
-
394
- ## Workspace Integration
395
-
396
- The bridge also handles local workspace-scoped revert operations for the assistant revert flow:
397
-
398
- | Command | Description |
399
- |---------|-------------|
400
- | `workspace/revertPatchPreview` | Checks whether a reverse patch can be applied cleanly in the local repo |
401
- | `workspace/revertPatchApply` | Applies the reverse patch locally when the preview succeeds |
402
-
403
- ## Codex Desktop App Integration
404
-
405
- Remodex works with both the Codex CLI and the Codex desktop app (`Codex.app`). Under the hood, the bridge spawns a `codex app-server` process — the same JSON-RPC interface that powers the desktop app and IDE extensions. Conversations are persisted as JSONL rollout files under `~/.codex/sessions`, so threads started from your phone show up in the desktop app too.
406
-
407
- What is live today:
408
-
409
- - The iPhone conversation is live while the bridge session is connected.
410
- - The Mac-side Codex runtime is the real runtime doing the work.
411
-
412
- What is not fully live today:
413
-
414
- - `Codex.app` does not act like a second live subscriber to the active run by default.
415
- - The desktop app catches up from the persisted session files and can be nudged with the optional refresh workaround below.
416
- - True phone-to-desktop live sync in the `Codex.app` GUI is not supported today.
417
-
418
- To make that limitation more practical, Remodex also includes a hand-off button in the iPhone app. It lets you explicitly continue the current chat on your Mac by opening the matching thread in `Codex.app` when you are ready to switch devices.
419
-
420
- **Known limitation**: The Codex desktop app does not live-reload when an external `app-server` process writes new data to disk. Threads created or updated from your phone won't appear in the desktop app until it remounts that route. Remodex keeps desktop refresh off by default for now because the current deep-link bounce is still disruptive. You can still enable it manually if you want the old remount workaround.
421
-
422
- ```sh
423
- # Enable the old deep-link refresh workaround manually
424
- REMODEX_REFRESH_ENABLED=true remodex up
425
- ```
426
-
427
- This triggers a debounced deep-link bounce (`codex://settings` → `codex://threads/<id>`) that forces the desktop app to remount the current thread without interrupting any running tasks. While a turn is running, Remodex also watches the persisted rollout for that thread and issues occasional throttled refreshes so long responses become visible on Mac without a full app relaunch. If the local desktop path is unavailable, the bridge self-disables desktop refresh for the rest of that run instead of retrying noisily forever.
428
-
429
- ## Connection Resilience
430
-
431
- - **Auto-reconnect**: If the session connection drops, the bridge reconnects with exponential backoff (1 s → 5 s max)
432
- - **Secure catch-up**: The bridge keeps a bounded local outbound buffer and re-sends missed encrypted messages after a secure reconnect
433
- - **Codex persistence**: The Codex process stays alive across transient session reconnects during the current bridge run
434
- - **Graceful shutdown**: SIGINT/SIGTERM cleanly close all connections
435
-
436
- ## Building the iOS App
437
-
438
- ```sh
439
- cd CodexMobile
440
- open CodexMobile.xcodeproj
441
- ```
442
-
443
- Build and run on a physical device or simulator with Xcode. The app uses SwiftUI and the current project target is iOS 18.6.
444
-
445
- ## Contributing
446
-
447
- I'm not actively accepting contributions yet. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
448
-
449
- ## FAQ
450
-
451
- **Do I need an OpenAI API key?**
452
- Not for Remodex itself. You need Codex CLI set up and working independently.
453
-
454
- **Does this work on Linux/Windows?**
455
- The core bridge client (Codex forwarding + git) works on any OS. Desktop refresh (AppleScript) is macOS-only, and the built-in daemon / trusted auto-reconnect service path is currently macOS-only too.
456
-
457
- **What happens if I close the terminal?**
458
- On macOS, the bridge can keep running in the background through `launchd`, so closing the terminal does not stop the trusted reconnect path. On other OSes, the foreground bridge stops when the terminal stops.
459
-
460
- **How do I force a fresh QR pairing?**
461
- Run `remodex reset-pairing`, then start the bridge again with `remodex up`. You should only need this when you intentionally want to replace the paired iPhone or wipe the remembered pairing.
462
-
463
- **Can I connect to a remote Codex instance?**
464
- Yes — set `REMODEX_CODEX_ENDPOINT=ws://host:port` to skip spawning a local `codex app-server`.
465
-
466
- **Why don't my phone threads show up in the Codex desktop app immediately?**
467
- The desktop app reads session data from disk (`~/.codex/sessions`) but doesn't live-reload when an external process writes new data. Your phone still gets the live stream; it is the desktop GUI that lags unless you explicitly enable the refresh workaround with `REMODEX_REFRESH_ENABLED=true`.
468
-
469
- **Does Remodex support true live sync between phone and `Codex.app`?**
470
- No. The phone session is live, but the `Codex.app` GUI is not a true live mirror of the active run. To help with that, the iPhone app includes a `Hand off to Mac app` button so you can explicitly continue the same thread on your Mac.
471
-
472
- **Can I self-host the relay?**
473
- Yes. That is the intended forking path. The transport and push-service code are in [`relay/`](relay/); point `REMODEX_RELAY` at the instance you run.
474
-
475
- **Can I use Tailscale?**
476
- Yes. It is the recommended private-network option for self-hosting on iPhone. Run your relay somewhere reachable over Tailscale, set `REMODEX_RELAY` to that relay URL, pair once with QR, then let the app reconnect to the trusted Mac through the same relay.
477
-
478
- **Is the transport layer safe for sensitive work?**
479
- It is much stronger than a plain text proxy: traffic can be protected in transit with TLS, application payloads are end-to-end encrypted after the secure handshake, and all Codex execution still happens on your Mac. The transport can still observe connection metadata and handshake control messages, so the tightest trust model is to run it yourself.
480
-
481
- ## License
482
-
483
- [ISC](LICENSE)