Skip to content

fix(irc): sanitize internal tool-trace lines from outbound text#97214

Merged
vincentkoc merged 2 commits into
openclaw:mainfrom
masatohoshino:fix/irc-outbound-tool-trace-sanitize
Jun 27, 2026
Merged

fix(irc): sanitize internal tool-trace lines from outbound text#97214
vincentkoc merged 2 commits into
openclaw:mainfrom
masatohoshino:fix/irc-outbound-tool-trace-sanitize

Conversation

@masatohoshino

Copy link
Copy Markdown
Contributor

Related: #90684

What Problem This Solves

Fixes an issue where IRC users would see OpenClaw's internal tool-execution traces leak into channel messages. When a tool run fails, the runtime injects a status banner such as ⚠️ 🛠️ `…(agent)` failed into the assistant's outbound text. On IRC — a plaintext-only transport — that banner was delivered verbatim instead of being stripped.

Why This Change Was Made

The IRC outbound adapter's sanitizeText ran only sanitizeForPlainText(text), which does not strip assistant-visible scaffolding. The Telegram (#95774) and Google Chat (#95084) outbound adapters already wrap the same call with sanitizeAssistantVisibleText — the canonical assistant-visible sanitizer that removes tool-trace banners and other internal scaffolding (reasoning tags, tool-call XML). This change applies that same wrap to IRC: one import plus sanitizeForPlainText(sanitizeAssistantVisibleText(text)), reusing the existing SDK sanitizer rather than adding a helper. The change is limited to the IRC adapter; other channels are tracked separately under #90684.

User Impact

IRC users no longer see internal tool-trace banners — or other assistant-internal scaffolding handled by the shared sanitizer — in delivered messages. Ordinary assistant prose is unaffected.

Evidence

Focused unit testsextensions/irc/src/channel.test.ts adds 2 cases (tool-trace banner stripped; ordinary prose preserved):

$ node scripts/run-vitest.mjs extensions/irc/src/channel.test.ts
 Test Files  1 passed (1)
      Tests  3 passed (3)

Real-behavior proof — the patched IRC outbound adapter's ircOutboundBaseAdapter.sanitizeText, run directly against the real code path. No live IRC proof is included because the change is isolated to the outbound sanitizer; the command below exercises that adapter directly (the banner is runtime-injected, not model-produced, so a channel roundtrip adds no signal):

$ node --import tsx -e '
import { ircOutboundBaseAdapter } from "./extensions/irc/src/outbound-base.ts";
import { sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
const trace = "Done.\n⚠️ 🛠️ `search repos (agent)` failed";
const prose = "The pipeline has 3 open deals.";
console.log("before (sanitizeForPlainText only):", JSON.stringify(sanitizeForPlainText(trace)));
console.log("after  (ircOutboundBaseAdapter):   ", JSON.stringify(ircOutboundBaseAdapter.sanitizeText({ text: trace })));
console.log("prose  (ircOutboundBaseAdapter):   ", JSON.stringify(ircOutboundBaseAdapter.sanitizeText({ text: prose })));
'
before (sanitizeForPlainText only): "Done.\n⚠️ 🛠️ `search repos (agent)` failed"
after  (ircOutboundBaseAdapter):    "Done."
prose  (ircOutboundBaseAdapter):    "The pipeline has 3 open deals."

Before the fix, sanitizeForPlainText(text) alone leaks the banner verbatim; after the fix it is stripped to Done., and ordinary prose passes through unchanged.

@clawsweeper

clawsweeper Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 27, 2026, 11:29 AM ET / 15:29 UTC.

Summary
The PR adds sanitizeAssistantVisibleText() to the IRC outbound sanitizeText hook before plain-text formatting and adds IRC regression tests.

PR surface: Source +268, Tests +1134, Docs +11, Other +12. Total +1425 across 39 files.

Reproducibility: yes. Source inspection shows current main and v2026.6.10 only run IRC text through sanitizeForPlainText, while the canonical sanitizer tests and PR-head adapter tests cover the reported failure banner path.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: database schema: scripts/lib/official-external-plugin-catalog.json, database schema: src/plugins/official-external-plugin-catalog.test.ts, database schema: src/plugins/official-external-plugin-catalog.ts, migration/backfill/repair: extensions/codex/src/migration/plan.ts, migration/backfill/repair: extensions/codex/src/migration/provider.test.ts, persistent cache schema: extensions/nostr/src/nostr-bus.integration.test.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #90684
Summary: This PR is a focused IRC candidate for the broader non-Discord outbound assistant-visible sanitizer umbrella; merged sibling PRs already fixed Google Chat and Telegram slices.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] Merging intentionally changes IRC outbound delivery by suppressing lines that the canonical assistant-visible sanitizer classifies as internal scaffolding, so maintainers should accept that IRC should match the sibling channel behavior.

Maintainer options:

  1. Accept the canonical IRC sanitizer (recommended)
    Merge the adapter-level sanitizer after accepting that IRC should suppress canonical assistant-scaffolding lines instead of exposing internal tool traces.
  2. Request live IRC smoke proof
    Ask for a redacted IRC send proof only if maintainers want transport-level confirmation beyond the direct adapter proof already in the PR body.
  3. Hold for the umbrella policy
    Pause this PR if maintainers want all remaining non-Discord sanitizer coverage to land under one canonical boundary decision instead of channel-by-channel fixes.

Next step before merge

  • No automated repair is needed; maintainers should review the IRC filtering tradeoff and land the narrow fix or request live IRC proof.

Security
Cleared: No security or supply-chain concern was found in the current-main merge delta; the unique change narrows IRC outbound text visibility and adds tests.

Review details

Best possible solution:

Land the narrow IRC adapter sanitizer hook and tests after maintainer acceptance, while keeping broader uncovered-channel coverage tracked in #90684.

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

Yes. Source inspection shows current main and v2026.6.10 only run IRC text through sanitizeForPlainText, while the canonical sanitizer tests and PR-head adapter tests cover the reported failure banner path.

Is this the best way to solve the issue?

Yes. The PR fixes the channel-owned adapter hook that shared delivery already calls, reuses the existing SDK sanitizer, and matches merged Google Chat and Telegram sibling fixes instead of adding a new regex or config surface.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P1: The PR addresses internal tool/runtime trace leakage into a user-facing messaging channel, matching the urgent channel-workflow impact of the linked sanitizer umbrella.
  • merge-risk: 🚨 message-delivery: The patch changes IRC outbound filtering and can suppress lines before users see them when they match canonical assistant-scaffolding patterns.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes after-fix terminal output importing the patched IRC outbound adapter and showing the trace stripped while ordinary prose is preserved.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix terminal output importing the patched IRC outbound adapter and showing the trace stripped while ordinary prose is preserved.
Evidence reviewed

PR surface:

Source +268, Tests +1134, Docs +11, Other +12. Total +1425 across 39 files.

View PR surface stats
Area Files Added Removed Net
Source 20 314 46 +268
Tests 15 1136 2 +1134
Docs 2 19 8 +11
Config 0 0 0 0
Generated 0 0 0 0
Other 2 23 11 +12
Total 39 1492 67 +1425

What I checked:

Likely related people:

  • steipete: GitHub history shows repeated work on the IRC outbound seam and the shared assistant-visible sanitizer that this PR reuses. (role: feature owner / adjacent owner; confidence: high; commits: 76bc0ae32fe0, 712479eea1a1, 96e581242605; files: extensions/irc/src/outbound-base.ts, extensions/irc/src/channel.test.ts, src/shared/text/assistant-visible-text.ts)
  • vincentkoc: Recent history includes IRC runtime import narrowing and shared sanitizer maintenance near the affected surfaces. (role: recent area contributor; confidence: medium; commits: 6349e6aa3e6a, 4a4a5968e88a; files: extensions/irc/src/channel-api.ts, extensions/irc/src/channel.ts, src/shared/text/assistant-visible-text.ts)
  • obviyus: Recent sanitizer commits added and covered compact failure trace suppression that the IRC adapter now reuses. (role: sanitizer hardening contributor; confidence: medium; commits: 8f1ae5967ef2, d82bfcecb1d8; files: src/shared/text/assistant-visible-text.ts, src/shared/text/assistant-visible-text.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jun 27, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: nostr Channel integration: nostr channel: telegram Channel integration: telegram gateway Gateway runtime scripts Repository scripts channel: qqbot extensions: codex extensions: google size: XL and removed size: XS labels Jun 27, 2026
@vincentkoc
vincentkoc merged commit ddedf13 into openclaw:main Jun 27, 2026
156 of 160 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 28, 2026
…claw#97214)

* fix(irc): sanitize internal tool-trace lines from outbound text

* fix(irc): sanitize internal tool-trace lines from outbound text

---------

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc pushed a commit that referenced this pull request Jun 28, 2026
…97372)

Wrap the matrix outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under #90684 (Telegram #95774, Google Chat #95084, IRC #97214).
vincentkoc pushed a commit that referenced this pull request Jun 28, 2026
…7367)

Wrap the slack outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under #90684 (Telegram #95774, Google Chat #95084, IRC #97214).
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 1, 2026
…penclaw#97360)

Wrap the signal outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).
Rorqualx pushed a commit to Rorqualx/cortex that referenced this pull request Jul 2, 2026
…penclaw#97372)

Wrap the matrix outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).

(cherry picked from commit 25490d4)
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
…claw#97214)

* fix(irc): sanitize internal tool-trace lines from outbound text

* fix(irc): sanitize internal tool-trace lines from outbound text

---------

Co-authored-by: Vincent Koc <[email protected]>
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
…penclaw#97372)

Wrap the matrix outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
…enclaw#97367)

Wrap the slack outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
…penclaw#97360)

Wrap the signal outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).
Rorqualx pushed a commit to Rorqualx/cortex that referenced this pull request Jul 4, 2026
…enclaw#97367)

Wrap the slack outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).

(cherry picked from commit cd6d0f9)
Rorqualx pushed a commit to Rorqualx/cortex that referenced this pull request Jul 4, 2026
…penclaw#97360)

Wrap the signal outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).

(cherry picked from commit c026546)
Rorqualx pushed a commit to Rorqualx/cortex that referenced this pull request Jul 8, 2026
…enclaw#97367)

Wrap the slack outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).

(cherry picked from commit cd6d0f9)
Rorqualx pushed a commit to Rorqualx/cortex that referenced this pull request Jul 8, 2026
…penclaw#97360)

Wrap the signal outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).

(cherry picked from commit c026546)
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 10, 2026
…text

The Nextcloud Talk outbound adapter had no sanitizeText hook, so internal
assistant tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered chat
messages. The same one-line sanitizeText hook was already shipped to 13 sibling
channels (mattermost openclaw#98693, feishu openclaw#98705, twitch openclaw#103109, signal openclaw#97360,
slack openclaw#97367, matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684,
qqbot openclaw#90132, discord, whatsapp openclaw#71830, sms).

Add sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text) to the
outbound base adapter, matching those precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 10, 2026
The Nostr outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Nostr DMs.
The same one-line sanitizeText hook was already shipped to 13 sibling channels
(twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360, slack openclaw#97367,
matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684, qqbot openclaw#90132, discord,
whatsapp openclaw#71830, sms).

Add sanitizeText to the NostrOutboundAdapter type and adapter, matching those
precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 10, 2026
The Zalo outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Zalo
messages. The same one-line sanitizeText hook was already shipped to 13 sibling
channels (twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360,
slack openclaw#97367, matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684,
qqbot openclaw#90132, discord, whatsapp openclaw#71830, sms).

Add sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text) to the
outbound adapter, matching those precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 13, 2026
The Nostr outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Nostr DMs.
The same one-line sanitizeText hook was already shipped to 13 sibling channels
(twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360, slack openclaw#97367,
matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684, qqbot openclaw#90132, discord,
whatsapp openclaw#71830, sms).

Add sanitizeText to the NostrOutboundAdapter type and adapter, matching those
precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 13, 2026
The Zalo outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Zalo
messages. The same one-line sanitizeText hook was already shipped to 13 sibling
channels (twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360,
slack openclaw#97367, matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684,
qqbot openclaw#90132, discord, whatsapp openclaw#71830, sms).

Add sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text) to the
outbound adapter, matching those precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 13, 2026
The Zalo outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Zalo
messages. The same one-line sanitizeText hook was already shipped to 13 sibling
channels (twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360,
slack openclaw#97367, matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684,
qqbot openclaw#90132, discord, whatsapp openclaw#71830, sms).

Add sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text) to the
outbound adapter, matching those precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 13, 2026
The Nostr outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Nostr DMs.
The same one-line sanitizeText hook was already shipped to 13 sibling channels
(twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360, slack openclaw#97367,
matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684, qqbot openclaw#90132, discord,
whatsapp openclaw#71830, sms).

Add sanitizeText to the NostrOutboundAdapter type and adapter, matching those
precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 13, 2026
The Nostr outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Nostr DMs.
The same one-line sanitizeText hook was already shipped to 13 sibling channels
(twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360, slack openclaw#97367,
matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684, qqbot openclaw#90132, discord,
whatsapp openclaw#71830, sms).

Add sanitizeText to the NostrOutboundAdapter type and adapter, matching those
precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 13, 2026
The Zalo outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Zalo
messages. The same one-line sanitizeText hook was already shipped to 13 sibling
channels (twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360,
slack openclaw#97367, matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684,
qqbot openclaw#90132, discord, whatsapp openclaw#71830, sms).

Add sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text) to the
outbound adapter, matching those precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 13, 2026
The Zalo outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Zalo
messages. The same one-line sanitizeText hook was already shipped to 13 sibling
channels (twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360,
slack openclaw#97367, matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684,
qqbot openclaw#90132, discord, whatsapp openclaw#71830, sms).

Add sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text) to the
outbound adapter, matching those precedents.

Co-Authored-By: Claude <[email protected]>
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Jul 15, 2026
…claw#97214)

* fix(irc): sanitize internal tool-trace lines from outbound text

* fix(irc): sanitize internal tool-trace lines from outbound text

---------

Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit ddedf13)
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Jul 15, 2026
…penclaw#97372)

Wrap the matrix outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).

(cherry picked from commit 25490d4)
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Jul 15, 2026
…enclaw#97367)

Wrap the slack outbound sanitizeText hook with sanitizeAssistantVisibleText so assistant internal tool-trace scaffolding is stripped before delivery, matching the sibling channel fixes under openclaw#90684 (Telegram openclaw#95774, Google Chat openclaw#95084, IRC openclaw#97214).

(cherry picked from commit cd6d0f9)
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 19, 2026
The Nostr outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Nostr DMs.
The same one-line sanitizeText hook was already shipped to 13 sibling channels
(twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360, slack openclaw#97367,
matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684, qqbot openclaw#90132, discord,
whatsapp openclaw#71830, sms).

Add sanitizeText to the NostrOutboundAdapter type and adapter, matching those
precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 19, 2026
The Nostr outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Nostr DMs.
The same one-line sanitizeText hook was already shipped to 13 sibling channels
(twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360, slack openclaw#97367,
matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684, qqbot openclaw#90132, discord,
whatsapp openclaw#71830, sms).

Add sanitizeText to the NostrOutboundAdapter type and adapter, matching those
precedents.

Co-Authored-By: Claude <[email protected]>
miorbnli added a commit to miorbnli/openclaw that referenced this pull request Jul 24, 2026
The Nostr outbound adapter had no sanitizeText hook, so internal assistant
tool-trace scaffolding (e.g. "⚠️ 🛠️ `exec (agent)` failed", raw
<tool_call>/<function_response> XML) leaked verbatim into delivered Nostr DMs.
The same one-line sanitizeText hook was already shipped to 13 sibling channels
(twitch openclaw#103109, mattermost openclaw#98693, feishu openclaw#98705, signal openclaw#97360, slack openclaw#97367,
matrix openclaw#97372, irc openclaw#97214, telegram, googlechat openclaw#90684, qqbot openclaw#90132, discord,
whatsapp openclaw#71830, sms).

Add sanitizeText to the NostrOutboundAdapter type and adapter, matching those
precedents.

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: irc channel: nostr Channel integration: nostr channel: qqbot channel: telegram Channel integration: telegram docs Improvements or additions to documentation extensions: codex extensions: google gateway Gateway runtime merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants