#Bot doesn’t respond in WhatsApp

1 messages · Page 1 of 1 (latest)

prime wing
#

When I set activation mention the bot doesn’t respond when messaged with a leading at

If I set activation always, then it will always respond whenever anybody says anything

novel stoneBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

daring sleetBOT
# prime wing When I set activation mention the bot doesn’t respond when messaged with a leadi...

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:

  1. A native WhatsApp @-mention is detected (mentionedJids), OR
  2. The message matches a mentionPatterns regex 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

  1. Add mentionPatterns as shown above
  2. In the group, send @clawd hello (or whatever pattern you added)
  3. 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.

https://docs.clawdbot.concepts/groups#mention-gating

prime wing
#

Can I configure that via chat using the configure command and if so what does that syntax look like

daring sleetBOT
# prime wing Can I configure that via chat using the configure command and if so what does th...

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
  • /config requires commands.config: true in your config
  • /debug requires commands.debug: true in 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. 🦐

prime wing
#

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

daring sleetBOT
# prime wing Okay it’s actually my second agent in the lost Also let’s give it the following...

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! 🦐

prime wing
#

/config set agents.list[1].groupChat.mentionPatterns[0]="@lunar silo"

[clawdbot] ⚠️ Config invalid after set (agents.list: Invalid input: expected array, received object).

daring sleetBOT
prime wing
#

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).

daring sleetBOT
# prime wing Ok when I try this command I get an error /config set agents.list[1].groupChat...

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! 🦐

prime wing
#

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).

daring sleetBOT
# prime wing Ok for this one /config set agents.list[1].groupChat.mentionPatterns=["@Archiv...

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! 🦐

prime wing
#

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.

daring sleetBOT
# prime wing Step 1 got me this [clawdbot] ⚙️ Config agents.list.groupchat.mentionpatterns: ...

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! 🦐

prime wing
#

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.

daring sleetBOT
# prime wing Option 1 returns this [clawdbot] ⚙️ Config agents.list: ```json [ { "id":...

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