Skip to content

Streaming partial leak: 'NO' visible before NO_REPLY suppression kicks in (v2026.3.1) #32168

@fuller-stack-dev

Description

@fuller-stack-dev

Bug

Version: 2026.3.1
Component: Reply pipeline / streaming partial suppression

Description

When an agent reply starts with NO_REPLY (the silent reply token), the partial text NO leaks to webchat as a visible streaming delta before the full suppression logic catches it.

Root Cause

handlePartialForTyping in reply-XaR8IPbY.js calls isSilentReplyPrefixText on each streaming delta. The function has an early-exit guard:

if (!normalized.includes('_')) return false;

This means "NO" is not recognized as a prefix of NO_REPLY (because it has no underscore yet), so it passes through and gets pushed to webchat as a typing signal. By the time "NO_" arrives and would be caught, "NO" has already been rendered.

Reproduction

  1. Configure an agent that replies with only NO_REPLY (the silent token)
  2. Observe webchat — NO briefly appears as a streamed partial before being suppressed
  3. Final message is correctly suppressed; only the partial leaks

Expected Behavior

All prefixes of NO_REPLY that consist solely of uppercase letters (i.e., N, NO) should also be suppressed in handlePartialForTyping, even before the underscore arrives.

Suggested Fix

In isSilentReplyPrefixText, relax the includes('_') guard to also match pure-alpha prefixes that are a prefix of the token up to (but not including) the first _:

function isSilentReplyPrefixText(text, token = SILENT_REPLY_TOKEN) {
  if (!text) return false;
  const normalized = text.trimStart().toUpperCase();
  if (!normalized) return false;
  if (/[^A-Z_]/.test(normalized)) return false;
  return token.toUpperCase().startsWith(normalized);
}

Simply removing the includes('_') guard fixes the leak while keeping all existing behavior intact.

Impact

  • Webchat users see a spurious NO message when an agent uses the silent reply token
  • Affects any streaming webchat session on 2026.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions