From 503a56853ac70831725d312e43b042565e92f998 Mon Sep 17 00:00:00 2001 From: iris Date: Mon, 16 Nov 2026 02:26:26 +0100 Subject: [PATCH] docs: the swarm UI reference on /clear and the new-session route --- docs/4-implementation/web-ui/swarm-ui.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/4-implementation/web-ui/swarm-ui.md b/docs/4-implementation/web-ui/swarm-ui.md index 6c61ae04f..43c5d4427 100644 --- a/docs/4-implementation/web-ui/swarm-ui.md +++ b/docs/4-implementation/web-ui/swarm-ui.md @@ -108,7 +108,9 @@ An opened card has six sections, and each reads nothing until you open it. link), and its open config PR. - **terminal**: the live terminal with its message box. Typing `/` opens a menu filled from `GET /api/agents//commands`, which lists the swarm's own - commands and the skills the agent published. + commands and the skills the agent published. Sending exactly `/clear` isn't a + message: the box POSTs `/api/agents//new-session` instead of `/input` (see + the command paragraph below). - **open todos**: the agent's open todos from `GET /api/agents//todos`, newest first, each with its subsystem, one line of text and how long ago it changed. Read only; refetched every ten seconds. - **subagents**: the agent's subagents and their terminal preview (next section). @@ -561,6 +563,15 @@ Unlike input, the harness answers a command, so swarm-controller returns that answer as 200, 503 for no subscriber, and 504 when the harness held the command and didn't answer within ten seconds. A 504 means unknown, not cancelled. +`POST /api/agents//new-session` is the second command, sent for `/clear` in +the message box. It sends `"new_session"` on the same subject, and the harness +queues the session reset its own page's button queues, which takes effect at the +agent's next turn; it always answers `{acted: true}`. The statuses are the cancel +route's, and a 504 means it's unknown whether the command took effect. The box +sends a command only when the served command list has `/clear` as a swarm +command: while the list hasn't loaded, or its request fails, `/clear` goes out +as a plain message. +
Where the subagent list and rows come from