openclaw/docs/concepts
juanpablodlc 4a99b9b651
feat(whatsapp): add debounceMs for batching rapid messages (#971)
* feat(whatsapp): add debounceMs for batching rapid messages

Add a `debounceMs` configuration option to WhatsApp channel settings
that batches rapid consecutive messages from the same sender into a
single response. This prevents triggering separate agent runs for
each message when a user sends multiple short messages in quick
succession (e.g., "Hey!", "how are you?", "I was wondering...").

Changes:
- Add `debounceMs` config to WhatsAppConfig and WhatsAppAccountConfig
- Implement message buffering in `monitorWebInbox` with:
  - Map-based buffer keyed by sender (DM) or chat ID (groups)
  - Debounce timer that resets on each new message
  - Message combination with newline separator
  - Single message optimization (no modification if only one message)
- Wire `debounceMs` through account resolution and monitor tuning
- Add UI hints and schema documentation

Usage example:
{
  "channels": {
    "whatsapp": {
      "debounceMs": 5000  // 5 second window
    }
  }
}

Default behavior: `debounceMs: 0` (disabled by default)

Verified: All existing tests pass (3204 tests), TypeScript compilation
succeeds with no errors.

Implemented with assistance from AI coding tools.

Closes #967

* chore: wip inbound debounce

* fix: debounce inbound messages across channels (#971) (thanks @juanpablodlc)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-15 23:07:19 +00:00
..
agent-loop.md fix: finish channels rename sweep 2026-01-13 08:40:40 +00:00
agent-workspace.md chore: drop Clawdis legacy references 2026-01-15 06:18:44 +00:00
agent.md docs: complete channels rename sweep 2026-01-13 08:40:39 +00:00
architecture.md docs: add protocol docs 2026-01-12 04:44:27 +00:00
channel-routing.md refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
compaction.md fix: unblock control commands during active runs 2026-01-15 07:08:48 +00:00
context.md docs: add context concept page 2026-01-15 01:12:59 +00:00
group-messages.md docs: complete channels rename sweep 2026-01-13 08:40:39 +00:00
groups.md docs: clarify group sandbox folder allowlist 2026-01-15 03:52:57 +00:00
markdown-formatting.md docs: add markdown IR example 2026-01-15 00:37:04 +00:00
memory.md docs: add custom memory endpoint example 2026-01-13 03:21:59 +00:00
messages.md feat(whatsapp): add debounceMs for batching rapid messages (#971) 2026-01-15 23:07:19 +00:00
model-failover.md Docs: fix internal links 2026-01-10 14:51:33 -06:00
model-providers.md fix: finish channels rename sweep 2026-01-13 08:40:40 +00:00
models.md chore: standardize Claude Code CLI naming (#915) 2026-01-14 20:07:35 +00:00
multi-agent.md docs: clarify agent auth + sandboxed skills 2026-01-15 04:51:03 +00:00
oauth.md refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
presence.md fix: require gateway client id 2026-01-12 04:58:38 +00:00
queue.md docs: complete channels rename sweep 2026-01-13 08:40:39 +00:00
retry.md refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
session-pruning.md fix: rename bash tool to exec (#748) (thanks @myfunc) 2026-01-12 02:49:55 +00:00
session-tool.md Structured subagent announce output + include run outcome (#835) 2026-01-15 04:48:07 +00:00
session.md docs: add context concept page 2026-01-15 01:12:59 +00:00
sessions.md Docs: fix internal links 2026-01-10 14:51:33 -06:00
streaming.md docs: complete channels rename sweep 2026-01-13 08:40:39 +00:00
system-prompt.md feat(date-time): standardize time context and tool timestamps 2026-01-15 22:27:06 +00:00
timezone.md feat(date-time): standardize time context and tool timestamps 2026-01-15 22:27:06 +00:00
typebox.md Move provider to a plugin-architecture (#661) 2026-01-11 11:45:25 +00:00
typing-indicators.md docs: complete channels rename sweep 2026-01-13 08:40:39 +00:00
usage-tracking.md docs(usage): note minimax usage key 2026-01-14 09:57:54 +00:00