From 9b1950906616dbf8c5f9fbd6ab3a99644905226e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20H=C3=A9ritier?= Date: Thu, 23 Jul 2026 04:03:16 +0000 Subject: [PATCH 1/2] docs: update slash command docs to cover HTTP API agent-switching (refs #3782) --- docs/configuration/commands/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/commands/index.md b/docs/configuration/commands/index.md index 51eeea3c6..1b621b1f1 100644 --- a/docs/configuration/commands/index.md +++ b/docs/configuration/commands/index.md @@ -26,7 +26,7 @@ Commands come in three shapes: > [!IMPORTANT] > **Behavior differs by frontend** > -> `url` and `agent` are only fully honored in the **full TUI**, which checks `url` before `agent` (a URL command opens the browser and stops there; an agent-switching command switches before sending any instruction). The **lean TUI** doesn't special-case either field — it only resolves a command's expanded text and sends it as a chat message, so a URL-only command silently sends whatever trailing text followed the slash (often nothing, opening no browser) and an agent-switching command sends its instruction to the *current* agent instead of the target. The **CLI** (`docker agent run agent.yaml /command`) switches agents like the full TUI, but has no browser to open, so `url` has no effect there. +> `url` and `agent` are only fully honored in the **full TUI**, which checks `url` before `agent` (a URL command opens the browser and stops there; an agent-switching command switches before sending any instruction). The **lean TUI** doesn't special-case either field — it only resolves a command's expanded text and sends it as a chat message, so a URL-only command silently sends whatever trailing text followed the slash (often nothing, opening no browser) and an agent-switching command sends its instruction to the *current* agent instead of the target. The **CLI** (`docker agent run agent.yaml /command`) switches agents like the full TUI, but has no browser to open, so `url` has no effect there. The **HTTP API** (`POST /api/sessions/:id/agent/:agent`) resolves agent-switching commands server-side: if the message content starts with a slash command whose `agent` field is set, the active agent is switched and the message is rewritten before the turn runs. Prompt-only and URL commands are not resolved server-side and pass through to the model unchanged. ## Prompt Commands From 88cfb5166af49f5b34b356735f92d1f8471d18e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20H=C3=A9ritier?= Date: Thu, 23 Jul 2026 04:03:41 +0000 Subject: [PATCH 2/2] docs: document URL-value argument matching in permissions patterns (refs #3767) --- docs/configuration/permissions/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/configuration/permissions/index.md b/docs/configuration/permissions/index.md index 4c645e7d2..238ee8678 100644 --- a/docs/configuration/permissions/index.md +++ b/docs/configuration/permissions/index.md @@ -130,6 +130,12 @@ permissions: - "write_file:path=/usr/*" ``` +> [!NOTE] +> **Colons inside argument values are preserved.** Only the `:key=` token boundaries between +> argument conditions split a pattern — colons that appear inside a value are treated as +> ordinary characters and do not start a new condition. Check a tool’s actual argument names +> (and whether they accept a string or a list) before writing an argument-matching pattern. + ### Multiple Argument Conditions Chain multiple argument conditions with colons. All conditions must match: