Architecture

Architecture map for the FlyDex control plane

The FlyDex architecture is intentionally split so the remote browser never has to talk directly to the local Codex app server. That separation is what keeps the runtime local while still making it reachable for operational control.

Reference map

Public docs sections

Authentication

Account auth, QR claims, local-connect tokens, and machine continuity.

Agent control

Thread access, send/resume turns, and remote approvals.

WebSocket API

Bridge lifecycle, documented endpoints, and status model.

Security

Threat model, data boundaries, and transport safeguards.

Architecture

Control plane, connector, and local Codex runtime topology.

Component map

Primary system surfaces

ComponentResponsibility
apps/webPublic landing page, auth continuity, QR handoff, machine detection, thread views, and approval UI.
apps/apiCloudflare worker control plane for pairing, routing, machine registry, local-connect lifecycle, and privacy-scrubbed audit export.
packages/local-connector-coreShared helper runtime for the desktop connector and localhost API.
Local Codex runtimeThe coding agent stays on the operator's own Mac or Windows PC.
Phone / Browser threads, prompts, approvals FlyDex Control Plane auth, pairing, routing, audit short-lived claims + machine scope TLS + authenticated relay Local Connector localhost only 127.0.0.1:48163 /v1/health and /v1/connect Codex local runtime QR claim + account auth relay session local IPC

Lifecycle

Why readiness matters more than login

A signed-in browser session is not enough to open the workspace. The machine is considered ready only once the browser handoff, connector session, and local Codex runtime all converge on codex_ready.

Desktop page open
-> localhost health probe
-> phone completes auth
-> local-connect starts
-> connector reports status
-> codex_ready
-> workspace unlocks