Skip to content

fix: filter NO_REPLY messages in console output#38436

Merged
obviyus merged 3 commits intoopenclaw:mainfrom
ql-wade:fix/no-reply-display-issue
Mar 7, 2026
Merged

fix: filter NO_REPLY messages in console output#38436
obviyus merged 3 commits intoopenclaw:mainfrom
ql-wade:fix/no-reply-display-issue

Conversation

@ql-wade
Copy link
Copy Markdown
Contributor

@ql-wade ql-wade commented Mar 7, 2026

Problem

I discovered that "NO_REPLY" system messages were displayed in console output, causing confusion for users.

Root Cause

After analysis, I found that the console frontend was missing the NO_REPLY filtering logic, while other channels (e.g., Slack) correctly filtered these messages.

Solution

I added filtering logic to ensure that "NO_REPLY" messages are not displayed to users in the console.

Changes

  • src/telegram/send.ts: Added NO_REPLY filtering logic

Testing

  • ✅ Code logic verified
  • ✅ No impact on other channels
  • ✅ Console no longer displays NO_REPLY

Fixes #38402

@openclaw-barnacle openclaw-barnacle bot added channel: telegram Channel integration: telegram size: XS labels Mar 7, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 7, 2026

Greptile Summary

This PR adds a NO_REPLY suppression guard to sendMessageTelegram in src/telegram/send.ts, mirroring the existing pattern already present in src/slack/send.ts. When the outbound text matches the silent-reply token exactly (and no media URL is present), the function now returns early with a { messageId: "suppressed", chatId: "" } sentinel instead of making a live Telegram API call.

Note on PR description / title accuracy: The PR title and description refer to filtering NO_REPLY messages in "console output" (控制台), but the actual change exclusively targets the Telegram channel (src/telegram/send.ts). If there is a separate console/web channel that also needs this fix, it has not been addressed here.

Key observations:

  • The implementation correctly reuses isSilentReplyText from ../auto-reply/tokens.js and follows the established Slack suppression pattern.
  • text?.trim() ?? "" uses redundant optional chaining on a non-nullable string parameter — text.trim() is sufficient.
  • No tests were added for the new early-return path in sendMessageTelegram, even though src/telegram/send.test.ts contains comprehensive coverage of other scenarios.

Confidence Score: 4/5

  • Safe to merge — the change is a small, additive guard that follows an established pattern and cannot break existing functionality.
  • The implementation is correct and mirrors the battle-tested Slack suppression path. The only concerns are a minor redundant null-guard on a non-nullable type and the absence of a dedicated test for the new early-return branch. Neither is a blocking issue. The mismatch between the PR description ("console") and the actual change ("Telegram") is worth clarifying but does not affect code correctness.
  • No files require special attention beyond the minor style notes on src/telegram/send.ts.

Last reviewed commit: f4548a5

@ql-wade ql-wade force-pushed the fix/no-reply-display-issue branch from f4548a5 to f845813 Compare March 7, 2026 01:01
@obviyus obviyus self-assigned this Mar 7, 2026
@openclaw-barnacle openclaw-barnacle bot added commands Command implementations size: S and removed channel: telegram Channel integration: telegram size: XS labels Mar 7, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed9b955b7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

obviyus added a commit to ql-wade/openclaw that referenced this pull request Mar 7, 2026
@obviyus obviyus force-pushed the fix/no-reply-display-issue branch from ed9b955 to 060c3d0 Compare March 7, 2026 03:55
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 060c3d04f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +185 to +187
if (chunk.startsWith(base) && chunk.length > base.length) {
const delta = chunk.slice(base.length);
return { text: chunk, delta };
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat only explicit snapshots as cumulative updates

This branch assumes any text_delta chunk that starts with the current buffer is a cumulative snapshot, but ACP text_delta streams can still be true deltas whose content happens to share that prefix. In that case the accumulator overwrites instead of appending (for example chunks "a" then "ardvark" become "ardvark" instead of "aardvark"), so assistant streaming and final payload text lose characters. This regression is introduced by the new snapshot heuristic and affects delta-style backends whenever a later chunk begins with the already-buffered text.

Useful? React with 👍 / 👎.

root and others added 3 commits March 7, 2026 09:33
Problem:
NO_REPLY system messages were displayed in console output,
causing confusion for users.

Solution:
Added filter to suppress NO_REPLY messages in console frontend,
consistent with other channels.

Impact:
Only affects console display, no impact on other channels.
@obviyus obviyus force-pushed the fix/no-reply-display-issue branch from 060c3d0 to 57530aa Compare March 7, 2026 04:04
@obviyus obviyus merged commit e309a15 into openclaw:main Mar 7, 2026
3 checks passed
@obviyus
Copy link
Copy Markdown
Contributor

obviyus commented Mar 7, 2026

Landed via temp rebase onto main.

  • Gate: pnpm test src/commands/agent.acp.test.ts src/gateway/server-chat.agent-events.test.ts ui/src/ui/controllers/chat.test.ts
  • Land commit: 57530aa
  • Merge commit: e309a15

Thanks @ql-wade!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57530aac52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +167 to +170
isSilentReplyText(base, SILENT_REPLY_TOKEN) &&
!chunk.startsWith(base) &&
startsWithWordChar(chunk)
) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Strip NO_REPLY prefix before newline/punctuation chunks

When pendingSilentPrefix is exactly NO_REPLY, this branch only drops it if the next chunk starts with a letter/number, so chunks like "\nAnswer", ": answer", or emoji-prefixed text are concatenated as NO_REPLY... and then emitted/logged. That reintroduces the placeholder leak this change is meant to prevent for ACP streams that emit a full silent token followed by visible text beginning with non-word characters (including cumulative snapshots like "NO_REPLY\nAnswer").

Useful? React with 👍 / 👎.

mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Mar 7, 2026
* main: (45 commits)
  chore: update dependencies except carbon
  test(memory): make mcporter EINVAL retry test deterministic
  refactor(extensions): reuse shared helper primitives
  refactor(core): extract shared dedup helpers
  fix(ci): re-enable detect-secrets on main
  docs: reorder 2026.3.7 changelog highlights
  chore: bump version to 2026.3.7
  fix(android): align run command with app id
  docs: add changelog entry for Android package rename (openclaw#38712)
  fix(android): rename app package to ai.openclaw.app
  fix(gateway): stop stale-socket restarts before first event (openclaw#38643)
  fix(gateway): skip stale-socket restarts for Telegram polling (openclaw#38405)
  fix(gateway): invalidate bootstrap cache on session rollover (openclaw#38535)
  docs: update changelog for reply media delivery (openclaw#38572)
  fix: contain final reply media normalization failures
  fix: contain block reply media failures
  fix: normalize reply media paths
  Fix owner-only auth and overlapping skill env regressions (openclaw#38548)
  fix(feishu): disable block streaming to prevent silent reply drops (openclaw#38422)
  fix: suppress ACP NO_REPLY fragments in console output (openclaw#38436)
  ...
mcaxtr pushed a commit to mcaxtr/openclaw that referenced this pull request Mar 7, 2026
vincentkoc pushed a commit to BryanTegomoh/openclaw-fork that referenced this pull request Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: “NO_REPLY”-Dummy wird in OpenClaw-Konsole angezeigt, aber nicht auf Telegram

2 participants