#Openclaw sending two messages for one prompt.
1 messages · Page 1 of 1 (latest)
First thing: what does openclaw --version show?
Two likely causes, depending on what the screenshot shows:
- If it is a progress/status draft plus the final answer, that can be Discord streaming previews. Discord defaults to progress-style previews now. You can test by setting Discord streaming off:
openclaw config set channels.discord.streaming.mode off
openclaw gateway restart
Docs: https://docs.openclaw.ai/channels/discord#streaming-previews
- If it is two identical final replies, I’d suspect two gateway instances or two Discord consumers using the same bot token. Check:
openclaw gateway status
openclaw status --all
ps aux | rg "openclaw|clawdbot"
If you paste the version plus whether the two messages are identical final replies vs preview+final, we can narrow it quickly. General triage docs: https://docs.openclaw.ai/help/faq
Why would discord streaming previews show up on the dashboard?
They normally shouldn’t show up as “Discord messages” on the dashboard. The dashboard is watching the same underlying OpenClaw session/run, so it can show live chat delivery events while Discord gets a draft preview edited in-place.
The useful distinction is:
- Appears during the run, then collapses/disappears after refresh/history reload: likely just live delivery/progress state leaking into the dashboard view. Annoying UI behavior, but not necessarily two real assistant replies.
- Still shows as two assistant messages after refresh: that is not just Discord streaming preview; it means two entries made it into the durable session transcript or the run delivered twice.
So for your original issue, check after the run finishes and hard-refresh the dashboard. If Discord has two actual posted messages and dashboard also has two persisted assistant turns, I’d look at duplicate gateway/bot process or duplicate inbound handling. If Discord has a progress/status message plus final, try:
openclaw config set channels.discord.streaming.mode off
openclaw gateway restart
Docs for the relevant bits:
https://docs.openclaw.ai/channels/discord#live-stream-preview
https://docs.openclaw.ai/web/control-ui#send-and-history-semantics
But I am only talking to openclaw on the dashboard currently. Yes I do have a discord link but not using it right now.
Ah, then I’d drop the Discord streaming theory. If the prompt is sent from the dashboard, this is a dashboard/WebChat path issue or duplicate gateway/session state, not Discord preview behavior.
Please grab these:
openclaw --version
openclaw status --all
openclaw gateway status
openclaw logs --tail 200 | rg "chat.send|idempotency|runId|duplicate|dispatch|session"
Also quick UI checks:
- Hard refresh the dashboard, or reopen it with
openclaw dashboard. - If it is installed as a PWA or open in multiple tabs, close all dashboard tabs/windows and open one fresh tab.
- Try a private/incognito browser window once. Old Control UI service-worker/cache state can cause weird UI behavior after updates.
The key question: after a hard refresh, are there still two assistant replies in the dashboard history? If yes, it’s persisted in the session. If no, it’s likely live/optimistic UI duplication only.
https://i.imgur.com/nPIyT4T.png
https://i.imgur.com/xDvEJvG.png
see? two messages.
Yep, that looks like real duplicate dashboard output, not Discord streaming. I can’t fetch the Imgur images from here right now, but from your description we should treat this as dashboard/WebChat producing or rendering two assistant messages for one chat.send.
The fastest split is persisted vs UI-only:
- Hard refresh the dashboard after the response finishes.
- If there are still two replies, run:
openclaw --version
openclaw status --all
openclaw logs --tail 300 | rg "chat.send|idempotency|in_flight|runId|tool-final|message_end|duplicate"
If you’re comfortable checking the raw session file too:
rg -n "the exact duplicated reply text|message_end|assistant" ~/.openclaw -g "*.jsonl" -g "*.json"
What I’m looking for:
- two
chat.send/ two runIds for one click = browser/UI double-submit or stale dashboard bundle/PWA cache. - one runId but two assistant/message_end entries = gateway/session persistence bug.
- one transcript entry but two bubbles only in UI = Control UI render/optimistic-tail merge bug.
Also try a private/incognito window once. If incognito fixes it, clear site data for the dashboard origin or reopen via openclaw dashboard; cached Control UI bundles/service workers can get weird after updates. If it persists on current version, this is worth filing with those logs at https://github.com/openclaw/openclaw/issues.
Got it, the screenshots help. This is not Discord streaming previews.
In the first screenshot I can see actual tool cards named Message before the assistant output. That means the agent is calling the message tool and then the dashboard is also showing assistant output for the same run. So you’re seeing two surfaces mixed together: a chat-delivery/tool-send path plus the normal dashboard assistant reply.
Two likely causes:
- You’re in a dashboard session that was originally tied to Discord, so it still has an external delivery route. Dashboard access intentionally doesn’t overwrite that route.
- The prompt/session instructions are telling the agent to “send a message” or use the
messagetool, so it sends via the messaging tool and then also summarizes/finalizes in the dashboard.
Try this first:
- In the dashboard, start a totally fresh New Chat rather than continuing the linked session.
- If there is a session picker, switch away from the Discord/thread-looking session to a plain dashboard/main session.
- Don’t include “send this in chat/message” phrasing unless you actually want it posted externally.
- Then ask a tiny test prompt like “reply only with hello”.
If the fresh dashboard-only session still shows two assistant bubbles with no Message tool card, that’s a real WebChat duplication bug. If the duplicate only appears when Message tool cards show up, it’s routing/tool-send behavior, not rendering duplication.
Docs that line up with this: https://docs.openclaw.ai/web/webchat and https://docs.openclaw.ai/web/control-ui#send-and-history-semantics
Found the issue, my agentic AI found the issue with delivery-mirror