openclaw - ✅(Solved) Fix Reply delivery can leak current-message scaffolding and '(no output)' placeholders [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#78177Fetched 2026-05-06 06:16:17
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
commented ×1cross-referenced ×1

Reply delivery can surface internal scaffolding to users when assistant-visible text includes:

  • the current-message priority prompt (Current message priority: ... [Current message - respond to this])
  • a bare (no output) placeholder

This showed up in a Telegram/system flow while testing reply delivery after an OpenClaw update.

Error Message

I could not open a PR directly yet because this checkout appears to have been based on a newer packaged/source tree than my fork's current default branch. Direct push to upstream is denied, and pushing the branch to my fork failed with a missing object error. Applying the patch onto the fork default branch also failed because the relevant src/... files are not present there.

Root Cause

I could not open a PR directly yet because this checkout appears to have been based on a newer packaged/source tree than my fork's current default branch. Direct push to upstream is denied, and pushing the branch to my fork failed with a missing object error. Applying the patch onto the fork default branch also failed because the relevant src/... files are not present there.

Fix Action

Fix / Workaround

Local patch prepared

I prepared a local patch/commit with regression tests:

Patch scope:

PR fix notes

PR #78189: fix: suppress leaked reply scaffolding

Description (problem / solution / changelog)

Summary

Fix reply delivery sanitization so internal current-message scaffolding and bare (no output) placeholders are not delivered to users.

Changes

  • Strip copied current-message/history prompt blocks from sanitizeUserFacingText while preserving subsequent visible reply text.
  • Drop standalone (no output) placeholder lines without removing inline user-visible mentions.
  • Treat a bare (no output) reply payload as skipped with empty-tool-output.
  • Add sanitizer and normalizer regression coverage.

Testing

  • PATH="/tmp/openclaw-pnpm-shim:$PATH" node scripts/run-vitest.mjs run src/agents/pi-embedded-helpers.sanitizeuserfacingtext.test.ts src/auto-reply/reply/reply-utils.test.ts — 166 tests passed
  • PATH="/tmp/openclaw-pnpm-shim:$PATH" node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental false — passed
  • PATH="/tmp/openclaw-pnpm-shim:$PATH" pnpm exec oxfmt --check src/agents/pi-embedded-helpers/sanitize-user-facing-text.ts src/agents/pi-embedded-helpers.sanitizeuserfacingtext.test.ts src/auto-reply/reply/normalize-reply.ts src/auto-reply/reply/reply-utils.test.ts — passed
  • git diff --check — passed
  • PATH="/tmp/openclaw-pnpm-shim:$PATH" node scripts/check-changed.mjs — passed

Fixes openclaw/openclaw#78177

Changed files

  • src/agents/pi-embedded-helpers.sanitizeuserfacingtext.test.ts (modified, +35/-0)
  • src/agents/pi-embedded-helpers/sanitize-user-facing-text.ts (modified, +51/-4)
  • src/auto-reply/reply/normalize-reply.ts (modified, +6/-1)
  • src/auto-reply/reply/reply-utils.test.ts (modified, +11/-0)
RAW_BUFFERClick to expand / collapse

Summary

Reply delivery can surface internal scaffolding to users when assistant-visible text includes:

  • the current-message priority prompt (Current message priority: ... [Current message - respond to this])
  • a bare (no output) placeholder

This showed up in a Telegram/system flow while testing reply delivery after an OpenClaw update.

Expected behaviour

User-facing reply normalization/sanitization should drop these internal-only strings before delivery. If nothing user-visible remains, the reply should be skipped.

Local patch prepared

I prepared a local patch/commit with regression tests:

9538ed3b fix: suppress leaked reply scaffolding

Patch scope:

  • sanitizeUserFacingText(...) strips leaked current-message-priority prompt wrappers while preserving real reply text
  • sanitizeUserFacingText(...) suppresses bare (no output) placeholders
  • normalizeReplyPayload(...) treats bare (no output) as skipped with reason empty-tool-output
  • regression coverage added for sanitizer and normalizer paths

Verification run locally

  • vitest run src/agents/pi-embedded-helpers.sanitizeuserfacingtext.test.ts src/auto-reply/reply/reply-utils.test.ts → 164 tests passed
  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental false → passed
  • git diff --check → clean

PR blocker

I could not open a PR directly yet because this checkout appears to have been based on a newer packaged/source tree than my fork's current default branch. Direct push to upstream is denied, and pushing the branch to my fork failed with a missing object error. Applying the patch onto the fork default branch also failed because the relevant src/... files are not present there.

So this issue captures the bug, expected fix, and local verification. I can attach/paste the exact patch if useful.

extent analysis

TL;DR

Apply the local patch 9538ed3b fix: suppress leaked reply scaffolding to fix the issue with internal scaffolding being surfaced to users.

Guidance

  • Review the patch to ensure it correctly modifies sanitizeUserFacingText to strip the current-message-priority prompt wrappers and suppress bare (no output) placeholders.
  • Verify the changes to normalizeReplyPayload to treat bare (no output) as skipped with reason empty-tool-output.
  • Run the provided verification commands to ensure the patch does not introduce any regressions: vitest run src/agents/pi-embedded-helpers.sanitizeuserfacingtext.test.ts src/auto-reply/reply/reply-utils.test.ts and node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental false.
  • Resolve the PR blocker by updating the fork's default branch to match the newer packaged/source tree.

Example

No code snippet is provided as the issue does not contain explicit code, but the patch 9538ed3b fix: suppress leaked reply scaffolding should be reviewed and applied carefully.

Notes

The provided patch and verification steps should fix the issue, but the PR blocker needs to be resolved to submit the patch for review.

Recommendation

Apply the workaround by manually applying the patch 9538ed3b fix: suppress leaked reply scaffolding to the codebase, as the PR blocker prevents a direct submission.

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