openclaw - 💡(How to fix) Fix [Feature]: WhatsApp dmPolicy "observe" mode — ingest DMs as read-only log without triggering agent turns [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73997Fetched 2026-04-30 06:30:03
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Timeline (top)
commented ×1cross-referenced ×1

Add a new dmPolicy: "observe" option for WhatsApp accounts that ingests incoming DMs into a structured read-only log but never routes them to an agent session and never triggers an agent turn.

Root Cause

Add a new dmPolicy: "observe" option for WhatsApp accounts that ingests incoming DMs into a structured read-only log but never routes them to an agent session and never triggers an agent turn.

Fix Action

Fix / Workaround

  • OpenClaw 2026.4.26
  • Multi-agent setup with dual WhatsApp accounts
  • Primary account currently set to dmPolicy: "disabled" as workaround
RAW_BUFFERClick to expand / collapse

Summary

Add a new dmPolicy: "observe" option for WhatsApp accounts that ingests incoming DMs into a structured read-only log but never routes them to an agent session and never triggers an agent turn.

Use Case

In a multi-agent setup, agents need contextual awareness of what is happening on the primary WhatsApp line (who is texting, what they are saying) without ever being able to respond. Current options are:

  • allowlist / block — agents either get full sessions (with reply capability) or see nothing
  • disabled — complete blackout, no context at all

There is no middle ground: "see but don't touch."

Proposed Behavior

When dmPolicy: "observe" is set on an account:

  1. Inbound DMs are received and logged to a structured, queryable store (e.g., a JSONL file or SQLite table)
  2. No agent session is created for the DM
  3. No agent turn fires — the message is never routed to any agent
  4. No message tool reply path exists for these messages
  5. Agents can read the observation log via a dedicated tool (e.g., whatsapp_observations or whatsapp_history) during their normal work — heartbeats, cron jobs, user-initiated queries

Why Not Just Use allowlist + NO_REPLY?

  • allowlist still creates agent sessions and fires agent turns — burning tokens on every DM even when the agent just says NO_REPLY
  • The reply path exists, so a model under context pressure or on a degraded fallback model can and does occasionally reply despite instructions (we have experienced this multiple times)
  • observe is mechanically safe — the message never enters the agent pipeline at all

Implementation Sketch

  • New enum value for dmPolicy: "observe" (alongside "allowlist", "block", "disabled")
  • On inbound DM with observe policy: write to observation store, skip session resolution, skip agent routing
  • New tool or query surface for agents to pull from the observation store (filtered by account, time range, sender)
  • Optional: expose channels.whatsapp.accounts.<id>.observeRetention config for how long to keep observed messages

Environment

  • OpenClaw 2026.4.26
  • Multi-agent setup with dual WhatsApp accounts
  • Primary account currently set to dmPolicy: "disabled" as workaround

extent analysis

TL;DR

To implement the "observe" policy for WhatsApp accounts, add a new enum value for dmPolicy and modify the inbound DM handling to write to an observation store without creating an agent session or triggering an agent turn.

Guidance

  • Introduce a new enum value "observe" for dmPolicy alongside existing values to enable the observation mode.
  • Modify the inbound DM handling logic to check for the "observe" policy and write incoming DMs to a structured, queryable store without creating an agent session or routing the message to an agent.
  • Develop a dedicated tool or query surface for agents to access the observation log, allowing them to view messages without interacting with them.
  • Consider adding a configuration option (channels.whatsapp.accounts.<id>.observeRetention) to control how long observed messages are retained in the store.

Example

// Example of how the new enum value could be added
const dmPolicyEnum = {
  allowlist: 'allowlist',
  block: 'block',
  disabled: 'disabled',
  observe: 'observe' // New value for observation mode
};

// Example of modified inbound DM handling logic
if (dmPolicy === 'observe') {
  // Write to observation store
  observationStore.write(inboundDM);
  // Skip session resolution and agent routing
  return;
}

Notes

The implementation details may vary depending on the specific requirements and constraints of the OpenClaw system and the WhatsApp integration. The provided example is a simplified illustration of how the new enum value and modified logic could be implemented.

Recommendation

Apply the workaround by implementing the "observe" policy as described, allowing agents to have contextual awareness of incoming DMs without the risk of accidental replies or session creation. This approach provides a mechanically safe solution that meets the requirements outlined in the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feature]: WhatsApp dmPolicy "observe" mode — ingest DMs as read-only log without triggering agent turns [1 comments, 2 participants]