Skip to content

Sync protocol

Sync carries terminal state between a host and its clients. The host owns the shell, terminal model and workspace tree; clients render replicas and send input and view changes. It is a framed byte-stream protocol, independent of SSH, QUIC, a local socket or a WebSocket bridge.

  • Screen: checkpoints establish a replica; updates name their base and replace changed state. A client acknowledges the state it has applied.
  • History: scrollback has stable line identities and is transferred separately from the live screen. A client can request the depth it needs.
  • Pane metadata: titles, working-directory information, progress and program status belong to the pane rather than the transport.
  • Input: numbered events and receipts distinguish accepted input from displayed output. Paste has its own bounded flow.
  • Reconnect: retained replica state can resume from changes. A checkpoint provides a new base when retained state cannot be used.

The host’s authority does not change when a client resizes, reconnects or moves between views. Connection identity, pane handles and generations prevent a stale message from targeting a different session.

Authentication, scopes and person consent are separate checks. A URI, title, agent label or client-declared display name is not proof of authority. Control clients do not gain permission to read a screen merely by connecting, and a client cannot approve its own request.

Bulk state is bounded and scheduled separately from interactive control and input. Image payloads are decoded data, not instructions to read a path on the receiving computer. Rendering support differs by client.

The Sync specification defines identities, wire records, state transitions, limits and rejection behavior. The carrier reference documents the host-facing frames. Use the constants generated from the headers in the same checkout as your host; do not copy version numbers from this overview.

The Emacs and Neovim clients show protocol readers without a native Core dependency. Their platform pages describe their rendering and reconnect limits.

The specification and selected declaration headers are Apache-2.0 alone; the engine has a different licence. See Licence.