#How do I merge a discord channel and its thread?
1 messages · Page 1 of 1 (latest)
Discord treats a thread as a different channel/peer than its parent channel, and OpenClaw follows that: the parent channel and the thread get different session keys (threads append :thread:<threadId>), so they’ll show up as separate conversations and can even route to different agents.
Docs: https://docs.openclaw.ai/channels/channel-routing (session keys + thread inheritance), https://docs.openclaw.ai/channels/discord (thread behavior, thread bindings)
If your goal is “use the same agent in the channel + its thread”
You don’t “merge” them — you make routing deterministic:
- Bind the parent channel to the agent you want (so the parent is no longer using
main). Example:
{
bindings: [
{
agentId: "theAgentIWant",
match: {
channel: "discord",
peer: { kind: "channel", id: "PARENT_CHANNEL_ID" },
},
},
],
}
Because routing checks parentPeer match (thread inheritance), the thread will then follow the parent channel’s agent unless you’ve explicitly overridden the thread.
- If the thread was manually “focused” to something else, undo it inside the thread:
- run
/agents(shows what the thread is bound to) - run
/unfocus(returns the thread to normal routing/inheritance)
If your goal is “same context/history for both”
OpenClaw still stores threads separately by default (different session keys). The closest behavior is using thread bindings (/focus) to route the thread to a specific session/subagent target, but that’s not a literal merge of the underlying stored sessions.
If you paste the output of /status in the parent channel and in the thread, I can tell you exactly whether you’re dealing with (a) a routing/binding issue, or (b) a /focus thread-binding override.
Parent status:
OpenclawBot
APP
— 2:50 PMThursday, February 26, 2026 at 2:50 PM
OpenClaw 2026.2.25 (4b5d4a4)
Model: minimax/MiniMax-M2.5 · api-key sk-cp-…E8UUDM (minimax:default)
Tokens: 94k in / 256 out · Cost: $1.43
Cache: 9% hit · 21k cached, 109k new
Context: 112k/200k (56%) · Compactions: 0
Session: agent:main:discord:channel:1476073500430041252 • updated just now
Runtime: direct · Think: low
Activation: mention · Queue: collect (depth 0)
Thread status:
OpenClaw 2026.2.25 (4b5d4a4)
Model: anthropic/claude-sonnet-4-20250514 · api-key sk-ant…QU5gAA (anthropic:default)
Tokens: 2 in / 503 out · Cost: $0.0076
Cache: 96% hit · 80k cached, 3.8k new
Context: 43k/200k (22%) · Compactions: 0
Session: agent:workerbee:subagent:eebf1405-3d1e-4788-9801-1836ec78c34b • updated just now
Runtime: direct · Think: off
Activation: mention · Queue: collect (depth 0)
You can’t literally “merge” a Discord channel session and its thread session in OpenClaw — threads are modeled as a separate session key (channel + :thread:<id>), so they’ll always be distinct buckets of history.
What is happening in your case:
- Parent channel is routed to the main agent:
Session: agent:main:discord:channel:… - Thread is not just “another agent” — it’s a focused/bound sub-agent session inside
workerbee:
Session: agent:workerbee:subagent:<uuid>
That subagent: shape is the giveaway: the thread has been /focus’d (directly or indirectly via spawning a thread-bound subagent).
To make the parent channel and the thread use the same agent
Do these two things:
- In the thread: run
/unfocus
Then run/agentsto confirm there’s no active binding anymore.
- Bind the parent channel to
workerbee(so new messages in the parent route to that agent, and threads will inherit the parent agent unless focused again). In~/.openclaw/openclaw.json:
{
bindings: [
{
agentId: "workerbee",
match: {
channel: "discord",
peer: { kind: "channel", id: "PARENT_CHANNEL_ID" },
},
},
],
}
Then openclaw gateway restart.
Two quick checks (because I see an ID mismatch)
- Your inbound metadata says the channel is
1476696820754288681, but your parent/statusshowsdiscord:channel:1476073500430041252. - Make sure you ran
/statusin the exact parent channel you want to re-route (or right-click the channel → Copy Channel ID).
If you paste openclaw agents list --bindings (or just the bindings: block from your config), I can tell you exactly where to insert the rule so it wins (ordering matters: “most specific wins”, and within the same tier, first match wins).
bindings: [
{
agentId: "workerbee",
match: {
channel: "discord",
peer: { kind: "channel", id: "1476651790366802053" },
},
},
],
That binding is the right shape, it’s just pointing at the wrong channel id.
Right now your /status in the parent channel is:
Session: agent:main:discord:channel:...
So OpenClaw isn’t matching your binding, and it falls back to main.
Fix: bind the actual parent channel id
Your current binding uses:
id: "1476651790366802053"
…but your thread/channel context here shows the channel id as:
1476696820754288681
So update it to:
bindings: [
{
agentId: "workerbee",
match: {
channel: "discord",
peer: { kind: "channel", id: "1476696820754288681" },
},
},
],
Then restart the gateway (openclaw gateway restart) and run /status again in the parent channel — it should show agent:workerbee:discord:channel:....
Also: your thread is “focused” to a subagent
Your thread status shows:
Session: agent:workerbee:subagent:...
That means the thread is currently bound via /focus (or was spawned as a thread-bound subagent). If you want the thread to behave like a normal thread under the same agent as the parent channel, run in the thread:
/unfocus
After the parent channel is bound to workerbee, the thread will route to workerbee as well (but it’ll still be a separate thread session key — same agent, separate history bucket).
If you want, paste the parent channel’s /status again after the restart and I’ll sanity-check that the binding is taking effect.
fixed. Thanks!