Skip to content

[Bug]: WhatsApp media auto-reply generates assistant response but does not dispatch outbound message #90704

Closed as not planned

Description

@dimastopel

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

WhatsApp media auto-reply generates an assistant response but does not dispatch/send the reply back to WhatsApp.

Text messages can reply correctly, and manual openclaw message send --channel whatsapp ... works. For WhatsApp image messages, the image is received, saved, passed to the agent, processed by the image/vision pipeline, and the assistant response is written to the session JSONL. However, no outbound delivery is enqueued or sent, and the user receives no WhatsApp reply.

Possibly related: openclaw status --all reports WhatsApp dm:allowlist, but the displayed allowlist does not include the test sender, even though inbound messages from that sender are processed by the agent.

Steps to reproduce

  1. Configure OpenClaw WhatsApp channel.
  2. Approve local device scope upgrade so paired device has operator.write.
  3. Send a normal WhatsApp text message from an allowlisted sender to the OpenClaw WhatsApp agent account.
    • Text reply is received.
    • Logs show outbound send lines such as gateway/channels/whatsapp/outbound, web-outbound, and Sent message.
  4. Send a WhatsApp image with a caption, for example: What is it?
  5. Observe logs and session state:
    • web-inbound logs show mediaPath and mediaType: "image/jpeg".
    • web-auto-reply logs show the inbound media message.
    • agents/tool-images logs show the image being resized.
    • The agent session JSONL contains a completed assistant response with stopReason: "stop".
    • delivery_queue_entries is empty.
    • No web-outbound, gateway/channels/whatsapp/outbound, Sending message, or Sent message logs appear after the media turn.
    • User receives no WhatsApp reply.

Example diagnostic commands used:

sqlite3 -header -column ~/.openclaw/state/openclaw.sqlite "SELECT status, entry_kind, channel, target, account_id, retry_count, last_error, recovery_state, datetime(enqueued_at/1000,'unixepoch') enqueued, datetime(updated_at/1000,'unixepoch') updated FROM delivery_queue_entries ORDER BY enqueued_at DESC LIMIT 20;"

grep -E '"time":"2026-06-05T11:10:|\"time\":\"2026-06-05T11:11:' /tmp/openclaw/openclaw-2026-06-05.log | grep -Ei 'outbound|web-outbound|sendMessage|sent message|failed|error|delivery|queue|responseId|agent|whatsapp'

grep -E '"time":"2026-06-05T11:10:|\"time\":\"2026-06-05T11:11:' /tmp/openclaw/openclaw-2026-06-05.log | grep -Ei 'reply|dispatch|buffer|deliver|delivery|settled|completion|assistant|response|web-auto-reply|error|warn|skip|suppress'

Observed in the relevant log window:

  • Inbound image message is logged.
  • web-auto-reply receives mediaType: "image/jpeg" and mediaPath.
  • agents/tool-images resizes the image.
  • No outbound/delivery logs appear afterward.

Expected behavior

When a WhatsApp image message is received and the agent generates a response, OpenClaw should dispatch the assistant response back to the same WhatsApp chat, the same way it does for text-only messages.

Expected logs after assistant completion should include something like:

gateway/channels/whatsapp/outbound Sending message

web-outbound sending message

gateway/channels/whatsapp/outbound Sent message

web-outbound sent message

Actual behavior

For image messages:

  • WhatsApp inbound works.
  • Image download works.
  • Image is saved under ~/.openclaw/media/inbound/...jpg.
  • Image reaches the agent as MediaPath / MediaType.
  • Image is resized by agents/tool-images.
  • Assistant response is generated and written to session JSONL.
  • No outbound delivery is enqueued.
  • No WhatsApp send is attempted.
  • User receives no reply.

For text messages, outbound delivery works.

OpenClaw version

OpenClaw 2026.6.1 (2e08f0f)

Operating system

Debian GNU/Linux 13 (trixie)

Install method

npm

Model

claude-opus-4-7

Provider / routing chain

openclaw -> anthropic via API key

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

Additional status details:

OpenClaw status --all

Version: 2026.6.1

Channel: stable

WhatsApp: ON / OK / configured · accounts 1/1

WhatsApp account default: OK

WhatsApp DM policy: allowlist

Gateway: local loopback ws://127.0.0.1:18789

Tailscale exposure: off

Agents: 1 total · 1 active · 3 sessions

Possibly related status issue:

WhatsApp account default shows allowlist entries, but the test sender does not appear in the allowlist output.

Despite not appearing in that allowlist output, inbound messages from the test sender are processed by the agent.

Activity

  1. clawsweeper commented on Jun 5, 2026

    @clawsweeper
    Contributor

    Thanks for the report. I gave this a fresh shell check against current main, and I could not reproduce it anymore.

    Close as not reproducible: live WhatsApp image-caption replies succeeded on the reported build and current main, the reporter’s later retry on the same installation also succeeded, and no canonical related issue or pull request identifies a remaining condition.

    Review details

    Best possible solution:

    Keep the canonical shared dispatch path and live image-caption scenario; if the symptom recurs, open a fresh actionable report with redacted state-specific evidence.

    Do we have a high-confidence way to reproduce the issue?

    No. Live image-caption attempts succeeded on the reported build and current main, and the reporter could not reproduce the failure again on the same installation.

    Is this the best way to solve the issue?

    Yes. Retaining the shared dispatcher and requiring concrete state-specific evidence before changing it is safer than adding a speculative media-only fallback.

    Security review:

    Security review: This is ordinary issue triage without a proposed patch or security-sensitive report.

    AGENTS.md: found and applied where relevant.

    What I checked:

    • Independent live verification: The issue discussion records successful WhatsApp image-caption delivery on the reported build with both OpenAI and Anthropic, plus successful delivery on then-current main.
    • Reporter retry: The reporter retried one text message and two image-caption messages on the same installation; all three replies were delivered and the failure no longer reproduced.
    • Current canonical path: Current main passes the media-bearing WhatsApp inbound context into the buffered reply dispatcher and supplies deliverWebReply as the outbound callback. (extensions/whatsapp/src/auto-reply/monitor/process-message.ts:550, a450ff036a50)
    • Dedicated live scenario: Current main defines a WhatsApp inbound image-caption scenario that requires an outbound reply containing a unique marker. (extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.runtime.ts:747, 0e7b5c34292c)
    • Canonical search: Targeted GitHub searches found no open issue or pull request currently owning a narrower WhatsApp media auto-reply dispatch defect.

    Likely related people:

    • joshavant: Performed the live reproduction matrix on the reported build and current main and documented the evidence needed if a state-sensitive failure recurs. (role: recent area investigator; confidence: high; files: extensions/whatsapp/src/auto-reply/monitor/process-message.ts, extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.runtime.ts)
    • Peter Steinberger: Available checkout provenance associates recent work containing the canonical WhatsApp inbound dispatcher and image-caption QA scenario with this contributor. (role: recent area contributor; confidence: medium; commits: 0e7b5c34292c; files: extensions/whatsapp/src/auto-reply/monitor/process-message.ts, extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.runtime.ts)

    Codex review notes: model internal, reasoning high; reviewed against a450ff036a50.

  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    on Jun 5, 2026
  3. self-assigned this
    on Jun 9, 2026
  4. joshavant commented on Jun 9, 2026

    @joshavant
    Collaborator

    Thanks for the detailed report, @dimastopel. The logs you included were useful, especially the distinction between “the agent produced final text” and “no WhatsApp outbound delivery was queued or logged.”

    I tried to reproduce this against the reported commit and current main with a live WhatsApp E2E path. Because 2e08f0f422 did not yet have the image-caption QA scenario, I used a remote-only QA harness patch to add the sender/scenario and disable heartbeat noise; the OpenClaw WhatsApp dispatch/runtime path under test stayed on that commit.

    What I found:

    • 2e08f0f422 + OpenAI live frontier: live WhatsApp image+caption reply was delivered.
    • 2e08f0f422 + anthropic/claude-opus-4-7: live WhatsApp image+caption reply was delivered.
    • Current main at ebb9c6a013 + anthropic/claude-opus-4-7: live WhatsApp image+caption reply was delivered.

    So I can confirm the current live E2E path passes, but I could not reproduce the reported no-dispatch behavior on the reported commit either. That means I do not yet have enough evidence to call this “fixed on main”; the remaining variable is likely something specific to the original runtime state/config/media payload/timing.

    The minimal extra data that would let us continue productively is:

    1. The exact media message shape that triggered this, preferably a redacted sample of the inbound WhatsApp message metadata around the failing image/caption.
    2. The relevant redacted OpenClaw config for the WhatsApp plugin/agent auto-reply setup, especially allowlist, auto-reply, model/provider, and queue/delivery settings.
    3. A short redacted log slice from one failing run that includes inbound media handling, agent completion, and the point where delivery should have been enqueued/sent.
    4. Whether this reproduces consistently with the same image/caption, or whether it was intermittent.

    Please do not include tokens, phone numbers, session archives, or unredacted credentials. With those details, we can compare the failing path against the live QA path and decide whether there is still a dispatch bug hiding behind a narrower condition.

  5. removed their assignment
    on Jun 9, 2026
  6. dimastopel commented on Jun 9, 2026

    @dimastopel
    Author

    Thanks for checking this!

    I tried to reproduce again on my machine today, using the same local OpenClaw install/runtime. I sent:

    1. one text message
    2. one WhatsApp image+caption message
    3. another WhatsApp image+caption message

    All three replies were delivered successfully in WhatsApp this time. So I currently cannot reproduce the no-dispatch behavior again. I assume the failure was likely intermittent or state-sensitive.

    I will keep watching it. If it happens again, I’ll capture the requested redacted data and send here.

  7. locked as resolved and limited conversation to collaborators on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.regressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions