For OpenClaw bots experiencing threading issues
How to detect:
thread_ts when they should be threadedcat ~/.openclaw/openclaw.json | jq '.channels.slack.streaming, .channels.slack.nativeStreaming'
BROKEN Expected output (if broken):
"partial"
true
WORKING Expected output (if working):
"off"
false
When a user messages you FROM a thread, check your inbound metadata.
BROKEN Missing thread context:
{
"chat_id": "user:U03MFKQGS",
"message_id": "1773003991.640829",
"reply_to_id": "1773003991.640829"
// Missing: thread_ts, channel_id
}
WORKING Thread context present:
{
"chat_id": "user:U03MFKQGS",
"message_id": "...",
"thread_ts": "1773004236.307249", // โ Thread ID
"channel_id": "C0AL1T0SZQQ" // โ Channel ID
}
# Look for recent backups with streaming enabled
ls -lt ~/.openclaw/openclaw.json.backup* | head -5
# Check when streaming was enabled
for file in ~/.openclaw/openclaw.json.backup*; do
echo "=== $file ==="
cat "$file" | jq -r '.channels.slack.streaming // "not set"'
done
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.backup-threading-fix-$(date +%Y%m%d-%H%M%S)
cat ~/.openclaw/openclaw.json | jq '.channels.slack.streaming = "off" | .channels.slack.nativeStreaming = false' > /tmp/openclaw-no-streaming.json
mv /tmp/openclaw-no-streaming.json ~/.openclaw/openclaw.json
Verify:
cat ~/.openclaw/openclaw.json | jq '.channels.slack | {streaming, nativeStreaming}'
{
"streaming": "off",
"nativeStreaming": false
}
openclaw gateway restart
Wait 5-10 seconds for restart to complete.
openclaw gateway status
Expected output should show gateway running.
thread_ts field (thread ID)channel_id fieldWhen replying to a message that came from a thread:
CORRECT pattern:
message({
action: "send",
channel: "slack",
target: "<channel_id>", // From metadata
threadId: "<thread_ts>", // From metadata
message: "Your reply here"
})
INCORRECT pattern (will post to channel root):
message({
action: "send",
channel: "slack",
target: "<channel_id>",
// Missing: threadId parameter
message: "Your reply here"
})
thread_tsthreadId parameterWhen streaming: "partial" or streaming: "full" is enabled:
thread_ts, channel_id) gets stripped or delayedstreaming: "off" fixes it:Slack channel config location:
~/.openclaw/openclaw.json โ .channels.slack
Relevant fields:
{
"channels": {
"slack": {
"streaming": "off", // Must be "off" for reliable threading
"nativeStreaming": false, // Must be false
"channels": {
"C0AL1T0SZQQ": {
"requireMention": false // Channel-specific settings
}
}
}
}
}
If fix causes other issues:
# Find most recent backup before fix
ls -lt ~/.openclaw/openclaw.json.backup* | head -1
# Restore it
BACKUP_FILE="<path from above>"
cp "$BACKUP_FILE" ~/.openclaw/openclaw.json
# Restart gateway
openclaw gateway restart
To avoid this issue in future:
Other symptoms that may indicate streaming problems:
Recommendation: Keep streaming: "off" unless you have a specific need for streaming and understand the threading tradeoff.
/opt/homebrew/lib/node_modules/openclaw/docs/channels/slack.mdopenclaw help message