Skip to content

Bug: NO_REPLY tokens leak in chat history endpoint (PR #16286 incomplete fix) #27238

@karridy

Description

@karridy

Bug Report

PR #16286 fixed NO_REPLY token suppression in the webchat streaming path but missed the chat history endpoint.

Issue
When webchat loads message history via the chat.history API endpoint (server-methods/chat.ts:565), it returns raw session messages containing NO_REPLY text. The sanitizeChatHistoryMessages() function only handles truncation/metadata stripping — it does NOT filter out assistant messages containing NO_REPLY text.

Result
When users refresh webchat or open a new connection, historical NO_REPLY messages appear in the chat interface.

Root Cause

Fix Location
src/gateway/server-methods/chat.ts in the sanitizeChatHistoryMessages function or chat.history handler — filter out assistant messages where text content matches isSilentReplyText().

Relates To
PR #16286 - this is the missing piece of that fix
Original issue #16269

Environment
OpenClaw v2026.2.17

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