#Bot doesn’t respond in WhatsApp
1 messages · Page 1 of 1 (latest)
Based on the docs, the issue is likely that mention detection requires mentionPatterns to be configured for it to work reliably. Here's what's happening:
The Problem
When you set activation: mention, Clawdbot only responds when:
- A native WhatsApp @-mention is detected (
mentionedJids), OR - The message matches a
mentionPatternsregex you configured
Without mentionPatterns configured, native mention detection may not trigger properly (especially with certain formatting).
The Fix
Add mentionPatterns to your agent config:
{
agents: {
list: [
{
id: "main",
groupChat: {
mentionPatterns: ["@clawd", "clawdbot", "+15555550123"],
historyLimit: 50
}
}
]
}
}
- Patterns are case-insensitive regexes
- You can include your bot's name, any aliases, and your phone number
- After updating config, restart the gateway or use hot-reload
Quick Test
- Add
mentionPatternsas shown above - In the group, send
@clawd hello(or whatever pattern you added) - The bot should now respond when mentioned
If you're still having issues after adding patterns, check the gateway logs for any mention-related errors.
Can I configure that via chat using the configure command and if so what does that syntax look like
Yes! You can use /config (persists to disk) or /debug (runtime only). Here's the syntax:
Runtime (temporary, survives restart)
/debug set agents.list[0].groupChat.mentionPatterns[0]="@clawd"
/debug set agents.list[0].groupChat.mentionPatterns[1]="+15555550123"
/debug show
Persisted (writes to config file)
/config set agents.list[0].groupChat.mentionPatterns[0]="@clawd"
/config set agents.list[0].groupChat.mentionPatterns[1]="+15555550123"
/config show
Requirements
- Owner-only commands
/configrequirescommands.config: truein your config/debugrequirescommands.debug: truein your config
Quick one-liner (JSON array)
/debug set agents.list[0].groupChat.mentionPatterns="[\"@clawd\", \"clawdbot\", \"+15555550123\"]"
After setting, the bot will respond when any of those patterns are mentioned in group messages. 🦐
Okay it’s actually my second agent in the lost
Also let’s give it the following aliases
@Archivist, archivista, +13052059719
Set it up for me and I’ll try it
Here are the commands to set up your Archivist agent:
Run these in the Archivist agent's chat:
Runtime (try first to test):
/debug set agents.list[1].groupChat.mentionPatterns="[\"@Archivist\", \"archivist\", \"+13052059719\"]"
Or if you need to find the correct index first, check your config:
/config get agents.list
Then use the correct index (e.g., [1], [2], etc.) for the Archivist agent.
Persist to disk (after testing works):
/config set agents.list[1].groupChat.mentionPatterns="[\"@Archivist\", \"archivist\", \"+13052059719\"]"
Verify:
/config get agents.list
The agent will now respond when anyone mentions @Archivist, archivist, or your phone number +13052059719 in groups! 🦐
/config set agents.list[1].groupChat.mentionPatterns[0]="@lunar silo"
[clawdbot] ⚠️ Config invalid after set (agents.list: Invalid input: expected array, received object).
⚠️ /config is disabled. Set commands.config=true to enable.
Ok when I try this command I get an error
/config set agents.list[1].groupChat.mentionPatterns[0]="@lunar silo"
[clawdbot] ⚠️ Config invalid after set (agents.list: Invalid input: expected array, received object).
The issue is you're using array index syntax [0]= on something that doesn't exist yet. Use the full array syntax instead:
Correct syntax:
/config set agents.list[1].groupChat.mentionPatterns="[\"@Archivist\", \"archivist\", \"+13052059719\"]"
Or escape the quotes differently if needed:
/config set agents.list[1].groupChat.mentionPatterns=["@Archivist","archivist","+13052059719"]
To add to existing array (if patterns already exist):
First show current value:
/config get agents.list[1].groupChat.mentionPatterns
Then set the full array:
/config set agents.list[1].groupChat.mentionPatterns=["@Archivist","archivist","+13052059719"]
The error happens because you're trying to set [0] as if it's an array when the path doesn't exist yet or is structured differently. Always set the full array at once! 🦐
Ok for this one
/config set agents.list[1].groupChat.mentionPatterns=["@Archivist","archivist","+13052059719"]
I get this
[clawdbot] ⚠️ Missing value.
/config set agents.list[1].groupChat.mentionPatterns="["@Archivist", "archivist", "+13052059719"]"
I get this
[clawdbot] ⚠️ Config invalid after set (agents.list: Invalid input: expected array, received object).
The config seems to already have something set there that's an object instead of an array. Let's diagnose and fix:
Step 1: Check current value
/config get agents.list[1].groupChat.mentionPatterns
Step 2: If it exists, unset it first
/config unset agents.list[1].groupChat.mentionPatterns
Step 3: Now set it as a proper array
/config set agents.list[1].groupChat.mentionPatterns=["@Archivist","archivist","+13052059719"]
Alternative: Check the full agent config first
/config get agents.list[1]
This will show you the current structure so we can see what's already configured. Share the output if you're still stuck! 🦐
Step 1 got me this
[clawdbot] ⚙️ Config agents.list.groupchat.mentionpatterns:
null
step 2 for me this
[clawdbot] ⚙️ No config value found for agents.list.groupchat.mentionpatterns.
Step 3 got me this
[clawdbot] ⚠️ Missing value.
Interesting - the path parsing seems off. Let's try a different approach:
Option 1: Use agent ID instead of index
First, find the agent ID:
/config get agents.list
Then use the ID path:
/config set agents.<id>.groupChat.mentionPatterns=["@Archivist","archivist","+13052059719"]
Option 2: Try dot notation for index
/config set agents.list.1.groupChat.mentionPatterns=["@Archivist","archivist","+13052059719"]
Option 3: Use debug instead
/debug set agents.list.1.groupChat.mentionPatterns=["@Archivist","archivist","+13052059719"]
Option 4: Show full agents config to see structure
/config get agents
Share the output of /config get agents.list and we can see the exact structure and find the right path! 🦐
Option 1 returns this
[clawdbot] ⚙️ Config agents.list:
[
{
"id": "main",
"default": true,
"workspace": "/mnt/c/Users/h4rdc/Documents/Github/person-search",
"model": "qwen-portal/coder-model",
"identity": {
"name": "Orion",
"theme": "Neon Fox",
"emoji": "🦊"
},
"tools": {
"allow": [
"group:clawdbot",
"group:fs",
"group:runtime",
"comfy.*",
"sessions_spawn"
],
"deny": [
"comfy.*"
]
}
},
{
"id": "pixel",
"workspace": "/mnt/e/CUIPP",
"model": "qwen-portal/vision-model",
"authProfileOverride": "google-antigravity:r1ch4rd@gmail.com",
"identity": {
"name": "Pixel",
"theme": "Anime Cyberpunk",
"emoji": "👾💕"
},
"tools": {
"allow": [
"group:clawdbot",
"group:fs",
"group:runtime",
"comfy.*",
"sessions_spawn"
],
"deny": [
"archivist.*"
]
}
}
]
I tried this command
/config set agents.pixel.groupChat.mentionPatterns=["@Archivist","archivist","+13052059719"]
I got this
[clawdbot] ⚠️ Missing value.
The array brackets might be getting parsed incorrectly. Try these alternatives:
Option 1: Use single quotes around the JSON
/config set agents.pixel.groupChat.mentionPatterns='["@Archivist","archivist","+13052059719"]'
Option 2: Use escaped quotes with backslashes
/config set agents.pixel.groupChat.mentionPatterns="[\"@Archivist\",\"archivist\",\"+13052059719\"]"
Option 3: Set each element individually (path by path)
First check if groupChat exists:
/config get agents.pixel.groupChat