-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
Summary
When spawning a subagent via sessions_spawn from within a Slack assistant app thread (topic session), the announce routes to the base DM session instead of the originating thread. The announce response either gets lost or delivers as a flat DM, never reaching the thread where the user is actively chatting.
Root cause (suspected)
runSubagentAnnounceFlow() in subagent-announce.ts uses the parent session's deliveryContext. For Slack assistant app threads, sessions are split into a base session and topic-specific sessions (-topic-). The spawn originates from the topic session, but the announce resolves to the base session's deliveryContext, which has no threadId — so the response can't route back to the correct Slack thread.
Workaround
Use the message tool to explicitly send results to the thread with the threadId parameter after polling sessions_list for completion. This bypasses the announce system and delivers reliably.
Steps to reproduce
- Configure OpenClaw with Slack channel with Slack's "assistant experience" enabled via api.slack/com/apps/[ID]/app-assistant and toggling on "Agent or Assistant"
- Open a DM with the bot — Slack creates an assistant_app_thread
- From within that thread, have the agent call sessions_spawn(task="...", label="test")
- Wait for subagent to complete
Expected behavior
Announce summary appears in the same assistant thread
Actual behavior
Announce lands in the base DM session (.jsonl), not the topic session (-topic-.jsonl). Response is generated but never delivered to Slack.
OpenClaw version
2026.2.14
Operating system
Ubuntu Linux (AWS EC2)
Install method
npm global
Logs, screenshots, and evidence
N/A
Impact and severity
Given data is lost, namely a message reply to a spawned subagent never gets received by the user, I would consider this high impact and high severity.
Additional information
The subagent docs state: "Announce replies preserve thread/topic routing when available (Slack threads, Telegram topics, Matrix threads)." This works for normal Slack threads but not for Slack assistant app threads, which use a different session topology (base + topic sessions).