Remote connection model
The remote model separates “which Host this is” from “which network path reaches it right now”. Clients identify a Host by Host identity. When LAN, Tailscale, or a reverse-proxy name changes, the profile still names the same machine.
Pairing invitation
The Host console presents a pairing invitation that includes:
- Host identity
- Device permission preset (workstation or companion)
- Currently available reachability origins (loopback omitted)
- A secret that lasts about five minutes and can be redeemed once
Long-lived device credentials go in the system keychain or Android Keystore. The invitation, QR, and URL carry only the one-time secret. An unpaired device redeems the secret for a durable credential. A device that already paired only merges reachability when it scans again. After the secret expires, a newly presented invitation can still supply origins. Browser WebUI uses workstation pairing.
A pairing relation is one client identity under the same Server owner. P0/P1 treat devices as that owner’s clients. Team members and multi-tenant isolation are out of this model. Disconnect, app restart, network change, or admin-token rotation leave the pairing in place.
Server-bound window
One application window binds one Server Profile. Projects, conversations, agents, and settings in that window all come from that Host. Another profile uses another window.
The remote coding loop covers: pick project and workspace, run an agent, handle permissions, edit files, review diffs, Git, and terminal. Desktop-only operations (Host console) hide when the capability bit is absent.
Disconnect, forget, revoke
Disconnect closes the current network link and keeps profile, cache, credentials, and pairing. Closing the window, quitting the app, and a network drop are disconnect.
Forget server deletes the local profile, read-only cache, and system credentials. When the Host is reachable, the client first asks to revoke this device.
Revoke device ends that device’s long-term trust on the Host. Existing connections and later requests fail immediately. Main token and device token are forbidden in URLs, events, and logs. Admin-token rotation keeps paired devices.
Related terms
- Server owner: the single principal with final authority over one data directory and its paired devices.
- Server profile: the client’s local identity for one Host, keyed by Host identity.
- Reachability: one origin that finds the same Host.
- Paired device: a client identity holding a long-lived, revocable device credential. Device and User are different objects.
- Durable attach: the subscription contract keyed by conversation sequence.

