NetworkWebSocket Protocol
DocsNetworkOIP WebSocket Protocol

OIP WebSocket Protocol

One authenticated browser connection for onboarding, sessions, prompts, approvals, modes, plans, and provider activity.

Connect

The client signs CONNECT. After trust checks, the Host returns the exact protocol descriptor and authoritative permission profiles.

{
  "type": "CONNECTED",
  "session_id": "550e8400-...",
  "status": "new",
  "protocol": {
    "name": "oip",
    "version": "0.1",
    "min_version": "0.1",
    "max_version": "0.1",
    "websocket_path": "/ws"
  },
  "session_modes": {
    "currentModeId": ":read-only",
    "availableModes": [
      {"id": ":read-only", "name": "Read only"},
      {"id": ":workspace", "name": "Auto"}
    ]
  }
}

Rolling compatibility

The Host publishes the same bounded descriptor from public /info with Cache-Control: no-store, and React sends its descriptor in CONNECT. A descriptor-less stable peer is treated as legacy OIP 0.1 during the 1.7 preview train.

Unknown additive non-authoritative events are ignored. An advertised incompatible version becomes one typed, non-retryable error and the socket closes, so the UI gives a refresh or upgrade action instead of entering a reconnect loop.

Core frames

CONNECTAuthenticate and start or resume a session
INPUTSend the next user prompt
APPROVAL_RESPONSEAnswer the current tool approval
mode_changeRequest a Host permission profile
INTERRUPTCooperatively stop the active turn
OUTPUTComplete a turn and keep the session alive
planReplace the complete observational plan
provider_invocationGroup native Codex or Claude Code activity

Star us on GitHub

If ConnectOnion saves you time, a ⭐ goes a long way — and earns you a coffee chat with our founder.