openclaw - ✅(Solved) Fix [Bug]: Nextcloud Talk channel agent silently skips `message` tool, marks reply 'completed' without posting [1 pull requests, 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#76980Fetched 2026-05-04 04:59:48
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
commented ×1cross-referenced ×1

In the @openclaw/nextcloud-talk channel, the embedded agent harness inconsistently calls the message tool to deliver replies back to Nextcloud Talk. When it doesn't, the agent streams generated text via the text_end channel — which is a no-op for the nextcloud-talk plugin's deliveryMode: "direct" outbound config — then logs a message processed: outcome=completed diagnostic. From the operator's perspective the run looks successful, but no chat message ever lands in Nextcloud.

Webhook ingress, signature verification, OpenRouter/LLM call, agent reasoning, session-state housekeeping all work. Only the outbound back-to-NC step is silently dropped.

Error Message

Behavior bug (agent fails to deliver reply, no error)

Root Cause

Possibly the same root cause as #34111 (closed stale, no resolution) but with a much sharper repro: webhook + signature + LLM all confirmed working, the failure is exclusively in the agent → outbound-tool path.

Fix Action

Workaround

Delete the session's *.jsonl + *.trajectory.jsonl + the corresponding entry in sessions.json, then restart the gateway. First reply after restart usually goes through, subsequent ones may not.

PR fix notes

PR #77020: [codex] fix delivery suppression diagnostics

Description (problem / solution / changelog)

Summary

  • mark message-tool-only/send-policy-suppressed turns with generated visible output as source-reply-delivery-suppressed in diagnostics
  • use the shared reply-content predicate so rich presentation/channel payloads are counted consistently with final delivery normalization
  • clarify the text-end safety log so it says content was emitted via text_end, not necessarily delivered to the source channel
  • add regression coverage for rich presentation-only suppressed replies

Fixes #76980.

Root Cause

message_tool_only intentionally suppresses automatic source delivery, but dispatch diagnostics still reported these turns as ordinary completed runs even when the agent generated visible output that was hidden. The first diagnostic guard only checked text/media content, so rich replies such as presentation buttons could still be missed.

Verification

  • pnpm exec oxfmt --check --threads=1 src/auto-reply/reply/dispatch-from-config.ts src/auto-reply/reply/dispatch-from-config.test.ts src/agents/pi-embedded-subscribe.handlers.messages.ts src/agents/pi-embedded-subscribe.handlers.messages.test.ts
  • pnpm check:changelog-attributions
  • pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/agents/pi-embedded-subscribe.handlers.messages.test.ts
  • Testbox pnpm check:changed on tbx_01kqra29gxhhw0av36nzpevykv (passed; box stopped)

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/agents/pi-embedded-subscribe.handlers.messages.test.ts (modified, +7/-1)
  • src/agents/pi-embedded-subscribe.handlers.messages.ts (modified, +1/-1)
  • src/auto-reply/reply/dispatch-from-config.test.ts (modified, +44/-0)
  • src/auto-reply/reply/dispatch-from-config.ts (modified, +26/-1)

Code Example

# Successful run after session wipe (msg #99 actually posted):
22:31:46 [diagnostic] message queued: source=dispatch
22:31:51 [diagnostic] message processed: outcome=completed duration=XXXXms
# (bot reply landed in oc_comments at this point)

# Subsequent run (msg #100 — silently dropped):
22:34:33 Delivery suppressed by sourceReplyDeliveryMode: message_tool_only ... — agent will still process the message
22:34:34 [agent/embedded] embedded run prompt start: provider=openrouter api=openai-completions ...
22:34:44 [agent/embedded] embedded run agent end: runId=6bb3dd3a-... isError=false
# NO tool=message log line for this run.
22:34:44 [diagnostic] message processed: channel=nextcloud-talk chatId=nextcloud-talk:wnvy5gd9 messageId=100 outcome=completed duration=10808ms
# Nothing in Nextcloud's oc_comments table for this message.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (agent fails to deliver reply, no error)

Summary

In the @openclaw/nextcloud-talk channel, the embedded agent harness inconsistently calls the message tool to deliver replies back to Nextcloud Talk. When it doesn't, the agent streams generated text via the text_end channel — which is a no-op for the nextcloud-talk plugin's deliveryMode: "direct" outbound config — then logs a message processed: outcome=completed diagnostic. From the operator's perspective the run looks successful, but no chat message ever lands in Nextcloud.

Webhook ingress, signature verification, OpenRouter/LLM call, agent reasoning, session-state housekeeping all work. Only the outbound back-to-NC step is silently dropped.

Environment

  • OpenClaw 2026.5.2 (8b2a6e5) — installed via npm install -g openclaw on Debian 13 trixie LXD container, aarch64
  • Plugin @openclaw/[email protected] — installed via openclaw plugins install
  • Node 22.22.2 (NodeSource, aarch64)
  • Nextcloud 33.0.0, spreed (Talk app) 23.0.3
  • Bot installed with --feature webhook --feature response --feature reaction
  • Channel config: groupPolicy: open, rooms."*".requireMention: false, network.dangerouslyAllowPrivateNetwork: true, agents.defaults.model: openrouter/openrouter/auto
  • LLM provider: OpenRouter (autoselect)

Reproduce

  1. Fresh install OpenClaw + nextcloud-talk plugin per docs.
  2. Configure channel: baseUrl, botSecretFile, groupPolicy=open, rooms."*".requireMention=false, network.dangerouslyAllowPrivateNetwork=true (we're on a LAN-internal Nextcloud whose DNS resolves to 192.168.x.x).
  3. Configure OpenRouter provider with models.providers.openrouter.{baseUrl, apiKey, models:[{id:"openrouter/auto",api:"openai-completions"}]}, agents.defaults.model = "openrouter/openrouter/auto".
  4. occ talk:bot:install OpenClaw <secret> http://<heisenberg-ip>:8788/nextcloud-talk-webhook --feature webhook --feature response --feature reaction
  5. occ talk:bot:setup <bot-id> <room-token>
  6. Send a chat message in the room.

Observed

  • Webhook arrives, signature verifies, run starts.
  • LLM call completes; embedded run agent end: isError=false.
  • Log line: [agent/embedded] Skipping message_end safety send for text_end channel - content already delivered via text_end
  • Log line: Delivery suppressed by sourceReplyDeliveryMode: message_tool_only for session ... — agent will still process the message
  • No tool=message invocation in logs.
  • Log line: [diagnostic] message processed: channel=nextcloud-talk ... outcome=completed duration=XXXXms
  • Nothing reaches Nextcloud. oc_comments for the room shows only the user's message; no bot reply.

On the very FIRST run after a clean session reset (delete <sessionId>.jsonl, <sessionId>.trajectory.jsonl, scrub the entry from sessions.json, restart openclaw.service), the agent does call the message tool and the reply lands. The bot post appears in oc_comments as expected. Subsequent messages in the same session revert to the text_end-streamed-into-void behavior.

Expected

For a channel with outbound.base.deliveryMode: "direct" (which the nextcloud-talk plugin sets at src/channel.ts:169), every reply should either:

  • result in a tool=message invocation that calls sendMessageNextcloudTalk, or
  • log a clear failure if the agent decided not to reply (e.g., "agent declined to reply" with a reason),

but never silently mark outcome=completed after streaming text into a sink that the channel doesn't consume.

Suspect locations

  • @openclaw/nextcloud-talk src/channel.ts:163-185 — sets outbound.base.deliveryMode: "direct" and provides sendText adapters, but doesn't appear to wire the text_end streaming path to anything.
  • Core dist/plugin-sdk/src/auto-reply/...sourceReplyDeliveryMode = "message_tool_only" is inferred from the channel's deliveryMode: "direct", but the agent harness then doesn't always honor it.
  • The agent appears to learn from prior failed tool=message results in the persisted session/trajectory (we hit a SsrfBlockedError on first attempt before adding dangerouslyAllowPrivateNetwork; afterwards the agent stopped calling the tool entirely until the session was wiped).

Workaround

Delete the session's *.jsonl + *.trajectory.jsonl + the corresponding entry in sessions.json, then restart the gateway. First reply after restart usually goes through, subsequent ones may not.

Logs (representative slice — successful first reply, then failed second)

# Successful run after session wipe (msg #99 actually posted):
22:31:46 [diagnostic] message queued: source=dispatch
22:31:51 [diagnostic] message processed: outcome=completed duration=XXXXms
# (bot reply landed in oc_comments at this point)

# Subsequent run (msg #100 — silently dropped):
22:34:33 Delivery suppressed by sourceReplyDeliveryMode: message_tool_only ... — agent will still process the message
22:34:34 [agent/embedded] embedded run prompt start: provider=openrouter api=openai-completions ...
22:34:44 [agent/embedded] embedded run agent end: runId=6bb3dd3a-... isError=false
# NO tool=message log line for this run.
22:34:44 [diagnostic] message processed: channel=nextcloud-talk chatId=nextcloud-talk:wnvy5gd9 messageId=100 outcome=completed duration=10808ms
# Nothing in Nextcloud's oc_comments table for this message.

Related

Possibly the same root cause as #34111 (closed stale, no resolution) but with a much sharper repro: webhook + signature + LLM all confirmed working, the failure is exclusively in the agent → outbound-tool path.

extent analysis

TL;DR

The issue can be temporarily resolved by deleting the session's JSON files and restarting the gateway, which allows the first reply to go through, but subsequent ones may still fail.

Guidance

  • The agent's behavior suggests that it is learning from prior failed tool=message results and adapting its behavior, which may be causing the issue.
  • The sourceReplyDeliveryMode being set to "message_tool_only" and the deliveryMode being set to "direct" may be conflicting, leading to the agent not calling the message tool.
  • The fact that the first reply after a session wipe usually goes through, but subsequent ones do not, suggests that there may be an issue with the agent's state or the session data.
  • To further debug the issue, it may be helpful to investigate the agent's state and session data to see if there are any clues as to why the message tool is not being called.

Example

No code snippet is provided as the issue seems to be related to the agent's behavior and state, rather than a specific code issue.

Notes

The issue seems to be related to the interaction between the agent, the session data, and the sourceReplyDeliveryMode and deliveryMode settings. Further investigation is needed to determine the root cause of the issue.

Recommendation

Apply the workaround of deleting the session's JSON files and restarting the gateway, as this has been shown to temporarily resolve the issue. However, a more permanent fix will likely require further investigation and changes to the agent's behavior or the session data handling.

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 - ✅(Solved) Fix [Bug]: Nextcloud Talk channel agent silently skips `message` tool, marks reply 'completed' without posting [1 pull requests, 1 comments, 2 participants]