From cd2da30eb4872d854235718a68f42dc43bfe69c1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 06:12:20 +0000 Subject: [PATCH] Document unauthorized websocket close semantics Co-authored-by: Theo Browne --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8f7fb5038b..85c4cbfd20 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ Runtime command semantics: - Connections with duplicate token query parameters are also rejected to avoid ambiguous auth parsing. - Connections with unexpected query parameters are rejected (auth mode requires only `token`; no-auth mode allows no query params). - WebSocket control connections are accepted only on the root runtime path (`/`) to keep the API surface narrow. +- Unauthorized websocket attempts close with code `4001` and reason `unauthorized`. - Browser renderer talks through a typed `NativeApi` adapter over that WebSocket. - Runtime currently enforces a single active browser client (new client replaces old one). - When replaced by a newer connection, the previous active websocket is closed with code `4000`.