OpenClaw Discord threads and sessions
Forum posts, history limits, how threads inherit a parent channel, thread bindings for sub-agents, and persistent ACP channel bindings
Discord has more shapes of conversation than most channels: text channels, threads, forum and media channels that only accept posts, and DMs. OpenClaw maps each onto a session with a small set of rules, and adds two binding mechanisms so a thread or a channel can stay attached to one session, including a sub-agent’s or an ACP agent’s. Here are forums, the history and inheritance rules, thread bindings, and persistent ACP bindings.
Forums and history
- Forum and media channels only accept thread posts, and there are two ways to create one: send a message to the forum parent, which auto-creates a thread titled by the first non-empty line truncated to Discord’s hundred-character limit, or create the thread explicitly with the thread-create command and a name, without a message id for forum channels.
- Forum parents do not accept Discord components; a message that needs buttons or selects goes to the thread itself.
- Guild history context defaults to twenty messages, falls back to the global group-chat limit and is disabled by zero; DM history has its own limit and a per-user override.
- Threads route as channel sessions and inherit the parent channel’s config unless overridden; they inherit the parent’s session-level model selection as a model-only fallback while thread-local selections take precedence, and the parent transcript is not copied unless the inherit-parent thread setting, off by default and overridable per account, opts new auto-threads into seeding from it.
Channel topics are injected as untrusted context. Allowlists gate who can trigger the agent, not a full supplemental-context redaction boundary.
Thread bindings
Discord can bind a thread to a session target so that follow-up messages in that thread keep routing to the same session, including sub-agent sessions. Four commands manage it: unbind removes the current thread binding without closing its agent session, the agents command shows active runs and binding state, and idle and max-age inspect or update the inactivity expiry and hard maximum age for the current binding. The policy lives under the session thread-bindings config, canonical for Discord and Telegram: an enabled flag, idle hours defaulting to twenty-four, a maximum age in hours where zero means none, a spawn-sessions flag that controls automatic thread creation and binding for sub-agent spawns with the thread option and for ACP thread spawns, on by default, and a default spawn context of fork for thread-bound spawns. Deprecated per-kind spawn keys are migrated by the doctor fix, and when thread bindings are disabled, thread-bound spawns are unavailable. Message-tool reactions can resolve user DM targets, and a channel’s explicit no-mention-required setting is preserved during reply-stage activation fallback.
Persistent ACP bindings
- For stable always-on ACP workspaces, top-level typed bindings target Discord conversations: an agent entry with an ACP runtime naming the agent, backend, persistent mode and working directory, and a binding of type ACP matching the channel, account and a peer channel id with a label; the matched channel should have its mention requirement off.
- The ACP spawn command with a bind-here flag binds the current channel or thread in place and keeps future messages on the same ACP session, thread messages inherit the parent channel binding, and in a bound channel or thread the new-session and reset commands reset the same ACP session in place, while temporary thread bindings can override target resolution while active.
- The spawn-sessions flag also gates child thread creation and binding through the thread option of the spawn command, with auto or here as its values.
OpenClaw on Discord is the channel these shapes belong to, and OpenClaw sessions the keys and resets the bindings operate on.
Why bindings matter
Without a binding, a thread is just another channel session; with one, it becomes a durable handle on a sub-agent or an external coding agent, and the idle and max-age controls decide how long that handle lives. OpenClaw sub-agents explains the spawns that get their own threads, and OpenClaw channel routing the ordering that places a thread under its parent before any binding applies.
On Diali
On Diali a Discord thread maps to its own session on the assistant exactly as upstream, forum posts are created by sending to the forum parent, and the thread-binding policy applies to sub-agent spawns with the same defaults. Hosted OpenClaw on Diali is the assistant and OpenClaw doctor the command that migrates the deprecated spawn keys.
- Send to the forum parent; the first line is the title.
- Threads inherit config and model, not transcript.
- Bind a thread to keep it on one session.
Stop reading about it, build one
Set up an agent, pick a channel, and have it working inside the app you already keep open.
