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
| CONNECT | Authenticate and start or resume a session |
| INPUT | Send the next user prompt |
| APPROVAL_RESPONSE | Answer the current tool approval |
| mode_change | Request a Host permission profile |
| INTERRUPT | Cooperatively stop the active turn |
| OUTPUT | Complete a turn and keep the session alive |
| plan | Replace the complete observational plan |
| provider_invocation | Group native Codex or Claude Code activity |
ConnectOnion