Skip to main content

Operations

On an HTTP route, path parameters replace sessionId, turnId, askId and subagentId. A GET takes the other fields as query parameters, other verbs as a JSON body. Unknown fields are refused with invalid_request. Creating a session is HTTP only: POST /sessions with CreateSessionBody: id?, input?, title? (up to 200 characters), model?, effort?, speed?, mode?, metadata?.

Routes outside the schema

The relay (computer/src/wire/) serves these. The API routes for workspace files are /sessions/{id}/workspace/files, /file and /archive; opc push and opc pull call /archive. See Files.

WebSocket notifications

Server to client: Client to server:

Events

Envelope: A client must ignore event types it does not know (Event.other: any other type, open data).

Deltas

Sent only on a WebSocket attached with deltas: true; see Events. Each has type, sessionId, turnId and data.

Objects

Result is what opc -p --output-format json prints for a turn. No operation reads or writes Secret.

Errors

An error body is code, message, and optionally status, retryable, requestId, field, reason and retryAfterMs. HTTP wraps it as {"error": {...}}; WebSocket sends it as the data of a JSON-RPC error. forbidden carries a reason: missing_scope, read_only or terminal_owner_only.

Relay limits

Other limits are in Limits and defaults.

WebSocket close codes