From 0b9b9d430167fb171131aeb63ab09b979bb9676e Mon Sep 17 00:00:00 2001 From: Onur <2453968+osolmaz@users.noreply.github.com> Date: Sun, 22 Feb 2026 14:31:16 +0100 Subject: [PATCH] docs: make subagents thread guidance channel-first --- docs/tools/subagents.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/tools/subagents.md b/docs/tools/subagents.md index 5c2549e4426..d3d5532b7ef 100644 --- a/docs/tools/subagents.md +++ b/docs/tools/subagents.md @@ -23,7 +23,9 @@ Use `/subagents` to inspect or control sub-agent runs for the **current session* - `/subagents steer ` - `/subagents spawn [--model ] [--thinking ]` -Discord thread binding controls: +Thread binding controls: + +These commands work on channels that implement thread bindings. Current support is Discord. - `/focus ` - `/unfocus` @@ -85,14 +87,18 @@ Tool params: - `mode: "session"` requires `thread: true` - `cleanup?` (`delete|keep`, default `keep`) -## Discord thread-bound sessions +## Thread-bound sessions -When thread bindings are enabled, a sub-agent can stay bound to a Discord thread so follow-up user messages in that thread keep routing to the same sub-agent session. +When thread bindings are enabled for a channel, a sub-agent can stay bound to a thread so follow-up user messages in that thread keep routing to the same sub-agent session. + +Current implementation: + +- Discord supports persistent thread-bound subagent sessions. Quick flow: 1. Spawn with `sessions_spawn` using `thread: true` (and optionally `mode: "session"`). -2. OpenClaw creates or binds a Discord thread to that session target. +2. OpenClaw creates or binds a thread to that session target in the active channel. 3. Replies and follow-up messages in that thread route to the bound session. 4. Use `/session ttl` to inspect/update auto-unfocus TTL. 5. Use `/unfocus` to detach manually. @@ -100,17 +106,17 @@ Quick flow: Manual controls: - `/focus ` binds the current thread (or creates one) to a sub-agent/session target. -- `/unfocus` removes the binding for the current Discord thread. +- `/unfocus` removes the binding for the current bound thread. - `/agents` lists active runs and binding state (`thread:` or `unbound`). -- `/session ttl` only works for focused Discord threads. +- `/session ttl` only works for focused bound threads. Config switches: - Global default: `session.threadBindings.enabled`, `session.threadBindings.ttlHours` -- Discord override: `channels.discord.threadBindings.enabled`, `channels.discord.threadBindings.ttlHours` -- Spawn auto-bind opt-in: `channels.discord.threadBindings.spawnSubagentSessions` +- Channel override (Discord today): `channels.discord.threadBindings.enabled`, `channels.discord.threadBindings.ttlHours` +- Spawn auto-bind opt-in (Discord today): `channels.discord.threadBindings.spawnSubagentSessions` -See [Discord](/channels/discord), [Configuration Reference](/gateway/configuration-reference), and [Slash commands](/tools/slash-commands). +See [Configuration Reference](/gateway/configuration-reference), [Slash commands](/tools/slash-commands), and [Discord](/channels/discord) for current adapter details. Allowlist: